File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # Makefile.multiboard_test
2+ # Example usage:
3+ # make -f Makefile.multiboard_test test_wire_connected2 PORT_BOARD1=/dev/ttyACM0 PORT_BOARD2=/dev/ttyACM1 FQBN_BOARD1=arduino-git:xmc:kit_xmc47_relax FQBN_BOARD2=arduino-git:xmc:kit_xmc47_relax
4+ #
5+ # This Makefile is designed for multi-board testing and flashing.
6+ # It will flash two boards, run sync (/utils/sync_ports.py),
7+ # and start the monitor on the master board.
8+
9+ FQBN_BOARD1 ?=
10+ FQBN_BOARD2 ?=
11+
12+ PORT_BOARD1 ?=
13+ PORT_BOARD2 ?=
14+ PORT_LIST ?=
15+
16+ UNITY_PATH ?= Unity
17+ BAUD_RATE ?= 115200
18+
19+ .PHONY: test_wire_connected2 sync
20+
21+ # Target: test_wire_connected2
22+ # 1. Flash slave board with test_wire_connected2_slavepingpong
23+ # 2. Flash master board with test_wire_connected2_masterpingpong
24+ # 3. Run sync script to synchronize both boards
25+ # 4. Start monitor on the master board
26+ test_wire_connected2:
27+ $(MAKE) -f Makefile test_wire_connected2_slavepingpong PORT=$(PORT_BOARD1) FQBN=$(FQBN_BOARD1)
28+ $(MAKE) -f Makefile test_wire_connected2_masterpingpong PORT=$(PORT_BOARD2) FQBN=$(FQBN_BOARD2)
29+ $(MAKE) -f Makefile.multiboard_test sync PORT_LIST="$(PORT_BOARD1) $(PORT_BOARD2)"
30+ $(MAKE) -f Makefile monitor PORT=$(PORT_BOARD2)
31+
32+ test_uart_connected2:
33+ $(MAKE) -f Makefile test_uart_connected2_rx PORT=$(PORT_BOARD1) FQBN=$(FQBN_BOARD1)
34+ $(MAKE) -f Makefile test_uart_connected2_tx PORT=$(PORT_BOARD2) FQBN=$(FQBN_BOARD2)
35+ $(MAKE) -f Makefile.multiboard_test sync PORT_LIST="$(PORT_BOARD1) $(PORT_BOARD2)"
36+ $(MAKE) -f Makefile monitor PORT=$(PORT_BOARD2)
37+
38+ # Target: sync
39+ # Calls the Python script to send start tokens to all boards in PORT_LIST
40+ sync:
41+ python3 utils/sync_ports.py $(PORT_LIST)
You can’t perform that action at this time.
0 commit comments