I took a break from this project for a while, but I have come back. I have a basic terminal with one command working, along with a file system. The terminal has only a help command that prints a string on the screen. I have working file IO now. File IO works kinda.... different. Basically instead of accessing the SD card directly by the emulated CPU in the Arduino, the SD library's functions are mapped to the CPU's emulated hardware IO. This does a few things:
- Makes there no need for a complex file system driver
- SD card library functions are faster because they are not run on an emulator
- I don't have to find a way to directly read/write bytes on the SD card
Think of it like having a filesystem driver (software) mapped to your CPU's hardware IO.
I will do something similar for network access. So that my OS can download updates to the SD card.