Files
RTNode-HeltecV4/platformio.ini
James L 8184000d17 v1.0.6: Fix link establishment through boundary node
Bug fixes:
- Fix path_request_handler hops: use DestinationEntry._hops instead of
  stale cached announce_packet.hops(). The cached packet retains its
  original wire hops (pre-increment), but Python Transport.py explicitly
  overwrites packet.hops from path_table after retrieval (line 2736).
  This caused PATH_RESPONSE to report fewer hops than actual, making
  the sender's expected_hops too low, which caused LRPROOF hop-count
  validation to silently fail. (ROOT CAUSE of link timeout)

- Fix std::map::insert() no-op: erase before insert at 3 locations in
  _announce_table. Unlike Python dict assignment, C++ map::insert()
  does not overwrite existing keys. This prevented announce table
  updates from taking effect. (Caused PATH-RESP delivery failure)

- Defer packet hash filtering for link table entries and LRPROOF
  packets. Matching Python Transport behavior (line 1544), packets
  belonging to active links are not added to the filter hashlist
  until link transport processing determines it is our turn to
  forward them. Prevents premature filtering that breaks link transport.

- Pass DestinationEntry and LinkEntry by reference instead of by value
  to avoid stale copies and unnecessary allocations.

- Add link_table check before requesting paths for link_id destinations.
  Link data packets are handled by link transport, not standard path
  lookup, so spurious path requests are avoided.

- Add culling for _held_announces (60s timeout, cap 32) and
  _boundary_local_addresses to prevent unbounded memory growth.

- TcpInterface: detect and log partial writes.
2026-02-28 15:00:40 -05:00

