Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4829

General • Re: A tiny Raspberry Pico shell with flash file system, vi, and c compiler.

$
0
0
Wow, great work!

I have a certainly complex question: could it be feasible to make cc generate ELF like (relocatable?) code and have all SDK functions indirectly accessible trough a "vector" table?

That would make possible to update "core" pshell on flash without recompiling programs (unless "ABI" changes).

Plus copying the "vector table" in RAM would allow to intercept some calls to change default behavior if necessary.

That would pave the way to something more like a mini OS, but it's perhaps too weird nor feasible.

Running this on a Pimoroni Pico Plus 2 with 8 MB of PSRAM, plugged to VGA or DVI (via HSTX), SD card "drive" and USB keyboard would make a neat standalone computer.
Anything is possible I guess, but it's a little more than I'm willing to undertake right now.

There are a little over 200 external functions (part of the SDK) that would need to be part of this vector table. That could be located at a fixed address, thus simplifying code generation.

Presently the code compiles to a fixed address and some branches are also to fixed addresses. Those would need to be considered relocatable addresses. PC relative loads and branches wouldn't need to change.

The biggest challenge would be memory management. Making sure that no leaks occur.

Statistics: Posted by lurk101 — Sun Sep 01, 2024 7:56 pm



Viewing all articles
Browse latest Browse all 4829

Trending Articles