Firstly you must have some Pi Picos otherwise please don't bid.
If you’ve run some Pico test programs you’ve probably noticed the compiled programs are located in Flash memory and run through the XIP port, a form of cache. You’ve probably also noticed the extensive use of CMake in the build system, a large number of embedded sub-directories and a [login to view URL] at each level. If you go to the outermost level you should see it pulling in the SDK and checking the version used. Then below this after the add-compile-options statement there should be a pico-set-binary-type instruction. If you change this to :
pico-set-binary-type(PROGRAM_NAME, copy-to-ram)
it should attempt to load the code from Flash into RAM and run from there.
Now it gets complicated. The system I’m designing stores the program in a flash on the first RP2040. This then connects to a second RP2040 via GPIO16 -> SWCLK and GPIO17->SWD pins. The second RP2040 similarly connects into a third RP2040 and so on forming a long chain. But only the first RP2040 has the flash memory. The idea being you can update one flash memory and all processors run the same program in RAM.
Unfortunately the image the first processor copies to RAM using copy-to-ram will run on the processor with the flash, but when you copy it to another processor it fails to run because some of the initialisation work is done during the copying process. Instead you need to create a different binary using
pico-set-binary-type(PROGRAM_NAME, no-flash)
But when you load this into the flash of the first processor and reboot nothing happens. You need to write a small second level boot program that copies this binary image into the memory and then perform a jmp to the first instruction.
I haven’t done anything on this yet, but the first answer by Kilograham here says what is needed :
[login to view URL]
Once this is booted and running it needs to transfer a copy of the program to the second processor via SWD and boot the same program there using GPIO16/17 to the SWD pins of the second RP2040.
Programming the processor via SWD is probably best based upon converting this program which is proven to work when running on a Pi4.
[login to view URL]
Convert this to RP2040 code and check you can move the program from the first Pico to the second and have it boot.
For all of this, just use a simple blink function as proof that your code is being moved and booted on each processor. But do make sure the program is running from RAM. You can do this by adding the following at the top of the C code
#if !PICO_NO_FLASH
#error “Not running from RAM”
#endif
Hope this is clear
I have checked your project description, it was a good read with most of the important details present, that are needed to carry out the work.
As a Senior Developer, I have strong knowledge and rich experience of +3 years.
I think this project is a very good fit for me.
Because I have experience of working with many Raspberry pi and microcontrollers including the Pi Pico.
As you mentioned I already own the Pi Pico and couple of Raspberry Pis.
I can provide high speed and quality in development.
You can also expect great communication from me.
If you share me more detail, I will start working immediately.
For more discussion, please send me a message