anjiahao1 opened a new pull request, #19454:
URL: https://github.com/apache/nuttx/pull/19454

   ## Summary
   
     * The `nucleo-f302r8:ihm07m1_b16` (FOC motor control) configuration no
       longer links: the image overflows the STM32F302R8 64 KiB flash region
       by ~470 bytes.
     * Enable GNU Full LTO (`CONFIG_LTO_FULL=y`) for this configuration so
       cross-module dead-code elimination brings the image back under the
       flash limit.
   
   ## Impact
   
     * Is new feature added? Is existing feature changed? NO.
     * Impact on user? NO.
     * Impact on build? YES — this config now builds with LTO; link time and
       memory usage increase, but the image fits flash (88% used vs. previous
       overflow).
     * Impact on hardware? NO.
     * Impact on documentation? NO.
     * Impact on security? NO.
     * Impact on compatibility? NO.
     * Anything else? LTO_FULL is marked EXPERIMENTAL in Kconfig; chosen here
       because the config is otherwise unbuildable within 64 KiB.
   
   ## Testing
   
     I confirm that changes are verified on local setup and works as intended:
     * Build Host(s): Ubuntu, arm-none-eabi-gcc 12.2.1
     * Target(s): `nucleo-f302r8:ihm07m1_b16` (STM32F302R8, 64 KiB flash)
     * Build: `./tools/configure.sh nucleo-f302r8:ihm07m1_b16 && make`
   
     Testing logs before change (link fails — flash overflowed):
   
     ```
     arm-none-eabi-ld: region `flash' overflowed by 472 bytes
     Memory region         Used Size  Region Size  %age Used
                flash:       66008 B        64 KB    100.72%
     ```
   
     Testing logs after change (links cleanly with LTO):
   
     ```
     Memory region         Used Size  Region Size  %age Used
                flash:       57740 B        64 KB     88.10%
                 sram:        5688 B        16 KB     34.72%
     ```
   
   ## PR verification Self-Check
   
     * [X] This PR introduces only one functional change.
     * [X] I have updated all required description fields above.
     * [X] My PR adheres to Contributing Guidelines and Documentation (git 
commit title and message, coding standard, etc).
     * [ ] My PR is still work in progress (not ready for review).
     * [X] My PR is ready for review and can be safely merged into a codebase.
   


-- 
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