cleanup to do multiple test builds

This commit is contained in:
Scott Penrose
2026-06-08 16:08:09 +10:00
parent 1c3d7b094d
commit a77023a6b5
2 changed files with 18 additions and 5 deletions
+5 -4
View File
@@ -254,14 +254,15 @@ radio comes up configured with no manual steps:
```sh ```sh
cd examples/AutoProvision cd examples/AutoProvision
pio run -e esp32-s3-devkitc-1 -t upload # or: -e xiao-esp32s3 for a XIAO host pio run -e esp32-s3-devkitc-1 -t upload # or -e xiao-esp32s3 / -e xiao-esp32c3
pio device monitor pio device monitor
``` ```
It's a self-contained PlatformIO project (`platformio.ini` + `src/main.cpp`) with It's a self-contained PlatformIO project (`platformio.ini` + `src/main.cpp`) with
an env per host board — a generic ESP32-S3 dev board and a Seeed **XIAO an env per host board — a generic ESP32-S3 dev board and the Seeed **XIAO
ESP32-S3** (their host UART pins differ, since the XIAO doesn't break out ESP32-S3** / **XIAO ESP32-C3**. Their host UART pins differ (the XIAOs don't break
GPIO17/18). The region is set the same way you'd compile MeshCore firmware — out GPIO17/18), and the XIAOs have only native USB, so their envs route `Serial`
to USB-CDC (`ARDUINO_USB_CDC_ON_BOOT=1`) — without that you get no serial monitor. The region is set the same way you'd compile MeshCore firmware —
`LORA_FREQ` / `LORA_BW` / `LORA_SF` / `LORA_CR` / `LORA_TX_POWER` in `LORA_FREQ` / `LORA_BW` / `LORA_SF` / `LORA_CR` / `LORA_TX_POWER` in
`platformio.ini`'s `build_flags` (916.575 MHz / 62.5 kHz / SF7 / CR4/8 / 20 dBm). `platformio.ini`'s `build_flags` (916.575 MHz / 62.5 kHz / SF7 / CR4/8 / 20 dBm).
The code is plain Arduino C++, so you can rename `src/main.cpp` to The code is plain Arduino C++, so you can rename `src/main.cpp` to
+13 -1
View File
@@ -1,8 +1,9 @@
; Self-contained PlatformIO project for the AutoProvision example. ; Self-contained PlatformIO project for the AutoProvision example.
; ;
; Two host boards are provided — pick one with -e: ; Host boards are provided — pick one with -e:
; pio run -e esp32-s3-devkitc-1 -t upload # generic ESP32-S3 dev board ; pio run -e esp32-s3-devkitc-1 -t upload # generic ESP32-S3 dev board
; pio run -e xiao-esp32s3 -t upload # Seeed XIAO ESP32-S3 ; pio run -e xiao-esp32s3 -t upload # Seeed XIAO ESP32-S3
; pio run -e xiao-esp32c3 -t upload # Seeed XIAO ESP32-C3
; pio device monitor ; pio device monitor
; ;
; The radio region is set via build flags — the same LORA_* defines you'd use ; The radio region is set via build flags — the same LORA_* defines you'd use
@@ -50,3 +51,14 @@ build_flags =
; the monitor sees output. (The devkit doesn't need this; it has a CP2102.) ; the monitor sees output. (The devkit doesn't need this; it has a CP2102.)
-D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_CDC_ON_BOOT=1
[env:xiao-esp32c3]
extends = common
board = seeed_xiao_esp32c3
build_flags =
${common.build_flags}
; host UART pins to the companion (XIAO C3 pads D7=GPIO20 RX, D6=GPIO21 TX)
-D UART_RX_PIN=20
-D UART_TX_PIN=21
; native USB only (USB-Serial/JTAG) — route Serial to USB-CDC for the monitor
-D ARDUINO_USB_CDC_ON_BOOT=1