-
Notifications
You must be signed in to change notification settings - Fork 3k
Apollo3: Fix run time error due to memory mapping #14277
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
Apollo3: Fix run time error due to memory mapping #14277
Conversation
The Appollo3 targets require dummy sections in stack and heap regions. The stack dummy section does not contain any symbols. It is only used for the linker to calculate the size of the stack sections and assign values to stack symbols later. The heap dummy region is used to identify the beginning of available dynamic memory.
@hugueskamba, thank you for your changes. |
@idea--list please review |
@0xc0170 and @hugueskamba Compiled the official blinky and 2-3 other code with this change and code runs again on the board as expected. |
; This section does not contain any symbols. It is only used for the linker | ||
; to calculate the size of the stack sections and assign values to stack | ||
; symbols later | ||
#define STACK_DUMMY_START (MBED_RAM1_START + MBED_RAM1_SIZE) | ||
#define STACK_DUMMY_SIZE 0x8 |
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.
We got the info from the GCC linker script - the ranges of the stack and the heap are both shifted down by 8 bytes:
__StackTop = ORIGIN(RAM) + LENGTH(RAM)-8; |
Dummy sections exist in many GCC linker scripts but most of them do not shift any bytes. I wonder if the 8 bytes are used for something in particular on this target? Thanks in advance. @ARMmbed/team-sparkfun
CI started |
@idea--list this will get into the upcoming release |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Fixes ##14273
The Apollo3 targets require dummy sections in stack and heap regions.
The stack dummy section does not contain any symbols. It is only used
for the linker to calculate the size of the stack sections and assign
values to stack symbols later.
The heap dummy region is used to identify the beginning of available dynamic memory.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers