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

Add pico_set_modified_binary_type function #2137

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

Conversation

will-v-pi
Copy link
Contributor

This adds a function to create binaries using an existing binary type & linker script, but with modified RAM/SCRATCH addresses

A similar function is already in use by the encrypted bootloader example, and picotool xip_ram_perms binary, so this extends those by adding scratch address modification

For example, to only use SRAM1 so you can power down SRAM0 in your binary you could use

pico_set_modified_binary_type(<my_exe> default RAM "0x20040000" "256k")

To create a XIP_SRAM only binary you could use

pico_set_modified_binary_type(<my_exe> no_flash
    RAM "0x13ffc000" "12k"
    SCRATCH_X "0x13fff000" "2k"
    SCRATCH_Y "0x13fff800" "2k")

The existing memmap_blocked_ram.ld could be created using

pico_set_modified_binary_type(<my_exe> default RAM "0x21000000" "256k")

Allows creating binaries using an existing binary type & linker script, but with modified RAM/SCRATCH addresses

For example, to only use SRAM1 so you can power down SRAM0 in your binary you could use `pico_set_modified_binary_type(<my_exe> no_flash RAM "0x20040000" "256k"`
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.

1 participant