mcknly / breadboard-os

A firmware platform aimed at quick prototyping, built around FreeRTOS and a feature-packed CLI
MIT License
500 stars 19 forks source link

hardware abstractions and modularity #3

Closed biot closed 1 month ago

biot commented 1 month ago

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.

I have some patches, but I'd really like your opinion on the above before I put in any more effort.

mcknly commented 1 month ago

@biot , thanks for the interest and taking the time to look through the code. I mostly agree with your analysis - here are my comments on each of your points:

  1. Absolutely true. I knew the top-level RP2040 specific build recipe would eventually become a problem when a new platform was added; it will need to be re-tooled and your suggestion to split the CMake is the way to do it. There were a number of refactoring cleanups that I deferred in order to release the project into the wild a little faster.
  2. This is another one of those cleanups! For sure many things should be more modular through build options (this is after all one of my stated goals!)
  3. Dead on, as stated above - there are a lot of things compiled in by default that I just lived with for the time being since Pico has a lot of resources. Needs to have an option to slim it way down, maybe even a blanket "minimal build" which strips out things like the eye candy (the boot logos make for a better YouTube video :)
  4. This is one I thought a lot about before releasing. I opted for not including the FreeRTOS kernel or Pico SDK for several reasons: many who are already developing on RP2040 would already have the SDK and possibly FreeRTOS; cloning those repos takes time and disk space (especially Pico SDK with its sub modules, >500MB); and assuming a new BreadboardOS project begins each time with a clone or fork of the repo, someone with many projects would have multiple copies of these which just seems wasteful. Maybe we could come up with a setup script which could be run once to optionally download, setup environment variables, and even configure specific drivers/modules/services and thus build size.

Looking forward to collaborating! FYI, I enabled the "discussions" feature on this repo (should show up on the top tabs now), I've never used it but maybe it makes things easier.

Cheers! Cavin