RP2350: start a user setup1() from filesystem or flash on core1 #2883
RevoAutomation
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear experts,
I have the need, to start a separate compiled main() or setup1()+loop1() on core1, after a setup()+loop() booted on core0 of a RP2350. The bootloader provided in arduino-pico start setup()+loop() from the Sketch partition. If it finds setup1()+loop1() in the Sketch partition, then it would start them on core1. Thats how I understand the bootloader.
Is there a way, to start a user supplied binary, for example from LittleFS, on core1? While the main application run on core0, select what user application should run on core1, provide the required infos to core1 and start it?
When the main Sketch looks the following
//system application on core0
void setup()
{
//setup the main system
}
void loop()
{
//loop on core0
}
// user application, run on core1
void setup1()
{
wait_for_dorbell(); //this run on core1, wait for core0 ring the bell
if (doorbell_ring(DB_USER_SETUP) )
{
exec_user_setup(func_setup1_address_in_flash);
exec_user_loop(func_loop1_address_in_flash);
}
}
void loop1()
{
}
The arduino-pico bootloader will install both cores, but core1 is then waiting for core0, to give him the start address in flash where core1 find his main(). I have not yet worked with Doorbells, but I hope they can be used for that, together with the hardware FIFOs.
If the user application is build independent, and the elf is then stored on the LittleFS, how could I then get the start address of the setup function in the elf? I think, the OTA part is doing this, but I can not find out how.
An other option would be, that core1 load the application into RAM, and execute the code from RAM. If this is the easier route, did somebody have an example for this for the RP2350? Out board have 8MB QSPI RAM, additionally to 16 MB Flash. Does executing from external QSPI RAM troubles, for example, access to flash?
Thanks for any hint into this direction,
Michael
Beta Was this translation helpful? Give feedback.
All reactions