Donny9 opened a new pull request, #3293:
URL: https://github.com/apache/nuttx-apps/pull/3293

   ## Summary
   nshlib/ls_handler: eliminate floating-point operations for human-readable 
sizes
   
   Replace floating-point arithmetic with fixed-point integer math to avoid 
linking soft-float library (~2-3KB Flash) when displaying human-readable file 
sizes (ls -lh command).
   
   Changes:
   - Use integer division and modulo to calculate size components
   - Calculate decimal part: (remainder * 10) / unit for one decimal place
   - Refactor duplicated code: consolidate GB/MB/KB logic into single path
   - Remove CONFIG_HAVE_FLOAT dependency
   
   This eliminates calls to __aeabi_f2d, __aeabi_fmul, __aeabi_i2f and other 
ARM EABI floating-point helpers, reducing Flash footprint for systems compiled 
with -mfloat-abi=soft.
   
   ## Impact
   
   save flash size
   
   ## Testing
   
   nsh ls
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to