Skip to content

Commit 290102c

Browse files
feat: add board-specific make commands and improve flash target
- Add `make build-xiao` for Seeed XIAO nRF52840 builds - Add `make build-feather` for Adafruit Feather nRF52840 Express builds - Update flash command to specify J-Link runner and correct build directory - Update help text with new board-specific commands and improved formatting Makes it easier to build for specific boards without remembering long board names. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 47d7540 commit 290102c

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

Makefile

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for mouthpad_usb project
22
# Provides convenient targets for building, cleaning, and workspace management
33

4-
.PHONY: init build flash monitor clean fullclean help
4+
.PHONY: init build build-xiao build-feather flash monitor clean fullclean help
55

66
# Default target
77
all: build
@@ -16,9 +16,16 @@ BOARD ?= xiao_ble
1616
build:
1717
west build -b $(BOARD) app --pristine=always
1818

19+
# Board-specific build targets
20+
build-xiao:
21+
west build -b xiao_ble app --pristine=always
22+
23+
build-feather:
24+
west build -b adafruit_feather_nrf52840 app --pristine=always
25+
1926
# Flash the built firmware
2027
flash:
21-
west flash
28+
west flash --runner jlink --build-dir build/app
2229

2330
# Open serial monitor
2431
monitor:
@@ -48,10 +55,12 @@ fullclean:
4855
# Show help
4956
help:
5057
@echo "Available targets:"
51-
@echo " init - Initialize workspace (west init + west update)"
52-
@echo " build - Build the project (west build -b xiao_ble app --pristine=always)"
53-
@echo " flash - Flash the built firmware to device"
54-
@echo " monitor - Open serial monitor"
55-
@echo " clean - Remove build directory only"
56-
@echo " fullclean - Remove all workspace files (requires re-initialization)"
57-
@echo " help - Show this help message"
58+
@echo " init - Initialize workspace (west init + west update)"
59+
@echo " build - Build the project (default: xiao_ble, override with BOARD=)"
60+
@echo " build-xiao - Build specifically for Seeed XIAO nRF52840"
61+
@echo " build-feather - Build specifically for Adafruit Feather nRF52840 Express"
62+
@echo " flash - Flash the built firmware to device"
63+
@echo " monitor - Open serial monitor"
64+
@echo " clean - Remove build directory only"
65+
@echo " fullclean - Remove all workspace files (requires re-initialization)"
66+
@echo " help - Show this help message"

0 commit comments

Comments
 (0)