Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple project top-level from RP2040/Pico #8

Closed
mcknly opened this issue Jun 3, 2024 · 5 comments
Closed

Decouple project top-level from RP2040/Pico #8

mcknly opened this issue Jun 3, 2024 · 5 comments

Comments

@mcknly
Copy link
Owner

mcknly commented Jun 3, 2024

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:

  • Add a variable for FreeRTOS MCU port sub-path (root CMakeLists.txt still has include($ENV{FREERTOS_KERNEL_PATH}/portable/ThirdParty/GCC/RP2040/FreeRTOS_Kernel_import.cmake)
  • Move RP2040-specific target_link_libraries in root CMakeLists.txt to the hw_libs variable in hardware/rp2040/prebuild.cmake
  • Remove references to RP2040 in cli/node_proc.c
  • Other stuff that was missed?
@mcknly
Copy link
Owner Author

mcknly commented Jun 3, 2024

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
Copy link
Contributor

biot commented Jun 3, 2024

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

@Kintar
Copy link
Contributor

Kintar commented Jun 26, 2024

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
Copy link
Owner Author

mcknly commented Jun 27, 2024

@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.

@mcknly
Copy link
Owner Author

mcknly commented Oct 31, 2024

Closing this as all of the necessary changes are now in the v0.3pre branch. Opened issue #28 to track work for auto-cloning FreeRTOS and any other hardware-specific repos.

@mcknly mcknly closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants