Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.2k
ports/rps: Make FLASH LENGTH match PICO_FLASH_SIZE_BYTES in .ld files.#17344
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Code size report:
|
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
d3a2e29
to83c8f52
CompareIn principle this looks reasonable, although I have two concerns:
(1) is pretty easy to fix for the boards in this repo (there's also POLOLU_ZUMO_2040_ROBOT, WEACTSTUDIO and WEACTSTUDIO_RP2350B_CORE to fix), although anyone with a custom board outside this repo might also need to add such a definition. (2) is probably not an issue but worth considering. |
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
@dpgeorge How about this? If IMO the default probably doesn't need to be different between the RP2040 and RP2350, but I'm just keeping the same behavior as before. |
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.
Yes, this looks good now. I tested NULLBITS_BIT_C_PRO and it now builds.
Squashed, rebased and merged in6bfb83e |
Summary
Resolves#17343
This dynamically sets the
FLASH
LENGTH
value in the.ld
files to matchPICO_FLASH_SIZE_BYTES
, meaning it should match the size of the actual flash chip on whatever board is being built.Testing
I have a project that requires over 4MB of flash for the firmware. I'm building the project for a board that has a 16MB flash chip, which is set by
PICO_FLASH_SIZE_BYTES
. Without these changes, I get the following error from the linker:After these changes, it works fine.
Trade-offs and Alternatives
I do not believe this has any tradeoffs.
However, a possible alternative is to make the
FLASH
LENGTH
truly configurable instead of dynamically set to match the board's flash size. I don't know whether that would actually be useful for anything though, so IMO best to keep it simple.