Skip to content
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

Bump cortex-m-rt to get access to _stack_end symbol #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

korken89
Copy link

No description provided.

Copy link
Member

@mciantyre mciantyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imxrt-rt users are expected to override the cortex-m-rt linker script. With this in mind, how will users see that _stack_end symbol?


imxrt-rt uses a fixed stack size, and we have symbols for the start and end of the stack. Could we expose __estack through a Rust API, similar to heap_end()? That could give users a clear way to access the address.

.stack (NOLOAD) : ALIGN(8)
{
__estack = .;
. += ALIGN(__stack_size, 8);
__sstack = .;
/* Symbol expected by cortex-m-rt */
_stack_start = __sstack;
} > REGION_STACK

@korken89
Copy link
Author

korken89 commented Nov 15, 2024

Ah sorry, I was fixing a lot of different MSPLIM related PRs and this went with the rest 😅
The thing is that we use pre-init already, I need to check how this can be used so MSPLIM is set before we call main and its stack is allocated.
I'll fix on Monday :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants