Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $(VENV_DIR)/bin/activate:

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

# --- Linting ---

Expand Down Expand Up @@ -107,6 +107,7 @@ firmware: $(MPY_DIR) ## Build MicroPython firmware with current drivers
rm -rf $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib
ln -s $(CURDIR) $(CURDIR)/$(MPY_DIR)/lib/micropython-steami-lib
@echo "Building firmware for $(BOARD)..."
rm -f $(STM32_DIR)/build-$(BOARD)/frozen_content.c
$(MAKE) -C $(STM32_DIR) BOARD=$(BOARD)
@echo "Firmware ready: $(STM32_DIR)/build-$(BOARD)/firmware.hex"

Expand All @@ -123,7 +124,14 @@ firmware-update: $(MPY_DIR) ## Update the MicroPython clone and board-specific s
$(MAKE) -C $(STM32_DIR) BOARD=$(BOARD) submodules

.PHONY: deploy
deploy: $(MPY_DIR) ## Flash firmware to the board via OpenOCD
deploy: deploy-pyocd ## Flash firmware (default: pyocd)

.PHONY: deploy-pyocd
deploy-pyocd: $(MPY_DIR) ## Flash firmware via pyOCD (CMSIS-DAP)
$(PYTHON) -m pyocd flash $(STM32_DIR)/build-$(BOARD)/firmware.elf --format elf
Comment on lines 126 to +131
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After switching make deploy to default to pyOCD, the docs are now out of sync: CONTRIBUTING.md still lists OpenOCD as a prerequisite for make deploy and says make deploy flashes via OpenOCD (see CONTRIBUTING.md:123 and :195). Please update the documentation to reflect the new default (deploy→pyOCD) and the OpenOCD compatibility target.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 291df8b: updated CONTRIBUTING.md to list pyOCD as the prerequisite for make deploy and added make deploy-openocd as the alternative.


.PHONY: deploy-openocd
deploy-openocd: $(MPY_DIR) ## Flash firmware via OpenOCD
$(MAKE) -C $(STM32_DIR) BOARD=$(BOARD) deploy-openocd

.PHONY: run
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ requires-python = ">=3.7"
[project.optional-dependencies]
dev = ["ruff==0.11.6", "micropython-stm32-stubs>=1.24"]
test = ["pytest==7.4.0", "pyyaml==6.0.2", "mpremote>=1.0"]
flash = ["pyocd>=0.44"]

[tool.setuptools]
# No Python packages to install — this project contains MicroPython drivers
Expand Down
Loading