Xteink-X4-crosspoint-reader/platformio.ini
Claude 865ee21b64
Add TCP/IP stack tuning for better WiFi throughput
Configure lwIP stack with larger buffers:
- TCP_MSS: 1460 (full ethernet frame)
- TCP send/receive buffers: 5744 bytes (4x MSS)
- Increased mailbox sizes for better packet queuing
- Enable out-of-order segment queuing

Note: The ~200 KB/s limit appears to be inherent to the synchronous
ESP32 WebServer library. For significantly higher speeds (500KB-1MB/s),
consider migrating to ESPAsyncWebServer or raw TCP sockets.
2026-01-11 01:39:05 +00:00

67 lines
1.8 KiB
INI

[platformio]
crosspoint_version = 0.12.0
default_envs = default
[base]
platform = espressif32 @ 6.12.0
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
check_tool = cppcheck
check_flags = --enable=all --suppress=missingIncludeSystem --suppress=unusedFunction --suppress=unmatchedSuppression --suppress=*:*/.pio/* --inline-suppr
check_skip_packages = yes
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_upload.offset_address = 0x10000
build_flags =
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DMINIZ_NO_ZLIB_COMPATIBLE_NAMES=1
-DEINK_DISPLAY_SINGLE_BUFFER_MODE=1
-DDISABLE_FS_H_WARNING=1
# https://libexpat.github.io/doc/api/latest/#XML_GE
-DXML_GE=0
-DXML_CONTEXT_BYTES=1024
-std=c++2a
# Enable UTF-8 long file names in SdFat
-DUSE_UTF8_LONG_NAMES=1
# TCP/IP stack tuning for better WiFi upload performance
-DCONFIG_LWIP_TCP_MSS=1460
-DCONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
-DCONFIG_LWIP_TCP_WND_DEFAULT=5744
-DCONFIG_LWIP_TCP_RECVMBOX_SIZE=12
-DCONFIG_LWIP_TCP_QUEUE_OOSEQ=1
-DCONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
; Board configuration
board_build.flash_mode = dio
board_build.flash_size = 16MB
board_build.partitions = partitions.csv
extra_scripts =
pre:scripts/build_html.py
; Libraries
lib_deps =
BatteryMonitor=symlink://open-x4-sdk/libs/hardware/BatteryMonitor
InputManager=symlink://open-x4-sdk/libs/hardware/InputManager
EInkDisplay=symlink://open-x4-sdk/libs/display/EInkDisplay
SDCardManager=symlink://open-x4-sdk/libs/hardware/SDCardManager
ArduinoJson @ 7.4.2
QRCode @ 0.0.1
[env:default]
extends = base
build_flags =
${base.build_flags}
-DCROSSPOINT_VERSION=\"${platformio.crosspoint_version}-dev\"
[env:gh_release]
extends = base
build_flags =
${base.build_flags}
-DCROSSPOINT_VERSION=\"${platformio.crosspoint_version}\"