mcknly / breadboard-os

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

Decouple project top-level from RP2040/Pico #8

Open mcknly opened 3 weeks ago

mcknly commented 3 weeks ago

Finish the work that began in PR #6 - decouple project top-level from MCU platform and remove any references to RP2040/Pico, move all HW-related things to the hardware/ subdirectory.

Work on hw-decouple branch.

Still to-do:

mcknly commented 3 weeks ago

Also need a way to automate downloading the PicoSDK if it does not already exist, and move this functionality into the hardware-specific CMake file - potentially could use ExternalProject module for this purpose. Top level README should not refer to $PICO_SDK_PATH. This auto-cloning script could also be used for the FreeRTOS kernel.

biot commented 3 weeks ago

Why not just use git submodules for this? They need dealing with anyway, for microshell and git_version.

Kintar commented 4 days ago

I don't think submodules are the way to go for board-specific stuff, otherwise running a git clone --recurse-submodules or a simple git submodule update --init --recursive will pull down WAAAAAYYYYY too much crap once we support multiple boards.

We could always use the CMake FetchContent module to allow each HAL layer to automagically clone the necessary pieces. Or we can take a page from the VSCode Pico extension and do the whole bloody toolchain into <$HOME|%USERHOME%>/.pico.

mcknly commented 3 days ago

@Kintar agreed, I think the ability for CMake to pull in modules for FreeRTOS/relevant SDKs based on PLATFORM setting in project.cmake would be the way to go, but optionally if the user had the appropriate env variables set (as in FREERTOS_KERNEL_PATH and PICO_SDK PATH today), it would take no action to download those pieces.