Having gone back to hacking the 'rp2' port that's somewhat like pulling a strand from a spider's web without breaking any other but I am getting there. I have managed to strip out modules and functionality I don't want, add in my own modules and, by virtue of it all being run from 'main' it is implicitly embedded in C.
The main thing I haven't got is it building for the Pi command line, nor as bare metal PI, but the framework is in place. The greatest challenge is likely to be in removing the Pico SDK stuff and replacing that with C library calls.
I am going to have to think about how to handle file systems. Given all interaction is block-based, reads and writes via 'rp2_flash.c', I am tempted to load a file system image, interact with that, and save it if it has changed. At least to start with.
So I will accept 'katak255' was right and this does seem to be easiest route even if there are hurdles surrounding the bottom of the mountain to climb.
So far the cut-down 'rp2' port, basically no 'machine' and 'rp2' modules, has reduced the Pico image to 240 KB. That's from about 280 KB so not a huge saving but saving memory isn't the primary goal.
The main thing I haven't got is it building for the Pi command line, nor as bare metal PI, but the framework is in place. The greatest challenge is likely to be in removing the Pico SDK stuff and replacing that with C library calls.
I am going to have to think about how to handle file systems. Given all interaction is block-based, reads and writes via 'rp2_flash.c', I am tempted to load a file system image, interact with that, and save it if it has changed. At least to start with.
So I will accept 'katak255' was right and this does seem to be easiest route even if there are hurdles surrounding the bottom of the mountain to climb.
So far the cut-down 'rp2' port, basically no 'machine' and 'rp2' modules, has reduced the Pico image to 240 KB. That's from about 280 KB so not a huge saving but saving memory isn't the primary goal.
Statistics: Posted by hippy — Sun Oct 19, 2025 12:40 am