Skip to content

Commit fa0b360

Browse files
committed
Minor Makefile, Readme and cmake presets fixes
1 parent a0cf714 commit fa0b360

File tree

3 files changed

+18
-49
lines changed

3 files changed

+18
-49
lines changed

CMakePresets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
{
44
"binaryDir": "${sourceDir}/build-fprime-automatic-zephyr",
55
"cacheVariables": {
6-
"BOARD": "teensy41",
6+
"BOARD": "proves_flight_control_board_v5c/rp2350a/m33",
77
"CMAKE_BUILD_TYPE": "Release",
88
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
99
},
1010
"description": "F\u00b4 release build using local fprime-venv",
11-
"displayName": "F\u00b4 Zephyr (teensy41)",
11+
"displayName": "F\u00b4 FPrime Zephyr PROVES",
1212
"environment": {
1313
"PATH": "$env{VIRTUAL_ENV}/bin:$penv{PATH}",
1414
"VIRTUAL_ENV": "${fileDir}/fprime-venv"
1515
},
1616
"generator": "Ninja",
17-
"name": "fprime-zephyr-teensy41",
17+
"name": "fprime-zephyr-proves",
1818
"toolchainFile": "${fileDir}/lib/fprime-zephyr/cmake/toolchain/zephyr.cmake"
1919
}
2020
],

Makefile

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ submodules: ## Initialize and update git submodules
1313
git submodule update --init --recursive
1414

1515
export VIRTUAL_ENV ?= $(shell pwd)/fprime-venv
16-
fprime-venv: uv ## Create a virtual environment
17-
@test -s $(VIRTUAL_ENV) || { \
18-
echo "Creating virtual environment..."; \
19-
$(UV) venv fprime-venv; \
20-
$(UV) pip install --requirement requirements.txt; \
21-
}
16+
fprime-venv: ## Create a virtual environment
17+
@$(MAKE) uv
18+
@echo "Creating virtual environment..."; \
19+
@$(UV) venv fprime-venv; \
20+
@$(UV) pip install --requirement requirements.txt; \
2221

2322
.PHONY: zephyr-setup
24-
zephyr-setup: uv ## Set up Zephyr environment
23+
zephyr-setup: fprime-venv ## Set up Zephyr environment
2524
@test -s lib/zephyr-workspace/tools/edtt/.gitignore || { \
2625
echo "Setting up Zephyr environment..."; \
2726
cd lib/zephyr-workspace && \
@@ -34,45 +33,34 @@ zephyr-setup: uv ## Set up Zephyr environment
3433
##@ Development
3534

3635
.PHONY: pre-commit-install
37-
pre-commit-install: uv
38-
@echo "Installing pre-commit hooks..."
36+
pre-commit-install: uv ## Install pre-commit hooks
3937
@$(UVX) pre-commit install > /dev/null
4038

4139
.PHONY: fmt
4240
fmt: pre-commit-install ## Lint and format files
43-
$(UVX) pre-commit run --all-files
41+
@$(UVX) pre-commit run --all-files
4442

4543
.PHONY: generate
4644
generate: submodules fprime-venv zephyr-setup ## Generate FPrime-Zephyr Proves Core Reference
4745
@echo "Generating FPrime-Zephyr Proves Core Reference..."
48-
$(UV) run fprime-util generate --force
46+
@$(UV) run fprime-util generate --force
4947

5048
.PHONY: generate-if-needed
5149
BUILD_DIR ?= $(shell pwd)/build-fprime-automatic-zephyr
5250
generate-if-needed:
5351
@test -s $(BUILD_DIR) || $(MAKE) generate
5452

5553
.PHONY: build
56-
build: generate-if-needed ## Build FPrime-Zephyr Proves Core Reference
57-
@echo "Building FPrime code..."
54+
build: fprime-venv generate-if-needed ## Build FPrime-Zephyr Proves Core Reference
55+
@echo "Building..."
5856
@$(UV) run fprime-util build
5957

60-
.PHONY: list-tty
61-
list-tty: arduino-cli ## List available TTY ports
62-
@echo "TTY ports:"
63-
@$(ARDUINO_CLI) board list | grep "USB" | awk '{print $$1}'
64-
65-
.PHONY: install
66-
UF2 ?= $(BUILD_DIR)/zephyr/zephyr.uf2
67-
install: arduino-cli build ## Install the zephyr firmware onto a connected PROVES Kit, requires BOARD_DIR=[path-to-your-board]
68-
@$(ARDUINO_CLI) config init || true
69-
@$(ARDUINO_CLI) config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
70-
@$(ARDUINO_CLI) core install rp2040:[email protected]
71-
@$(ARDUINO_CLI) upload -v -b 115200 --fqbn rp2040:rp2040:rpipico -p $(BOARD_DIR) -i $(UF2)
72-
7358
.PHONY: clean
7459
clean: ## Remove all gitignored files
7560
git clean -dfX
61+
62+
.PHONY: clean-zephyr
63+
clean-zephyr: ## Remove all Zephyr build files
7664
rm -rf lib/zephyr-workspace/bootloader lib/zephyr-workspace/modules lib/zephyr-workspace/tools
7765

7866
##@ Operations
@@ -98,9 +86,3 @@ UVX ?= $(UV_DIR)/uvx
9886
uv: $(UV) ## Download uv
9987
$(UV): $(BIN_DIR)
10088
@test -s $(UV) || { mkdir -p $(UV_DIR); curl -LsSf https://astral.sh/uv/$(UV_VERSION)/install.sh | UV_INSTALL_DIR=$(UV_DIR) sh > /dev/null; }
101-
102-
ARDUINO_CLI ?= $(BIN_DIR)/arduino-cli
103-
.PHONY: arduino-cli
104-
arduino-cli: $(ARDUINO_CLI) ## Download arduino-cli
105-
$(ARDUINO_CLI): $(BIN_DIR)
106-
@test -s $(ARDUINO_CLI) || curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=$(BIN_DIR) sh > /dev/null

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,7 @@ make build
3636

3737
### Find the path to your board
3838

39-
Next, plug in your board! If you have previously installed a firmware on your board you may not see it show up as a drive. In that case you'll want to find it's `tty` port.
40-
41-
To do this, run the following command
42-
```shell
43-
make list-tty
44-
```
45-
46-
Otherwise, you want to find the location of the board on your computer. It should be called something like RP2350 but you want to find the path to it
39+
Next, plug in your board! If you have previously installed a firmware on your board you may not see it show up as a drive. In that case you'll want to put the board into boot loader mode. Then you'll be able to find the location of the board on your computer. It should be called something like RP2350 but you want to find the path to it
4740

4841
For Mac:
4942
```shell
@@ -59,15 +52,9 @@ findmnt
5952
```
6053

6154
Now you want to install the firmware to the board.
62-
```shell
63-
make install BOARD_DIR=[path-to-your-board]
64-
```
65-
66-
or
6755
```
6856
cp build-fprime-automatic-zephyr/zephyr/zephyr.uf2 [path-to-your-board]
6957
```
70-
to copy the uf2 if the make install isnt working
7158

7259
Finally, run the fprime-gds.
7360
```shell

0 commit comments

Comments
 (0)