Optimization flags for all NRF52 targets to reduce code size#8854
Conversation
|
Donato Santoro seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Pull request overview
This PR applies optimization flags to all NRF52 targets to reduce code size, extending the approach from PR #8825 (originally for rak4631) to the entire NRF52 family.
Key changes:
- Changed
build_typefromdebugtoreleasein the base nrf52.ini configuration - Added
-Os(optimize for size) flag and removed debug symbols viabuild_unflagsat the nrf52_base level - Consolidated meshlink_eink variant into the main meshlink configuration using conditional
-D USE_EINKflags - Added RADIOLIB exclusion flags to multiple targets for additional size reduction
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| variants/nrf52840/nrf52.ini | Central configuration changes: added release build type, -Os flag, and removed debug flags; applies to all NRF52 targets |
| variants/nrf52840/rak4631/platformio.ini | Removed duplicate optimization flags now inherited from parent; contains indentation issue on line 15 |
| variants/nrf52840/meshlink/platformio.ini | Added RADIOLIB exclusion flags and consolidated meshlink_eink configuration into this file |
| variants/nrf52840/meshlink_eink/variant.h | Deleted - consolidated into shared meshlink variant |
| variants/nrf52840/meshlink_eink/variant.cpp | Deleted - consolidated into shared meshlink variant |
| variants/nrf52840/meshlink_eink/platformio.ini | Deleted - configuration moved to meshlink/platformio.ini |
| variants/nrf52840/diy/nrf52_promicro_diy_tcxo/platformio.ini | Added RADIOLIB exclusion flags for size reduction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@Donix212 why was the meshlink eink environment removed? |
We moved it inside the same "Meshlink" folder but with its own eink variant, just as done on nrf52_promicro |
|
Hi @thebentern @NomDeTom I've just seen that on NRF52 schematic PDF file one can also use sx1276 but it's "non-preferred" while in |
Huh, I hadn't noticed this one. I'll do a pr to fix that in a bit. |
|
@NomDeTom |
|
@macvenez I think we'll leave it - promicro is a DIY target, so someone may want it. Unless you have a compelling reason to remove it? |
…tic#8854) * changes of variants/nrf52840/nrf52.ini and variants/nrf52840/rak4631/platformio.ini * try for nrf52 size reduction, faketec exclude unused radios and meshlink refactor * can't exclude LR11X0 as in schematic there's option for LR1121 * remove -Map flag and -Wl * removed spaces causing error --------- Co-authored-by: macvenez <macvenez@gmail.com>
…tic#8854) * changes of variants/nrf52840/nrf52.ini and variants/nrf52840/rak4631/platformio.ini * try for nrf52 size reduction, faketec exclude unused radios and meshlink refactor * can't exclude LR11X0 as in schematic there's option for LR1121 * remove -Map flag and -Wl * removed spaces causing error --------- Co-authored-by: macvenez <macvenez@gmail.com>
The PL #8825 provided significant size reduction for rak4631 target. The same concept was applied here to achieve size reduction for all NRF52 targets.
🤝 Attestations