-
Notifications
You must be signed in to change notification settings - Fork 3k
MCU_NRF52832 (NRF52_DK, SDT52832B): use two-region memory model to support MicroLib #13951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@LDong-Arm, thank you for your changes. |
Manually pinging @ARMmbed/mbed-os-core for review, as the group was not added as reviewers by the system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@0xc0170 I need to edit the PR description and commit message later as they are not accurate, please keep it on hold for a bit, thanks! |
88c897e
to
3957519
Compare
Pull request has been modified.
CI restarted |
...T_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/device/TOOLCHAIN_ARM_STD/nRF52832.sct
Outdated
Show resolved
Hide resolved
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
…MicroLib MicroLib is the lightweight C lib for the Arm toolchain and used as the default C lib on bare metal builds with the Arm toolchain. It requires two separate memory regions for stack and heap. The change is based on nRF52840.sct.
3957519
to
b174edb
Compare
Hopefully it's all good this time! |
@0xc0170 This PR is ready for CI (when there's capacity), cheers! |
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Fixes: #13857
Arm toolchain's MicroLib, a lightweight C library used in conjunction with the bare metal profile to save code size, requires two separate memory regions for stack and heap. For MCU_NRF52832 (NRF52_DK, SDT52832B) such memory model is already used in the GCC_ARM linker script, and this PR adds it to the Arm Compiler scatter file.
This change is based on nRF52840.sct.Update: The heap size calculation of nRF52840 and many other targets contain a mistake, which will be fixed in a subsequent PR.Impact of changes
MCU_NRF52832 targets (NRF52_DK, SDT52832B) now support MicroLib (i.e.
"target.c_lib": "small"
withTOOLCHAIN=ARM
).Migration actions required
To use MicroLib on MCU_NRF52832 targets, set
"target.c_lib": "small"
inmbed_app.json
and compile with the ARM toolchain.Documentation
None.
Pull request type
Test results
mbed-os-example-blinky-baremetal compiles and runs on NRF52_DK.
All Greentea tests with the bare metal profile pass:
Both the above use MicroLib when compiled with the Arm Compiler.
Reviewers
@ARMmbed/mbed-os-core @MarceloSalazar