zyfeier opened a new pull request, #22081:
URL: https://github.com/apache/nuttx/pull/22081
## Summary
Three small-flash configurations are within a few hundred bytes of
their limit on master, so ordinary changes in core components make the
`Linux (arm-stm32l-u-g)` CI job fail on unrelated PRs:
| configuration | flash | used on master | free |
|---|---:|---:|---:|
| nucleo-g431rb:cansock | 128 KB | 130600 | 472 |
| b-g431b-esc1:cansock | 128 KB | 130600 | 472 |
| stm32l0538-disco:nsh | 64 KB | 64760 | 776 |
For example, `nucleo-g431rb:cansock` overflows by 88 bytes in the CI of
an open PR that only changes the scheduler.
This PR disables features these configurations do not need, so each of
them gets about 4 KB of headroom:
* **boards/stm32g4/cansock**: disable the `dd` tool, which the SocketCAN
demo does not use, and `TLS_EMUTLS`. `NET_STATISTICS` and the CAN
tools (`candump`, `cansend`) are kept.
* **boards/stm32l0538-disco/nsh**: disable the NSH `alias` command and
`TLS_EMUTLS`, and enable `LIBC_ATOMIC_NOINLINE` (added in #22053) so
that the interrupt-disabling atomic operations are built once instead
of inlined at every call.
`TLS_EMUTLS` only gives per-thread copies of `__thread` variables. None
of these images has any: `nm` finds no `__emutls_v.*` symbol, so
disabling it changes no behavior.
## Impact
* Users: `dd` is no longer in the two cansock configurations, and
`alias` is no longer in `stm32l0538-disco:nsh`. No other command or
feature changes.
* Build: none. Hardware: only these three configurations.
* Documentation, security, compatibility: no impact.
## Testing
Host: Ubuntu, Arm GNU Toolchain 13.2.Rel1 (the CI version), master
ed122374690. make builds use `EXTRAFLAGS="-Wno-cpp -Werror"` as in CI.
| configuration | before | after | saved | free after |
|---|---:|---:|---:|---:|
| nucleo-g431rb:cansock | 130600 | 126836 | 3764 | 4236 |
| b-g431b-esc1:cansock | 130600 | 126836 | 3764 | 4236 |
| stm32l0538-disco:nsh | 64760 | 61472 | 3288 | 4064 |
```
$ ./tools/configure.sh nucleo-g431rb:cansock && make
Memory region Used Size Region Size %age Used
flash: 126836 B 128 KB 96.77%
$ ./tools/configure.sh stm32l0538-disco:nsh && make
Memory region Used Size Region Size %age Used
flash: 61472 B 64 KB 93.80%
```
The CMake builds that CI runs also link: `nucleo-g431rb:cansock`
127040 B, `stm32l0538-disco:nsh` 61520 B.
`make savedefconfig` gives no diff for the three configurations, and
`tools/checkpatch.sh -c -u -m -g` passes.
Not tested on hardware.
--
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]