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

Hooks for Linker Script Configuration #703

Closed
jamesmunns opened this issue Jul 31, 2023 · 1 comment
Closed

Hooks for Linker Script Configuration #703

jamesmunns opened this issue Jul 31, 2023 · 1 comment
Labels
linker scripts Linker script issues

Comments

@jamesmunns
Copy link

jamesmunns commented Jul 31, 2023

Hey all! In tosc-rs/mnemos#206, we are looking at the "right" way to determine how much memory we have available for the heap and stack, and would like to add some basic asserts to "reserve" an amount of space for the heap and stack, so that we get a linker error if we run out of memory room due to too many statics, etc.

the cortex-m-rt platform allows the user to set some extra variables in memory.x, as well as add your own link time asserts.

Right now, the esp-hal linker scripts are directly generated by the build.rs in this repo, and other than selecting the operational mode, gives the user no ability to customize the linker script. Additionally there is some logic in the linker script for setting the heap start and reserving size for it - but the heap size is PROVIDE'd to zero.

We could always just use our own full linker script, but it would be nice to be able to say "please make sure there is at least 128KiB for heap and 64KiB for stack" without completely discarding the upstream linker scripts.

CC @hawkw

@MabezDev
Copy link
Member

This is likely to be implemented via a configuration of some kind, so I'm closing this in favour of #1111

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linker scripts Linker script issues
Projects
Archived in project
Development

No branches or pull requests

3 participants