#you can include the filesystem with all

1 messages · Page 1 of 1 (latest)

quartz warren
#

For context: this is for a commercial product that has an rp2040, and I don't want users to have to install uf2, etc. It should be plug-and-play. So I want to preinstall code.

What I'm stuck on is: how can I put my python onto the rp2040 + flash chip? I understood SWD was a common way

spiral jungle
#

rp2040 comes with a built-in uf2 bootloader, you just connect it to usb and copy the uf2 file with whatever contents you want, there is no need for the users to do it, you can do it in the factory

#

another option, since everything is stored on the flash chip, is to just dump the contents of that flash chip and flash it to all new flash chips when making your product

#

no swd involved

#

you probably can dump the flash chip through swd and flash it that way too, but don't ask me about the commands for that

quartz warren
#

Okay, I'm understanding a bit more. But our board doesn't have a usb connector. Does that change anything?

spiral jungle
#

circuitpython is pretty useless without usb

quartz warren
#

mmm ok ok

spiral jungle
#

you can probably prepare everything on a board that does have usb connector, using the uf2 bootloader and copying all the files you need, and then dump the contents of that flash chip and then copy it over swd or just over spi to new flash chips for the boards without usb

quartz warren
#

right right - I won't ask you for commands on how to do that lol.
Okay, that makes sense. And if I went the C route (not circuitpython), then more options open up, including SWD (which I've tested locally and works).

spiral jungle
#

if you have a binary that includes the filesystem with all the files you need, you can flash that

#

but you can't really access the filesystem itself on file-by-file basis over swd

#

I think that you could even mount the dumped binary file under linux as a loopback device, if you know the offset of the filesystem