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

Example Idea: Flash page settings #4

Open
jamesmunns opened this issue Feb 22, 2024 · 0 comments
Open

Example Idea: Flash page settings #4

jamesmunns opened this issue Feb 22, 2024 · 0 comments
Labels
todo Stuff I wanna do (docs/code/examples)

Comments

@jamesmunns
Copy link
Owner

Give an example of an external flash page you can flash with probe-rs

from chat:

Is there any way for me to make some piece of "meta-data" (SSID name and pass) available to the binary (rp pico w in my case) that is "passed in" on deploy of the binary (probe-rs via debug probe, or UF2 format and copy)

without me putting in host env or generating code from [build.rs](http://build.rs/) and building a new binary each time
without a file system the binary can read from
The only thing I can think of is a tool that replaces some strings in the binary, just before copying.... but wondered if others have solved this problem is some more standard way....

12:01PM
There's not a standard way, a common way is something like:

use postcard or some other format to make a bin file/payload
use probe-rs download to flash it at some predictable location, usually outside your firmware
you can define like a 4k region in your memory-x to avoid, say the last 4k of the flash chip, and read it from there.
12:05PM
like, you can make a little cli tool to make the bin file, like:

mytool --ssid='whatever' --password='lololol123' --output='./target/config.bin'
probe-rs download --format bin --protocol swd --speed 12000 --chip rp2040 --base-address 0x10020000 ./target/config.bin
or something

(you could also make a tool that used probe-rs as a lib to do the same thing in one step, if you prefer)
@jamesmunns jamesmunns added the todo Stuff I wanna do (docs/code/examples) label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Stuff I wanna do (docs/code/examples)
Projects
None yet
Development

No branches or pull requests

1 participant