breadboard-os
breadboard-os copied to clipboard
hardware abstractions and modularity
Hi Cavin,
I like Breadboard OS and its stated goals, and thought I might help out. However I noticed some issues with the codebase, and I'd like to see whether you agree with my analysis.
- The README states that "all hardware-specific code resides in a single directory", so as to make porting easier. That's true, but the build system is very much hardcoded to the pico. The top CMakeFiles.txt has build, project and hardware-specifics in it. I think this should be split up, so another top-level file (project.cmake) holds projects stuff, and hardware-specific build stuff should be in that hardware's directory.
- The build is not modular enough -- aside from the hardcoded pico, it also has the driver_lib code always compiled in. You can disable those drivers, but the code is still compiled and linked in to the binary, and that's just not going to scale.
- Speaking of scale, the binary image is huge, already over half the size of RAM in the RP2040, and that's without runtime memory allocation. Seeing as how BBOS's aim is to provide a base OS for people to develop applications on top of, that's not such an attractive option. Combined with the driver situation this is a project killer: add another 20 drivers and there won't be any room for a user application to run at all. The only way to deal with this (IMHO) is:
- Drop the two ASCII art logos, they're huge. OS output on boot shoud be minimal.
- Drivers should be modular, and not actually compiled unless specifically selected.
- Even the top-level modules should be optional in this way, including littlefs and even cli. FreeRTOS gets a pass, but there may be opportunity for thinning down its build.
- Same for the services.
- I think the build could be made easier by dropping in FreeRTOS and pico-sdk in git submodules, like you're already doing. pico-sdk is a little harder -- it shouldn't be pulled in when a non-pico platform gets added to BBOS.
I have some patches, but I'd really like your opinion on the above before I put in any more effort.