563 lines
13 KiB
INI
Executable File

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
; Change source and include directories to root of project since RNode places them here
include_dir = .
src_dir = .
[env]
framework = arduino
monitor_speed = 115200
upload_speed = 460800
build_flags =
-Wall
;-Wextra
-Wno-missing-field-initializers
-Wno-format
-I.
; CBA Define following to disable DEBUG build
;-DNDEBUG
; CBA Define following to include RNS stack
-DHAS_RNS
-DRNS_USE_FS
-DRNS_PERSIST_PATHS
-DMSGPACK_USE_BOOST=OFF
; CBA Define following to disable LFS asserts
;-DLFS_NO_ASSERT
; ???
;-DLFS_YES_TRACE
; ???
;-DCORE_DEBUG_LEVEL=5
; ??? NO
;-DLOG_LOCAL_LEVEL=5
;-DCONFIG_LOG_DEFAULT_LEVEL=5
lib_deps =
ArduinoJson@^7.4.2
MsgPack@^0.4.2
adafruit/Adafruit SSD1306@^2.5.9
https://github.com/attermann/Crypto.git
; Exclude directories in root from sources
build_src_filter = +<*> -<variants/>
extra_scripts = pre:extra_script.py
[env:rnode-ng-20]
platform = espressif32
board = ttgo-lora32-v2
custom_variant = ng20
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_RNODE_NG_20
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
adafruit/Adafruit NeoPixel@^1.12.0
[env:rnode-ng-21]
platform = espressif32
board = ttgo-lora32-v21
custom_variant = ng21
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_RNODE_NG_21
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
adafruit/Adafruit NeoPixel@^1.12.0
[env:ttgo-t-beam]
platform = espressif32
board = ttgo-t-beam
custom_variant = tbeam
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_TBEAM
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-t-beam-sx1262]
platform = espressif32
board = ttgo-t-beam
custom_variant = tbeam_sx1262
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_TBEAM
-DMODEM=SX1262
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-t-beam-supreme]
platform = espressif32
board = ttgo-t-beam
custom_variant = tbeam_supreme
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_TBEAM_S_V1
-DMODEM=SX1262
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
Adafruit_SH110X
adafruit/Adafruit SH110X@^2.1.14
[env:lilygo-t3-s3]
platform = espressif32
board = lilygo-t3-s3
custom_variant = t3s3
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_T3S3
-DMODEM=SX1262
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:lilygo-t3-s3-sx127x]
platform = espressif32
board = lilygo-t3-s3
custom_variant = t3s3_sx127x
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_T3S3
-DMODEM=SX1276
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:lilygo-t3-s3-sx1280-pa]
platform = espressif32
board = lilygo-t3-s3
custom_variant = t3s3_sx1280_pa
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_T3S3
-DMODEM=SX1280
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:lilygo-t-deck]
platform = espressif32
board = esp32-s3-devkitc-1
custom_variant = tdeck
board_build.filesystem = littlefs
; Flash / memory layout
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
; Enable PSRAM + correct flash mode
board_build.flash_mode = qio
board_build.psram_type = opi
board_build.arduino.memory_type = qio_opi
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_TDECK
-DBOARD_HAS_PSRAM=1
-DARDUINO_USB_MODE=1
-DCORE_DEBUG_LEVEL=1
; Enable UARDUINO_ USB_ CDC_ ON_ BOOT will start printing and wait for terminal access during startup
-DARDUINO_USB_CDC_ON_BOOT=1
; Enable UARDUINO_USB_CDC_ON_BOOT will turn off printing and will not block when using the battery
; -UARDUINO_USB_CDC_ON_BOOT
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v1]
platform = espressif32
board = ttgo-lora32-v1
custom_variant = lora32v10
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V1_0
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v2]
platform = espressif32
board = ttgo-lora32-v2
custom_variant = lora32v20
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_0
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v2-extled]
platform = espressif32
board = ttgo-lora32-v2
custom_variant = lora32v20_extled
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V1_0
-DEXTERNAL_LEDS=true
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v21]
platform = espressif32
board = ttgo-lora32-v21
custom_variant = lora32v21
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v21-extled]
platform = espressif32
board = ttgo-lora32-v21
custom_variant = lora32v21_extled
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
-DEXTERNAL_LEDS=true
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:ttgo-lora32-v21-tcxo]
platform = espressif32
board = ttgo-lora32-v21
custom_variant = lora32v21_extled
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
-DENABLE_TCXO=true
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:heltec_wifi_lora_32_V2]
platform = espressif32
board = heltec_wifi_lora_32_V2
custom_variant = heltec32v2
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:heltec_wifi_lora_32_V2-extled]
platform = espressif32
board = heltec_wifi_lora_32_V2
custom_variant = heltec32v2_extled
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
-DEXTERNAL_LEDS=true
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:heltec_wifi_lora_32_V3]
platform = espressif32
board = heltec_wifi_lora_32_V3
custom_variant = heltec32v3
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V3
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:heltec_V3_boundary]
platform = espressif32
board = heltec_wifi_lora_32_V3
custom_variant = heltec32v3
board_build.filesystem = littlefs
; Flash / memory layout for 8MB flash + 8MB PSRAM (QSPI)
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = default_8MB.csv
board_build.flash_mode = qio
board_build.psram_type = qio
board_build.arduino.memory_type = qio_qspi
monitor_speed = 921600
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V3
-DBOARD_HAS_PSRAM=1
-DBOUNDARY_MODE
;-DNDEBUG
-DRNS_USE_TLSF=1
-DRNS_USE_ALLOCATOR=1
; --- Boundary mode defaults (override via EEPROM at runtime) ---
; TCP server mode (0=server, 1=client)
-DBOUNDARY_TCP_MODE=0
; TCP listen/connect port
-DBOUNDARY_TCP_PORT=4242
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
monitor_filters = esp32_exception_decoder
[env:heltec_wifi_lora_32_V4]
platform = espressif32
board = esp32-s3-devkitc-1
custom_variant = heltec32v4
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V4
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:heltec_V4_boundary]
platform = espressif32
board = esp32-s3-devkitc-1
custom_variant = heltec32v4_boundary
board_build.filesystem = littlefs
; Flash / memory layout for 16MB flash + 2MB PSRAM
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
board_build.flash_mode = qio
board_build.psram_type = qio
board_build.arduino.memory_type = qio_qspi
monitor_speed = 921600
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V4
-DARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM=1
-DBOUNDARY_MODE
;-DNDEBUG
-DRNS_USE_TLSF=1
-DRNS_USE_ALLOCATOR=1
; --- Boundary mode defaults (override via EEPROM at runtime) ---
; TCP server mode (0=server, 1=client)
-DBOUNDARY_TCP_MODE=0
; TCP listen/connect port
-DBOUNDARY_TCP_PORT=4242
; Backbone host for client mode (empty = server mode)
; -DBOUNDARY_BACKBONE_HOST=\"192.168.1.100\"
; -DBOUNDARY_BACKBONE_PORT=4242
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
monitor_filters = esp32_exception_decoder
[env:heltec_V4_boundary-local]
platform = espressif32
board = esp32-s3-devkitc-1
custom_variant = heltec32v4_boundary_local
board_build.filesystem = littlefs
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
board_build.flash_mode = qio
board_build.psram_type = qio
board_build.arduino.memory_type = qio_qspi
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V4
-DARDUINO_USB_CDC_ON_BOOT=1
-DBOARD_HAS_PSRAM=1
-DBOUNDARY_MODE
-DBOUNDARY_TCP_MODE=0
-DBOUNDARY_TCP_PORT=4242
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
monitor_filters = esp32_exception_decoder
[env:featheresp32]
platform = espressif32
board = featheresp32
custom_variant = featheresp32
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HUZZAH32
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:seeed_xiao_esp32s3]
platform = espressif32
board = seeed_xiao_esp32s3
custom_variant = xiao_esp32s3
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_XIAO_S3
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:generic-esp32]
platform = espressif32
board = esp32dev
custom_variant = esp32_generic
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_GENERIC_ESP32
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
[env:wiscore_rak4631]
platform = nordicnrf52
board = rak4630
custom_variant = rak4631
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_src_filter = ${env.build_src_filter} +<variants/rak4630>
build_flags =
${env.build_flags}
-I variants/rak4630
-fexceptions
-DBOARD_MODEL=BOARD_RAK4631
-DRNS_USE_TLSF=1
-DRNS_USE_ALLOCATOR=1
lib_deps =
${env.lib_deps}
[env:ttgo-t-beam-local]
platform = espressif32
board = ttgo-t-beam
upload_speed = 460800
custom_variant = tbeam_local
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-fexceptions
-DBOARD_MODEL=BOARD_TBEAM
; CBA TEST
;-DUSE_FLASHFS=1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
Adafruit_SPIFlash=symlink://../Adafruit_SPIFlash
monitor_filters = esp32_exception_decoder
[env:ttgo-lora32-v21-local]
platform = espressif32
board = ttgo-lora32-v21
upload_speed = 460800
custom_variant = lora32v21_local
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_LORA32_V2_1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
monitor_filters = esp32_exception_decoder
[env:heltec_wifi_lora_32_V4-local]
platform = espressif32
board = esp32-s3-devkitc-1
custom_variant = heltec32v4_local
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-DBOARD_MODEL=BOARD_HELTEC32_V4
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
${env.lib_deps}
XPowersLib@^0.2.1
monitor_filters = esp32_exception_decoder
[env:wiscore_rak4631-local]
platform = nordicnrf52
board = rak4630
custom_variant = rak4631_local
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_src_filter = ${env.build_src_filter} +<variants/rak4630>
build_flags =
${env.build_flags}
-I variants/rak4630
-fexceptions
-DBOARD_MODEL=BOARD_RAK4631
; CBA TEST
-DRNS_USE_TLSF=1
-DRNS_USE_ALLOCATOR=1
;-DUSE_FLASHFS=1
build_unflags = -fno-exceptions
lib_deps =
${env.lib_deps}
Adafruit_SPIFlash=symlink://../Adafruit_SPIFlash
[env:heltec_t114_local]
;upload_port = /dev/cu.usbmodem1101
platform = nordicnrf52
board = nrf52840_dk_adafruit
custom_variant = heltec_t114_local
board_build.partitions = no_ota.csv
board_build.filesystem = littlefs
build_flags =
${env.build_flags}
-fexceptions
-DBOARD_MODEL=BOARD_HELTEC_T114
; CBA TEST
-DRNS_USE_TLSF=1
-DRNS_USE_ALLOCATOR=1
build_unflags = -fno-exceptions
lib_deps =
${env.lib_deps}
https://github.com/liamcottle/esp8266-oled-ssd1306#e16cee124fe26490cb14880c679321ad8ac89c95
adafruit/Adafruit NeoPixel@^1.12.0