I apologize for the big dumb question, I'm casting a wide net and hoping for some suggestions.
I have a base firmware image I like to run on my pico. It works well. I'd also like to be able to load a routine at some memory address, set a flag in the base firmware, and this would tell my main loop to jump to the new routine (the "userspace" program), run it, and return.
Can anybody think of an example of this I might look at or point me in the right direction as to how to accomplish this? I know you can tell the linker where to put stuff at compile time, but how would I go about doing this later? In the compiled "userspace" program, it would have to have a bunch of relative addresses or know where it was going to be placed when compiled? I also have some data structures from the firmware I'd like to share with it, that would perhaps be placed at known static addresses and fiddled with by the "userspace" program. I am guessing I just define these in both programs and tell the linker for both they are at the same address?
Is it possible to learn this power?
I have a base firmware image I like to run on my pico. It works well. I'd also like to be able to load a routine at some memory address, set a flag in the base firmware, and this would tell my main loop to jump to the new routine (the "userspace" program), run it, and return.
Can anybody think of an example of this I might look at or point me in the right direction as to how to accomplish this? I know you can tell the linker where to put stuff at compile time, but how would I go about doing this later? In the compiled "userspace" program, it would have to have a bunch of relative addresses or know where it was going to be placed when compiled? I also have some data structures from the firmware I'd like to share with it, that would perhaps be placed at known static addresses and fiddled with by the "userspace" program. I am guessing I just define these in both programs and tell the linker for both they are at the same address?
Is it possible to learn this power?
Statistics: Posted by kristerj — Fri Feb 07, 2025 11:58 pm — Replies 0 — Views 39