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

   ## Summary
   
   `verdin-mx8mp:rpmsg` runs from the 128 KB ITCM and does not link on
   current master, so the `Linux (arm-imx)` CI job fails for every PR:
   
   ```
   arm-none-eabi-ld: region `flash' overflowed by 240 bytes
   ```
   
   The configuration has been trimmed five times in the last three weeks
   to stay inside the ITCM (c989ab419bf ramtest, 6be97c4b7fc rpmsg panic
   dump, 26e97256f43 locale, e876bed9612 du/uptime, 0657a5714c3 rptun auto
   reset). Each time a few hundred bytes were freed by dropping a feature,
   and ordinary changes in core components used them up again within days.
   
   Enable `CONFIG_LTO_FULL`, as other small-flash configurations already do
   (e.g. `nucleo-f302r8:cansock`, `stm32l0538-disco:nsh`). The image shrinks
   from 131312 to 121168 bytes (100.18% -> 92.44% of the ITCM), leaving
   about 9.9 KB of headroom without removing any feature.
   
   The configuration is a flat build. `itcm.ld` places the resource table
   with `KEEP(*(.resource_table))`, so LTO does not drop it: the
   `.resource_table` section has the same size (0x10c) and contents with
   and without LTO.
   
   ## Impact
   
   * Users: no functional change, the same features are built in.
   * Build: link time of this configuration grows because of LTO.
   * Debugging: cross-file inlining under LTO can make source-level
     debugging less direct.
   * Hardware: only `verdin-mx8mp:rpmsg`.
   * Documentation, security, compatibility: no impact.
   
   ## Testing
   
   Host: Ubuntu, Arm GNU Toolchain 13.2.Rel1 (the CI version), make build
   with `EXTRAFLAGS="-Wno-cpp -Werror"` as in CI.
   
   Before (master fa7cb3c2e94):
   
   ```
   arm-none-eabi-ld: region `flash' overflowed by 240 bytes
   Memory region         Used Size  Region Size  %age Used
              flash:      131312 B       128 KB    100.18%
               sram:       12880 B       128 KB      9.83%
   ```
   
   After:
   
   ```
   Memory region         Used Size  Region Size  %age Used
              flash:      121168 B       128 KB     92.44%
               sram:       12888 B       128 KB      9.83%
   CP: nuttx.hex
   CP: nuttx.bin
   ```
   
   Resource table in the LTO image:
   
   ```
   $ arm-none-eabi-readelf -SW nuttx | grep resource_table
     [ 2] .resource_table   PROGBITS        0001d3cc 01e3cc 00010c 00   A  0   
0  1
   ```
   
   `make savedefconfig` gives no diff, and `tools/checkpatch.sh -c -u -m -g`
   passes.
   
   Not tested on hardware: no Verdin iMX8M Plus board was available.
   


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