Skip to content

Commit 0209bc1

Browse files
committed
Vibe Coded West Manifest
1 parent 9cfc815 commit 0209bc1

File tree

3 files changed

+38
-13
lines changed

3 files changed

+38
-13
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
####
55

66
cmake_minimum_required(VERSION 3.24.2)
7+
8+
# Set BOARD_ROOT to find custom boards
9+
# The structure is BOARD_ROOT/boards/vendor/board
10+
list(APPEND BOARD_ROOT "${CMAKE_CURRENT_LIST_DIR}")
11+
712
# Patch in std-atomic implementations
813
if (BOARD STREQUAL "rpi_pico" OR FPRIME_ZEPHYR_USE_STD_ATOMIC_FIX)
914
include_directories(BEFORE "${CMAKE_CURRENT_LIST_DIR}/lib/fprime-zephyr/fprime-zephyr/Os/StdAtomic")

Makefile

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ help: ## Display this help.
66
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
77

88
##@ Dependencies
9+
# Note: Zephyr setup uses minimal modules and ARM-only toolchain for RP2040/RP2350
10+
# This saves ~3-4 GB compared to full installation. See docs/additional-resources/west-manifest-setup.md
911

1012
.PHONY: submodules
1113
submodules: ## Initialize and update git submodules
@@ -20,16 +22,33 @@ fprime-venv: ## Create a virtual environment
2022
@$(UV) pip install --requirement requirements.txt
2123

2224
.PHONY: zephyr-setup
23-
zephyr-setup: fprime-venv ## Set up Zephyr environment
24-
@test -s lib/zephyr-workspace/tools/edtt/.gitignore || { \
25-
echo "Setting up Zephyr environment..."; \
26-
cd lib/zephyr-workspace && \
27-
$(UVX) west update && \
28-
$(UVX) west zephyr-export && \
29-
$(UV) run west packages pip --install && \
30-
$(UV) run west sdk install; \
25+
zephyr-setup: fprime-venv ## Set up Zephyr environment (minimal RP2040/RP2350 only)
26+
@test -d ../lib/zephyr-workspace/modules/hal/rpi_pico || { \
27+
echo "Setting up minimal Zephyr environment (RP2040/RP2350 only)..."; \
28+
echo " - Using minimal module set (~80% disk space reduction)"; \
29+
echo " - Installing ARM toolchain only (~92% SDK reduction)"; \
30+
$(UVX) west update && \
31+
$(UVX) west zephyr-export && \
32+
$(UV) run west packages pip --install && \
33+
$(UV) run west sdk install --toolchains arm-zephyr-eabi; \
3134
}
3235

36+
.PHONY: zephyr-setup-full
37+
zephyr-setup-full: fprime-venv ## Set up Zephyr with ALL modules and toolchains (not recommended)
38+
@echo "Setting up FULL Zephyr environment (all modules and toolchains)..."
39+
@echo "Warning: This will download 4-6 GB of data"
40+
@read -p "Continue? [y/N] " -n 1 -r; \
41+
echo; \
42+
if [[ $$REPLY =~ ^[Yy]$$ ]]; then \
43+
$(UVX) west config manifest.path lib/zephyr-workspace/zephyr && \
44+
$(UVX) west update && \
45+
$(UVX) west zephyr-export && \
46+
$(UV) run west packages pip --install && \
47+
$(UV) run west sdk install; \
48+
else \
49+
echo "Cancelled. Use 'make zephyr-setup' for minimal installation."; \
50+
fi
51+
3352
##@ Development
3453

3554
.PHONY: pre-commit-install
@@ -63,6 +82,12 @@ clean: ## Remove all gitignored files
6382
clean-zephyr: ## Remove all Zephyr build files
6483
rm -rf lib/zephyr-workspace/bootloader lib/zephyr-workspace/modules lib/zephyr-workspace/tools
6584

85+
.PHONY: clean-zephyr-sdk
86+
clean-zephyr-sdk: ## Remove Zephyr SDK (reinstall with 'make zephyr-setup')
87+
@echo "Removing Zephyr SDK..."
88+
rm -rf ~/zephyr-sdk-*
89+
@echo "Run 'make zephyr-setup' to reinstall with minimal ARM-only toolchain"
90+
6691
##@ Operations
6792

6893
.PHONY: gds

lib/zephyr-workspace/.west/config

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)