-
Notifications
You must be signed in to change notification settings - Fork 264
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
A way to specify memory properties like flash size #42
Comments
Perhaps a somewhat odd but simple strategy, what about setting the flash size to the addressable per chip and then letting the flashing step detect the failures? E.g for the esp32 the max external flash supported is 16MB, we'd set that in the linker script. If someone tried to flash a 12MB program on a physical module with only 4MB the flashing step will fail. |
Maybe flash size was not the best example. What about things like guaranteed allocated stack-size (which are not manageable in a sane way with cargo features) |
I tried https://crates.io/crates/toml-cfg and it seems to work great for this use-case. It works in the library code and in build.rs I guess we could just use it as is, however there are a few things I don't like that much (for our use-case)
Maybe we could just pick-up the idea of toml-cfg and have our own macro (in |
Another option might be to use cargo's built-in |
I think this is a duplicate of #1111, so lets continue the discussion there. |
It's very convenient that we don't need a
memory.x
orbuild.rs
in binary crates using the HALHowever, we should be able to set things like flash size if it doesn't match our default.
Ideally not by providing custom linker scripts
The text was updated successfully, but these errors were encountered: