Skip to content

Commit 2566392

Browse files
committed
Refactor GitHub workflows to remove paths-ignore for test files and update README with parallel flashing and erasing instructions
1 parent ce78999 commit 2566392

File tree

5 files changed

+39
-91
lines changed

5 files changed

+39
-91
lines changed

.github/workflows/test-erase.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
- '.github/actions/setup-jlink-network/**'
1313
- '.github/workflows/test-erase.yml'
1414
- '.github/workflows/fw.*'
15-
paths-ignore:
16-
- '.github/workflows/test-scan.yml'
17-
- '.github/workflows/test-flash.yml'
18-
- '.github/workflows/test-rtt.yml'
1915
pull_request:
2016
paths:
2117
- 'src/bmlab_toolkit/erase_cli.py'
@@ -26,10 +22,6 @@ on:
2622
- '.github/actions/setup-jlink-network/**'
2723
- '.github/workflows/test-erase.yml'
2824
- '.github/workflows/fw.*'
29-
paths-ignore:
30-
- '.github/workflows/test-scan.yml'
31-
- '.github/workflows/test-flash.yml'
32-
- '.github/workflows/test-rtt.yml'
3325
workflow_dispatch:
3426

3527
env:

.github/workflows/test-flash.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
- '.github/actions/setup-jlink-network/**'
1313
- '.github/workflows/test-flash.yml'
1414
- '.github/workflows/fw.*'
15-
paths-ignore:
16-
- '.github/workflows/test-scan.yml'
17-
- '.github/workflows/test-erase.yml'
18-
- '.github/workflows/test-rtt.yml'
1915
pull_request:
2016
paths:
2117
- 'src/bmlab_toolkit/flashing.py'
@@ -26,10 +22,6 @@ on:
2622
- '.github/actions/setup-jlink-network/**'
2723
- '.github/workflows/test-flash.yml'
2824
- '.github/workflows/fw.*'
29-
paths-ignore:
30-
- '.github/workflows/test-scan.yml'
31-
- '.github/workflows/test-erase.yml'
32-
- '.github/workflows/test-rtt.yml'
3325
workflow_dispatch:
3426

3527
env:

.github/workflows/test-rtt.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
- '.github/actions/setup-jlink-network/**'
1313
- '.github/workflows/test-rtt.yml'
1414
- '.github/workflows/fw.*'
15-
paths-ignore:
16-
- '.github/workflows/test-scan.yml'
17-
- '.github/workflows/test-flash.yml'
18-
- '.github/workflows/test-erase.yml'
1915
pull_request:
2016
paths:
2117
- 'src/bmlab_toolkit/rtt_cli.py'
@@ -26,10 +22,6 @@ on:
2622
- '.github/actions/setup-jlink-network/**'
2723
- '.github/workflows/test-rtt.yml'
2824
- '.github/workflows/fw.*'
29-
paths-ignore:
30-
- '.github/workflows/test-scan.yml'
31-
- '.github/workflows/test-flash.yml'
32-
- '.github/workflows/test-erase.yml'
3325
workflow_dispatch:
3426

3527
env:

.github/workflows/test-scan.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
- 'pyproject.toml'
1212
- '.github/actions/setup-jlink-network/**'
1313
- '.github/workflows/test-scan.yml'
14-
paths-ignore:
15-
- '.github/workflows/test-flash.yml'
16-
- '.github/workflows/test-erase.yml'
17-
- '.github/workflows/test-rtt.yml'
1814
pull_request:
1915
paths:
2016
- 'src/bmlab_toolkit/scan_cli.py'
@@ -24,10 +20,6 @@ on:
2420
- 'pyproject.toml'
2521
- '.github/actions/setup-jlink-network/**'
2622
- '.github/workflows/test-scan.yml'
27-
paths-ignore:
28-
- '.github/workflows/test-flash.yml'
29-
- '.github/workflows/test-erase.yml'
30-
- '.github/workflows/test-rtt.yml'
3123
workflow_dispatch:
3224

3325
env:

README.md

Lines changed: 39 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ Flash with specific MCU:
4444
bmlab-flash <firmware_file> --mcu STM32F765ZG
4545
```
4646

47+
Flash multiple devices via IP addresses (parallel):
48+
```bash
49+
bmlab-flash firmware.bin --ip 192.168.1.100 192.168.1.101 192.168.1.102 --mcu STM32F765ZG
50+
```
51+
52+
Flash multiple devices via USB serial (sequential due to USB driver limitations):
53+
```bash
54+
bmlab-flash firmware.bin --serial 123456 789012 345678 --mcu STM32F103RE
55+
```
56+
4757
Specify programmer explicitly:
4858
```bash
4959
bmlab-flash <firmware_file> --programmer jlink --serial 123456
@@ -88,13 +98,42 @@ bmlab-rtt -v
8898

8999
# Specify programmer explicitly (default: jlink)
90100
bmlab-rtt --programmer jlink --serial 123456
101+
102+
# Monitor multiple devices via IP (parallel, saves logs to files)
103+
bmlab-rtt --ip 192.168.1.100 192.168.1.101 192.168.1.102 --output-dir rtt_logs --timeout 10
104+
105+
# Monitor multiple devices via USB (sequential, saves logs to files)
106+
bmlab-rtt --serial 123456 789012 --mcu STM32F103RE --output-dir rtt_logs --timeout 10
91107
```
92108

109+
**Note:** Multiple devices require `--output-dir`. Logs are saved as `rtt_192_168_1_100.log` or `rtt_serial_123456.log`.
110+
93111
Get RTT help:
94112
```bash
95113
bmlab-rtt --help
96114
```
97115

116+
### Erasing Flash Memory
117+
118+
Erase flash memory on a device:
119+
120+
```bash
121+
# Erase with auto-detected device
122+
bmlab-erase --mcu STM32F103RE
123+
124+
# Erase specific device by serial
125+
bmlab-erase --serial 123456 --mcu STM32F103RE
126+
127+
# Erase device via IP
128+
bmlab-erase --ip 192.168.1.100 --mcu STM32F765ZG
129+
130+
# Erase multiple devices via IP (parallel)
131+
bmlab-erase --ip 192.168.1.100 192.168.1.101 192.168.1.102 --mcu STM32F103RE
132+
133+
# Erase multiple devices via USB (sequential)
134+
bmlab-erase --serial 123456 789012 345678 --mcu STM32F103RE
135+
```
136+
98137
### Scanning for Devices
99138

100139
Scan for USB-connected JLink devices:
@@ -114,65 +153,6 @@ bmlab-scan --network 192.168.1.0/24 --start-ip 100 --end-ip 150
114153
bmlab-scan --network 192.168.1.0/24 --log-level DEBUG
115154
```
116155

117-
### Parallel Flashing
118-
119-
Flash multiple devices simultaneously using the provided script:
120-
121-
```bash
122-
# Flash multiple IPs from command line
123-
examples/parallel_flash.sh firmware.bin 192.168.1.100 192.168.1.101 192.168.1.102
124-
125-
# Flash with specific MCU type
126-
examples/parallel_flash.sh --mcu STM32F765ZG firmware.bin 192.168.1.100 192.168.1.101
127-
128-
# Flash from IP list file
129-
cat > ips.txt << EOF
130-
192.168.1.100
131-
192.168.1.101
132-
192.168.1.102
133-
EOF
134-
135-
examples/parallel_flash.sh firmware.bin $(cat ips.txt)
136-
```
137-
138-
The script outputs simple status for each device:
139-
```
140-
192.168.1.100 OK
141-
192.168.1.101 OK
142-
192.168.1.102 FAULT
143-
```
144-
145-
### Parallel RTT Reading
146-
147-
Read RTT from multiple devices simultaneously and save to log files:
148-
149-
```bash
150-
# Read RTT from multiple devices (default 10 seconds)
151-
examples/parallel_rtt.sh 192.168.1.100 192.168.1.101 192.168.1.102
152-
153-
# Read for 30 seconds with specific MCU
154-
examples/parallel_rtt.sh --mcu STM32F765ZG --timeout 30 192.168.1.100 192.168.1.101
155-
156-
# Read indefinitely until Ctrl+C
157-
examples/parallel_rtt.sh --timeout 0 192.168.1.100 192.168.1.101
158-
159-
# Read from IP list file
160-
examples/parallel_rtt.sh $(cat ips.txt)
161-
```
162-
163-
Output:
164-
```
165-
Output directory: rtt_logs_20251214_143052
166-
167-
192.168.1.100 OK (saved to rtt_logs_20251214_143052/rtt_192.168.1.100.log)
168-
192.168.1.101 OK (saved to rtt_logs_20251214_143052/rtt_192.168.1.101.log)
169-
192.168.1.102 FAULT (see rtt_logs_20251214_143052/rtt_192.168.1.102.log)
170-
171-
All RTT sessions completed
172-
```
173-
174-
Log files are saved in a timestamped directory with ANSI color codes removed for clean text output.
175-
176156
### Python API
177157

178158
#### Flashing

0 commit comments

Comments
 (0)