Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
sfe-SparkFro wants to merge1 commit intomicropython:master
base:master
Choose a base branch
Loading
fromsparkfun:rp2_dynamic_flash_length_ld

Conversation

sfe-SparkFro
Copy link
Contributor

Summary

Resolves#17343

This dynamically sets theFLASHLENGTH 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 byPICO_FLASH_SIZE_BYTES. Without these changes, I get the following error from the linker:

firmware.elf section `.text' will not fit in region `FLASH'`region `FLASH' overflowed by xxxx bytes

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 theFLASHLENGTH 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.

@github-actionsGitHub Actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% minimal x86:    +0 +0.000%    unix x64:    +0 +0.000% standard      stm32:    +0 +0.000% PYBV10     mimxrt:    +0 +0.000% TEENSY40        rp2:    +0 +0.000% RPI_PICO_W       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS  qemu rv32:    +0 +0.000% VIRT_RV32

Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
@sfe-SparkFrosfe-SparkFroforce-pushed therp2_dynamic_flash_length_ld branch fromd3a2e29 to83c8f52CompareMay 22, 2025 20:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

ports/rp2: MakeFLASH length configurable in linker script.
1 participant
@sfe-SparkFro

[8]ページ先頭

©2009-2025 Movatter.jp