Skip to content

Commit 09aaed1

Browse files
committed
tooling: Add pyOCD deploy target and install via pip.
1 parent 621ebf5 commit 09aaed1

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $(VENV_DIR)/bin/activate:
2929

3030
.PHONY: install
3131
install: $(VENV_DIR)/bin/activate node_modules/.package-lock.json ## Install dev tools (pip + npm)
32-
$(VENV_DIR)/bin/pip install -e ".[dev,test]"
32+
$(VENV_DIR)/bin/pip install -e ".[dev,test,flash]"
3333

3434
# --- Linting ---
3535

@@ -128,7 +128,7 @@ deploy: deploy-pyocd ## Flash firmware (default: pyocd)
128128

129129
.PHONY: deploy-pyocd
130130
deploy-pyocd: $(MPY_DIR) ## Flash firmware via pyOCD (CMSIS-DAP)
131-
pyocd flash $(STM32_DIR)/build-$(BOARD)/firmware.elf --format elf
131+
$(PYTHON) -m pyocd flash $(STM32_DIR)/build-$(BOARD)/firmware.elf --format elf
132132

133133
.PHONY: deploy-openocd
134134
deploy-openocd: $(MPY_DIR) ## Flash firmware via OpenOCD

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ requires-python = ">=3.7"
1212
[project.optional-dependencies]
1313
dev = ["ruff==0.11.6", "micropython-stm32-stubs>=1.24"]
1414
test = ["pytest==7.4.0", "pyyaml==6.0.2", "mpremote>=1.0"]
15+
flash = ["pyocd>=0.44"]
1516

1617
[tool.setuptools]
1718
# No Python packages to install — this project contains MicroPython drivers

0 commit comments

Comments
 (0)