Skip to content

Commit fa816bf

Browse files
committed
Reduce
1 parent d08c3a9 commit fa816bf

File tree

3 files changed

+6
-331
lines changed

3 files changed

+6
-331
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,6 @@ jobs:
136136
echo "✗ ARM toolchain not found"
137137
fi
138138
139-
- name: Display setup statistics
140-
run: |
141-
echo "=== Setup Statistics ==="
142-
echo "Git submodules cache hit: ${{ steps.cache-submodules.outputs.cache-hit }}"
143-
echo "Zephyr modules cache hit: ${{ steps.cache-zephyr.outputs.cache-hit }}"
144-
echo ""
145-
echo "Submodule sizes:"
146-
du -sh lib/fprime lib/fprime-zephyr lib/zephyr-workspace/zephyr 2>/dev/null || echo "Some submodules not found"
147-
echo ""
148-
echo "Zephyr modules size: $(du -sh lib/zephyr-workspace/modules lib/zephyr-workspace/bootloader 2>/dev/null | awk '{sum+=$1} END {print sum"M"}' || echo 'N/A')"
149-
echo "SDK size: $(du -sh ~/zephyr-sdk-0.17.2 2>/dev/null | cut -f1 || echo 'N/A')"
150-
echo "Total modules count: $(find lib/zephyr-workspace/modules lib/zephyr-workspace/bootloader -name '.git' -type d 2>/dev/null | wc -l)"
151-
152139
- name: Build for PROVES Flight Control Board v5c
153140
run: |
154141
# Skip both zephyr-setup and submodules since we cached them separately
@@ -157,21 +144,8 @@ jobs:
157144
- name: Upload build artifacts
158145
uses: actions/upload-artifact@v4
159146
with:
160-
name: firmware-v5c
147+
name: artifacts
161148
path: |
162149
build-artifacts/zephyr.uf2
163-
build-artifacts/zephyr.elf
164-
build-artifacts/zephyr.hex
165-
build-artifacts/zephyr.bin
150+
build-artifacts/zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json
166151
retention-days: 30
167-
168-
- name: Display build statistics
169-
if: success()
170-
run: |
171-
echo "=== Build Statistics ==="
172-
if [ -f build-artifacts/zephyr.uf2 ]; then
173-
echo "Firmware size: $(ls -lh build-artifacts/zephyr.uf2 | awk '{print $5}')"
174-
fi
175-
echo ""
176-
echo "Memory usage:"
177-
cat build-fprime-automatic-zephyr/zephyr/zephyr.stat 2>/dev/null || echo "Stats not available"

Makefile

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ 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
11-
# Hello World!
129

1310
.PHONY: submodules
1411
submodules: ## Initialize and update git submodules
@@ -23,37 +20,16 @@ fprime-venv: ## Create a virtual environment
2320
@$(UV) pip install --requirement requirements.txt
2421

2522
.PHONY: zephyr-setup
26-
zephyr-setup: fprime-venv ## Set up Zephyr environment (minimal RP2040/RP2350 only)
27-
@test -d lib/zephyr-workspace/modules/hal/rpi_pico || test -d ../lib/zephyr-workspace/modules/hal/rpi_pico || { \
28-
echo "Setting up minimal Zephyr environment (RP2040/RP2350 only)..."; \
29-
echo " - Using minimal module set (~80% disk space reduction)"; \
30-
echo " - Installing ARM toolchain only (~92% SDK reduction)"; \
31-
if [ ! -f .west/config ] && [ ! -f ../.west/config ]; then \
32-
echo " - Initializing West workspace..."; \
33-
$(UVX) west init -l .; \
34-
fi && \
23+
zephyr-setup: fprime-venv ## Set up Zephyr environment
24+
@test -d lib/zephyr-workspace/modules/hal/rpi_pico { \
25+
echo "Setting up Zephyr environment..."; \
26+
$(UVX) west init -l . && \
3527
$(UVX) west update && \
3628
$(UVX) west zephyr-export && \
3729
$(UV) run west packages pip --install && \
3830
$(UV) run west sdk install --toolchains arm-zephyr-eabi; \
3931
}
4032

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

5935
.PHONY: pre-commit-install

docs/additional-resources/west-manifest-setup.md

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

0 commit comments

Comments
 (0)