I need to set my ANS Forth implementation aside since I believe I have made some bad design decisions and it needs to rest whilst I think about it.
However, I didn’t want some of the work I did to languish in obscurity, so I have taken what I can from that project, and added some additional things to create a PicoCalc Starter Kit for those that want to use develop for the PicoCalc using C/C++ on the bare metal using the Pico-Series C/C++ SDK.
Now, this is not designed to create graphical games as the display driver does not use a frame buffer and is text-based, but it does use very little memory. So you could create text-based games.
I have drivers for:
Audio (stereo)
Display (multicolour text with ANSI escape code emulation)
Keyboard
Pico onboard LED (WIFI-option aware)
Serial port
Southbridge functions (battery, backlights)
And these are not best-of-breed drivers either, this is something to get you going fast and you can then enhance/replace components as you need. The drivers have simple APIs, and they should be able to work independently, so you can pick and choose, or perhaps I can pass some hard-earned knowledge along.
The README explains it all.
I am currently working on FAT32 support on the “sdcard” branch.
I have changed the default board to “pico”, as it should have been from the start, and added a missing include which broke the build for non-wireless Pico’s.
@BlairLeduc I was wondering, so In my OS kernel, I would like to initialize the display and keyboard, but nothing else, as everything else will be initialized when needed, and I was wondering how I could do that.
How do you implement renaming files with long file names? I have been hesitant to implement LFN’s in zeptoforth because it would make renaming files far too complex because LFN’s of course live as arbitrary numbers of contiguous dummy directory entries.
As I just went through this myself, your hesitation is well founded!
Also, this being a starter library vs a language people depend upon gives me a pass on a lot of things.
With that, I left renaming files as out-of-scope for this library, mainly because I forgot about it.
However, if I were to add that feature, I would implement it as a move instead and free the directory entry, that would include the LFN’s, and create new entry with the new name in the possibility changed directory.
To be safe in a multithreaded system, you might do that the other way around. Also, depending how you do the equivalent of FILE *, it will be safe, since you are not moving the cluster layout, any open files will not be impacted.
One cautionary note, LFN entries can cross sector and cluster boundaries adding to the fun.
Well, my determination is more hardware side vs software. I’m currently knee deep in designing a PCB for my GPIO expander board something that not a whole lot of people know how to do.