Files
HaloKeymind/tools/hil/profile_switch.ini
T
mikecarper 091c8d8324 Preserve radio lab experiments and reuse unchanged SX1262 modulation
Skip redundant modulation writes during owned fast RX retunes when the last
acknowledged SF/BW/CR/LDRO tuple matches. Invalidate that cache after ordinary
setters, failed writes, and lifecycle changes.

Include the remaining scan, preamble, settling, and memory-soak experiments,
their collectors, validation notes, and original capture records. Preserve
capture bytes across checkouts and keep private soak credentials local.

Run lab collector and compiled contract tests in CI. Update the expectation,
profile mapping, and result-buffer tests for the extended lab tools, and make
the private WiFi override header optional for ordinary soak diagnostics.

Validation: 145 host tests passed from the staged source snapshot. Clean
heltec_v4_repeater and Xiao_S3_WIO_companion_radio_usb builds passed their
RAM/flash gates. All 229 staged capture files retain their original bytes;
all 75 local documentation links resolve in the clean snapshot.
2026-09-14 22:34:17 -07:00

153 lines
4.2 KiB
INI

; RAM-only production-wrapper timing experiment. Enable from platformio.local.ini:
; [platformio]
; extra_configs = variants/*/platformio.ini
; tools/hil/profile_switch.ini
[env:profile_switch_xiao]
extends = arduino_base
platform = platformio/espressif32@6.11.0
board = seeed_xiao_esp32s3
; Native USB ignores UART baud; avoid the legacy uploader's baud-change step.
upload_speed = 115200
lib_deps =
SPI
Wire
https://github.com/jgromes/RadioLib.git#187ef24791c3d844939b2be13a68bd890bd04e4c
rweather/Crypto @ ^0.4.0
build_flags =
${arduino_base.build_flags}
-D ESP32_PLATFORM
-D MC_SX1262_HIL
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D USE_SX1262
-D P_LORA_DIO_1=39
-D P_LORA_NSS=41
-D P_LORA_RESET=42
-D P_LORA_BUSY=40
-D P_LORA_SCLK=7
-D P_LORA_MISO=8
-D P_LORA_MOSI=9
-D SX126X_RXEN=38
-D SX126X_TXEN=RADIOLIB_NC
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=0
-D LORA_TX_POWER=0
build_src_filter =
+<helpers/radiolib/RadioLibWrappers.cpp>
+<helpers/UsbLogging.cpp>
+<../tools/hil/profile_switch.cpp>
[env:profile_switch_indicator]
extends = arduino_base
platform = platformio/espressif32@6.11.0
board = esp32-s3-devkitc-1
board_upload.flash_size = 8MB
lib_deps =
${env:profile_switch_xiao.lib_deps}
lovyan03/LovyanGFX @ ^1.2.7
build_flags =
${arduino_base.build_flags}
-D ESP32_PLATFORM
-D HIL_INDICATOR
-D MC_SX1262_HIL
-D SENSECAP_INDICATOR_LORA
-I variants/sensecap_indicator-espnow
-D PIN_BOARD_SDA=39
-D PIN_BOARD_SCL=40
-D USE_SX1262
-D P_LORA_SCLK=41
-D P_LORA_MISO=47
-D P_LORA_MOSI=48
-D P_LORA_NSS=64
-D P_LORA_RESET=65
-D P_LORA_BUSY=66
-D P_LORA_DIO_1=67
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=2.4
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D LORA_TX_POWER=0
build_src_filter =
${env:profile_switch_xiao.build_src_filter}
+<../variants/sensecap_indicator-espnow/IndicatorRadioHal.cpp>
[env:profile_switch_heltec_v4]
extends = arduino_base
platform = platformio/espressif32@6.11.0
; Minimal HIL uses explicit production V4 pins, no display/PSRAM/application.
board = esp32-s3-devkitc-1
board_upload.flash_size = 16MB
board_build.partitions = default_16MB.csv
upload_speed = 115200
lib_deps = ${env:profile_switch_xiao.lib_deps}
build_flags =
${arduino_base.build_flags}
-D ESP32_PLATFORM
-D MC_SX1262_HIL
-D HIL_HELTEC_V4
-I variants/heltec_v4
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D USE_SX1262
-D P_LORA_DIO_1=14
-D P_LORA_NSS=8
-D P_LORA_RESET=12
-D P_LORA_BUSY=13
-D P_LORA_SCLK=9
-D P_LORA_MISO=11
-D P_LORA_MOSI=10
-D P_LORA_PA_POWER=7
-D P_LORA_GC1109_PA_EN=2
-D P_LORA_GC1109_PA_TX_EN=46
-D P_LORA_KCT8103L_PA_CSD=2
-D P_LORA_KCT8103L_PA_CTX=5
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_REGISTER_PATCH=1
-D SX126X_RX_BOOSTED_GAIN=1
-D LORA_TX_POWER=0
build_src_filter =
${env:profile_switch_xiao.build_src_filter}
+<../variants/heltec_v4/LoRaFEMControl.cpp>
[env:profile_switch_xiao_nrf52_tx]
extends = arduino_base
platform = nordicnrf52
platform_packages = ${nrf52_base.platform_packages}
board = seeed-xiao-afruitnrf52-nrf52840
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
board_build.variants_dir = tools/hil
board_build.variant = xiao_nrf52_variant
board_upload.maximum_size = 708608
upload_protocol = nrfutil
extra_scripts =
create-uf2.py
pre:scripts/nrf52_usb_power_fix.py
lib_deps = ${env:profile_switch_xiao.lib_deps}
lib_ignore = PsychicMqttClient
build_flags =
${arduino_base.build_flags}
-D NRF52_PLATFORM
-I lib/nrf52/s140_nrf52_7.3.0_API/include
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
-D PIN_WIRE_SCL=PIN_NFC1
-D PIN_WIRE_SDA=PIN_NFC2
-D USE_SX1262
-D P_LORA_DIO_1=D1
-D P_LORA_RESET=D2
-D P_LORA_BUSY=D3
-D P_LORA_NSS=D4
-D SX126X_RXEN=D5
-D SX126X_TXEN=RADIOLIB_NC
-D SX126X_DIO2_AS_RF_SWITCH=1
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D LORA_TX_POWER=0
build_src_filter =
+<helpers/UsbLogging.cpp>
+<../tools/hil/profile_switch_nrf52_tx.cpp>