; 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 ; http://docs.platformio.org/page/projectconf.html ; Build options ; ; Build features ; - ENABLE_DEBUG - Turn on general debug options ; - ENABLE_DEBUG_WEB - Enable debug of the web server (noisy) ; - ENABLE_DEBUG_RAPI - Enable debug of the RAPI code (noisy) ; - ENABLE_PROFILE - Turn on the profiling ; - ENABLE_OTA - Enable Arduino OTA update ; - ENABLE_ASYNC_WIFI_SCAN - Enable use of the async WiFI scanning, requires Git version of ESP core ; ; Config ; - WIFI_LED - Define the pin to use for (and enable) WiFi status LED notifications ; - DEBUG_PORT - The port to use for debug messages, Serial is used for RAPI so if connected to an ; OpenEVSE you [platformio] data_dir = src/data default_envs = openevse_wifi_v1 [common] # core-3.x platform for 16MB+ boards (pioarduino / Arduino-ESP32 3.x on ESP-IDF 5.x). # 4MB boards stay on the core-2.x default ([env] platform = espressif32@6.12.0). # Envs that want core-3 set: platform = ${common.platform_core3} platform_core3 = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip lib_deps = bblanchon/ArduinoJson@6.20.1 https://github.com/jeremypoulter/ArduinoMongoose.git#ca0a817de014cf4ab1833b32383532366fca10d7 ; master: mbedTLS-3 port + unique SUBSCRIBE ids + TLS teardown UAF fix (97ff3b4) jeremypoulter/Micro Debug@0.0.5 jeremypoulter/ConfigJson@0.0.6 https://github.com/OpenEVSE/OpenEVSE_Lib.git#v0.0.20 ; OpenEVSE library with D9 command support (protocol-gated) jeremypoulter/ESPAL@0.0.7 jeremypoulter/StreamSpy@0.0.2 jeremypoulter/MicroTasks@0.0.4 matth-x/MicroOcpp@1.2.0 matth-x/MicroOcppMongoose@1.2.0 lib_ignore = WebSockets ; MicroOcpp: don't compile built-in WS library extra_scripts = pre:scripts/auto_fw_version.py scripts/extra_script.py debug_flags = -ggdb -D ENABLE_FULL_RAPI -D ENABLE_DEBUG #-D ENABLE_DEBUG_WEB #-D ENABLE_DEBUG_WEB_REQUEST #-D ENABLE_DEBUG_SCHEDULER #-D ENABLE_DEBUG_TIME -D ENABLE_DEBUG_EVSE_MAN #-D ENABLE_DEBUG_EVSE_MONITOR #-D ENABLE_DEBUG_DIVERT #-D ENABLE_DEBUG_LED #-D ENABLE_DEBUG_LCD #-D ENABLE_DEBUG_MQTT #-D ENABLE_DEBUG_EMONCMS #-D ENABLE_DEBUG_TESLA_CLIENT #-D ENABLE_DEBUG_LIMIT #-D ENABLE_PROFILE #-D ENABLE_DEBUG_HTTP_UPATE #-D ENABLE_NOISY_PROFILE #-D ENABLE_DEBUG_MICROTASKS #-D ENABLE_DEBUG_ENERGY_METER #-D ENABLE_DEBUG_MEMORY_MONITOR #-D ENABLE_DEBUG_CETRIFICATES #-D ENABLE_DEBUG_WEB_CETRIFICATES #-D ENABLE_DEBUG_MONGOOSE_MQTT_CLIENT #-D ENABLE_DEBUG_SCREEN_MANAGER #-D ENABLE_DEBUG_SCREEN_RENDERER #-D ENABLE_DEBUG_SCREEN_CHARGE #-D ENABLE_DEBUG_SCREEN_BOOT feature_flags = -D MG_ENABLE_SSL=1 -D MG_ENABLE_HTTP_STREAMING_MULTIPART=1 -D MG_ENABLE_EXTRA_ERRORS_DESC=1 #-D ARDUINO_MONGOOSE_DEFAULT_STREAM_BUFFER=2048 #-D ARDUINO_MONGOOSE_SEND_BUFFER_SIZE=2048 #-D ENABLE_DEBUG #-D CS_ENABLE_DEBUG #-D MBEDTLS_DEBUG_C -D MG_ENABLE_SNTP=1 #-D ENABLE_DEBUG_MICROTASKS -D MO_CUSTOM_WS ; MicroOcpp: don't use built-in WS library -D MO_CUSTOM_CONSOLE ; MicroOcpp: use custom debug out -D MO_DBG_LEVEL=MO_DL_INFO -D MO_TRAFFIC_OUT -D MO_MG_VERSION_614 ; use MG v6.14 #-D ENABLE_DEBUG #-D ENABLE_DEBUG_MONGOOSE_HTTP_CLIENT -D RAPI_MAX_COMMANDS=20 -D BUILD_ENV_NAME="$PIOENV" -D MG_MAX_HTTP_REQUEST_SIZE=8196 build_flags = ; NB: no `-D ESP32` here -- the Arduino framework already defines it, and on ; the two platforms it does so with different values: core-2.x defines it ; bare (= 1) while core-3.x/pioarduino has arduino-esp32 export ; `-DESP32=ESP32` from its CMakeLists as a PUBLIC compile option. Adding our ; own bare `-D ESP32` on top of that made gcc warn `"ESP32" redefined` for ; every core-3 translation unit. Nothing here tests ESP32 arithmetically ; (only #ifdef / defined()), so the framework's definition is all we need. -D ARDUINO_ARCH_ESP32 -D USE_ESP32 -D USE_ESP32_FRAMEWORK_ARDUINO -D CS_PLATFORM=CS_P_ESP32 -D MG_SSL_IF=MG_SSL_IF_MBEDTLS -D MG_SSL_IF_MBEDTLS_FREE_CERTS=1 #-D MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN=2048 ${common.feature_flags} build_flags_openevse_tft = ${common.build_flags} ${common.gfx_display_hw_flags} -D TFT_BACKLIGHT_CHARGING_THRESHOLD=0.1 -D NEO_PIXEL_PIN=26 -D NEO_PIXEL_LENGTH=4 -D WIFI_PIXEL_NUMBER=1 -D WIFI_BUTTON=0 -D WIFI_BUTTON_PRESSED_STATE=LOW -D I2C_SDA=22 -D I2C_SCL=21 -D ENABLE_WS2812FX -D ENABLE_MCP9808 -D ENABLE_PN532 ; UART2 pins, pinned explicitly. Both TFT envs put something on Serial2 -- ; the release env its debug console, the _dev env the RAPI link to the ; OpenEVSE -- and neither can rely on the core's default any more: ; arduino-esp32 2.0.17 defaulted ESP32 UART2 to RX2=16/TX2=17, but 3.x ; (HardwareSerial.h, "Default pins for UART2 are arbitrary") changed it to ; RX2=4/TX2=25. Nothing is wired to 4/25 on this board, so begin() succeeds ; on dead pins and the only symptom is silence -- for _dev that reads as ; "OpenEVSE not responding or not connected". The ch_denky variant defines ; no RX2/TX2 of its own, so this is the only thing holding the pins. -D RX2=16 -D TX2=17 build_partitions = min_spiffs.csv build_partitions_debug = min_spiffs_debug.csv build_partitions_16mb = openevse_16mb.csv neopixel_lib = adafruit/Adafruit NeoPixel@1.15.5 ws2812fx_lib = kitesurfer1404/WS2812FX@1.4.7 gfx_display_libs = # lvgl/lvgl@^8.3.9 bodmer/TFT_eSPI@^2.5.43 bitbank2/PNGdec@^1.1.5 SPI # TFT panel hardware (ILI9488 driver, pins, SPI) WITHOUT enabling any on-device # renderer. Shared by the legacy TFT_eSPI renderer and the LVGL renderer. gfx_display_hw_flags = -D USER_SETUP_LOADED -D ILI9488_DRIVER -D TFT_WIDTH=320 -D TFT_HEIGHT=480 -D TFT_BL=27 -D TFT_MISO=12 -D TFT_MOSI=13 -D TFT_SCLK=14 -D TFT_CS=15 -D TFT_DC=2 -D TFT_RST=-1 -D TOUCH_CS=33 # -D LOAD_GLCD # -D LOAD_FONT2 # -D LOAD_FONT4 # -D LOAD_FONT6 # -D LOAD_FONT7 # -D LOAD_FONT8 -D LOAD_GFXFF # -D SMOOTH_FONT # -D SPI_FREQUENCY=15999999 # -D SPI_FREQUENCY=20000000 # -D SPI_FREQUENCY=27000000 -D SPI_FREQUENCY=40000000 # -D SPI_FREQUENCY=55000000 # -D SPI_FREQUENCY=65000000 # -D SPI_FREQUENCY=80000000 -D SPI_READ_FREQUENCY=20000000 -D SPI_TOUCH_FREQUENCY=600000 # LVGL renderer (src/lcd_lvgl.cpp, src/lvgl_tft/). This is the renderer for the # stock ILI9488 TFT — the openevse_wifi_tft_v1.* envs default it on via this # fragment. TFT_eSPI is still the low-level ILI9488 SPI driver underneath. lvgl_tft_renderer_flags = -D ENABLE_SCREEN_LVGL_TFT -D LV_CONF_INCLUDE_SIMPLE -D LV_CONF_SUPPRESS_DEFINE_CHECK -D LCD_BACKLIGHT_TIMEOUT_DEFAULT=600 # idle-timeout default for the LVGL TFT (seconds) -I src/lvgl_tft # Legacy TFT_eSPI immediate-mode renderer (src/screens/, src/lcd_tft.cpp). # Superseded by the LVGL renderer on the stock TFT; retained in-tree for the # Elecrow ESP32 HMI board (env:elecrow_esp32_hmi_dev), which still selects it. gfx_display_build_flags = ${common.gfx_display_hw_flags} -D ENABLE_SCREEN_LCD_TFT [env] # specify exact Arduino ESP SDK version, requires platformio 3.5+ (curently dev version) # http://docs.platformio.org/en/latest/projectconf/section_env_general.html#platform #platform = https://github.com/platformio/platform-espressif32.git#feature/stage #platform = https://github.com/platformio/platform-espressif32.git#develop #platform = espressif32@1.11.1 platform = espressif32@7.1.0 #framework = arduino, espidf framework = arduino lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} build_flags = ${common.build_flags} #upload_port = openevse.local upload_speed = 921600 extra_scripts = ${common.extra_scripts} board_build.partitions = ${common.build_partitions} #platform_packages = # ; use a special branch # framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0 # platformio/framework-arduinoespressif32 @ ~3.10006.0 monitor_speed = 115200 monitor_filters = esp32_exception_decoder [env:nodemcu-32s] board = nodemcu-32s build_flags = ${common.build_flags} ${common.debug_flags} -D WIFI_LED=2 -D WIFI_LED_ON_STATE=LOW -D RAPI_PORT=Serial2 [env:espressif_esp-wrover-kit] board = esp-wrover-kit lib_deps = ${common.lib_deps} ${common.neopixel_lib} build_flags = ${common.build_flags} ${common.debug_flags} -D WIFI_BUTTON=2 -D RAPI_PORT=Serial1 -D NEO_PIXEL_PIN=18 -D NEO_PIXEL_LENGTH=2 -D WIFI_PIXEL_NUMBER=1 -D RED_LED=0 -D GREEN_LED=2 -D BLUE_LED=4 -D RX1=25 -D TX1=27 #upload_port = openevse.local #upload_protocol = espota upload_speed = 2000000 #upload_protocol = ftdi #debug_tool = ftdi #board_build.partitions = ${common.build_partitions_debug} # export PLATFORMIO_UPLOAD_PORT=172.16.0.157 # export PLATFORMIO_UPLOAD_FLAGS="-p 3232" [env:espressif_esp-wrover-kit_latest] extends = env:espressif_esp-wrover-kit platform = espressif32 [env:adafruit_huzzah32_dev] board = featheresp32 build_flags = ${common.build_flags} ${common.debug_flags} -D WIFI_LED=13 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=0 -D WIFI_BUTTON_PRESSED_STATE=LOW -D RAPI_PORT=Serial -D DEBUG_PORT=Serial2 [env:adafruit_huzzah32] board = featheresp32 build_flags = ${common.build_flags} -D WIFI_LED=13 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=0 -D WIFI_BUTTON_PRESSED_STATE=LOW -D RAPI_PORT=Serial -D DEBUG_PORT=Serial2 [env:adafruit_featheresp32] board = featheresp32 build_flags = ${common.build_flags} ${common.debug_flags} -D WIFI_LED=LED_BUILTIN -D WIFI_BUTTON=LED_BUILTIN -D RAPI_PORT=Serial2 -D ENABLE_DEBUG_LED [env:openevse_wifi_v1] board = esp32dev lib_deps = ${common.lib_deps} ${common.neopixel_lib} adafruit/Adafruit MCP9808 Library @ 2.0.2 build_flags = ${common.build_flags} ${common.debug_flags} -D NEO_PIXEL_PIN=17 -D NEO_PIXEL_LENGTH=14 -D WIFI_PIXEL_NUMBER=1 -D WIFI_BUTTON=0 -D WIFI_BUTTON_PRESSED_STATE=LOW -D RAPI_PORT=Serial -D DEBUG_PORT=Serial1 -D I2C_SDA=21 -D I2C_SCL=22 -D ENABLE_MCP9808 -D ENABLE_PN532 -D TX1=16 -D ENABLE_FLASH_MIGRATE upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update --progress-bar | cat [env:olimex_esp32-gateway-old] # For hardware older than RevE board = esp32-gateway build_flags = ${common.build_flags} -D WIFI_LED=33 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=34 -D WIFI_BUTTON_PRESSED_STATE=LOW -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 -D ENABLE_WIRED_ETHERNET # https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/ETH_LAN8720/ETH_LAN8720.ino [env:olimex_esp32-gateway-f] # For hardware RevF and RevG # https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md board = esp32-gateway build_flags = ${common.build_flags} -D WIFI_LED=33 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=34 -D WIFI_BUTTON_PRESSED_STATE=LOW -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 -D ENABLE_WIRED_ETHERNET -D RESET_ETH_PHY_ON_BOOT=1 -D RX2=16 -D TX2=32 board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY_F" upload_speed = 921600 [env:olimex_esp32-gateway-e] # For hardware RevE # https://github.com/OpenEVSE/ESP32_WiFi_V3.x/blob/master/docs/wired-ethernet.md extends = env:olimex_esp32-gateway-f build_flags = ${env:olimex_esp32-gateway-f.build_flags} board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY_E" [env:olimex_esp32-gateway-e_dev] extends = env:olimex_esp32-gateway-e build_flags = ${env:olimex_esp32-gateway-e.build_flags} ${common.debug_flags} build_type = debug board_build.partitions = ${common.build_partitions_debug} [env:olimex_esp32-gateway-f_dev] extends = env:olimex_esp32-gateway-f build_flags = ${env:olimex_esp32-gateway-f.build_flags} ${common.debug_flags} build_type = debug board_build.partitions = ${common.build_partitions_debug} [env:olimex_esp32-poe-iso] # Tested against Rev C board board = esp32-poe-iso build_flags = ${common.build_flags} -D WIFI_BUTTON=34 -D WIFI_BUTTON_PRESSED_STATE=LOW -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 -D ENABLE_WIRED_ETHERNET -D RESET_ETH_PHY_ON_BOOT=1 upload_speed = 921600 [env:heltec_esp32-wifi-lora-v2] board = heltec_wifi_lora_32_V2 build_flags = ${common.build_flags} -D DEBUG_PORT=Serial -D WIFI_LED=25 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=2 -D WIFI_BUTTON_PRESSED_STATE=LOW -D RAPI_PORT=Serial1 -D RX1=25 -D TX1=27 [env:wt32-eth01] # For Wireless Tag board = wt32-eth01 build_flags = ${common.build_flags} -D WIFI_LED=12 -D WIFI_LED_ON_STATE=HIGH -D WIFI_BUTTON=4 -D WIFI_BUTTON_PRESSED_STATE=LOW # -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 -D ENABLE_WIRED_ETHERNET -D RESET_ETH_PHY_ON_BOOT=1 -D RX2=5 -D TX2=17 -D ETH_PHY_TYPE=ETH_PHY_LAN8720 -D ETH_PHY_ADDR=1 -D ETH_PHY_MDC=23 -D ETH_PHY_MDIO=18 -D ETH_CLK_MODE=ETH_CLOCK_GPIO0_IN -D ETH_PHY_POWER=16 [env:wt32-eth01-ws2812] # For Wireless Tag board = wt32-eth01 lib_deps = ${common.lib_deps} ${common.neopixel_lib} ${common.ws2812fx_lib} adafruit/Adafruit MCP9808 Library @ 2.0.2 build_flags = ${common.build_flags} #-D WIFI_LED=12 #-D WIFI_LED_ON_STATE=HIGH -D NEO_PIXEL_PIN=12 -D NEO_PIXEL_LENGTH=15 -D ENABLE_WS2812FX -D WIFI_PIXEL_NUMBER=1 -D WIFI_BUTTON=4 -D WIFI_BUTTON_PRESSED_STATE=LOW # -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 # If using PN532 RFID reader through I2C # Need to comment pin definition for SDA and SCL at .platformio/packages/framework-arduinoespressif32/variants/wt32-eth01/pins_arduino.h #-D I2C_SDA=2 #-D I2C_SCL=4 #-D ENABLE_PN532 # If Using MCP9808 #-D SDA=2 #-D SCL=4 #-D ENABLE_MCP9808 -D ENABLE_WIRED_ETHERNET -D RESET_ETH_PHY_ON_BOOT=1 -D RX2=5 -D TX2=17 -D ETH_PHY_TYPE=ETH_PHY_LAN8720 -D ETH_PHY_ADDR=1 -D ETH_PHY_MDC=23 -D ETH_PHY_MDIO=18 -D ETH_CLK_MODE=ETH_CLOCK_GPIO0_IN -D ETH_PHY_POWER=16 [env:esp32-c3-devkitc-02] board = esp32-c3-devkitc-02 lib_deps = ${common.lib_deps} ${common.neopixel_lib} build_flags = ${common.build_flags} ${common.debug_flags} -D RAPI_PORT=Serial1 -D TX1=6 -D RX1=7 -D NEO_PIXEL_PIN=8 -D NEO_PIXEL_LENGTH=1 -D WIFI_PIXEL_NUMBER=1 [env:elecrow_esp32_hmi] board = denky32 build_flags = ${common.build_flags} -D DEBUG_PORT=Serial -D RAPI_PORT=Serial1 -D RX1=16 -D TX1=17 lib_deps = ${common.lib_deps} ${common.gfx_display_libs} [env:elecrow_esp32_hmi_dev] extends = env:elecrow_esp32_hmi build_flags = ${env:elecrow_esp32_hmi.build_flags} ${common.debug_flags} ${common.gfx_display_build_flags} upload_protocol = custom upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update #build_type = debug #board_build.partitions = ${common.build_partitions_debug} [env:openevse_wifi_tft_v1] board = denky32 platform = ${common.platform_core3} # Arduino as an ESP-IDF component ("hybrid" build): the ESP-IDF is compiled # from source (5.5.4 — the same IDF the prebuilt Arduino libs were built from, # so the resolved sdkconfig is bit-identical apart from the deliberate deltas # below) instead of being consumed as a prebuilt static-library bundle. # # Why: sdkconfig options are REAL Kconfig here, resolved by kconfgen against # the IDF's own Kconfig tree. Concretely that means an option which exists # actually takes effect instead of being a decorative line, its dependencies # are resolved for real, and anything it selects comes along automatically # (enabling CONFIG_MBEDTLS_DYNAMIC_BUFFER pulled in # CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y unasked). An unsatisfiable dependency # on a real symbol is visible in the resolved sdkconfig., so you can see # what you actually got. What this does NOT buy you: a symbol name that does # not exist at all is still dropped in silence, exactly as on the prebuilt # path — negative-tested 2026-08-25 with CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT, # build SUCCESS with no warning. Always confirm an option landed by grepping # the generated sdkconfig., never by the build exiting 0. # # The concrete payoff: enabling CONFIG_MBEDTLS_DYNAMIC_BUFFER now actually # rebuilds mbedtls with its own linker wrap flags for the mbedtls_ssl_* # symbols. Without this the option is inert (pioarduino's prebuilt path # silently drops such flags), and getting it would otherwise mean carrying 12 # hand-written linker wrap flags as build_flags. # See docs/superpowers/specs/2026-08-25-arduino-idf-component-design.md # and .superpowers/sdd/2026-08-25-arduino-idf-component/spike-report.md §4. # # `custom_sdkconfig` does NOT work in this mode (pioarduino gates it off when # "espidf" is in the framework list). The mechanism is the committed seed # files: sdkconfig.defaults (shared base) plus, for this env, the # sdkconfig.defaults.tls overlay selected via SDKCONFIG_DEFAULTS below. # # HAZARD: sdkconfig. is the authority once generated. After editing any # seed file you MUST delete sdkconfig.openevse_wifi_tft_v1 (or run # `pio run -t fullclean`) or the edit silently does nothing. framework = arduino, espidf # NOTE: no whitespace before the `;` separating the SDKCONFIG_DEFAULTS list # entries. PlatformIO's configparser treats " ;" as an inline comment and would # truncate the line without complaint, dropping the TLS overlay entirely # (symptom: the __wrap_mbedtls_ssl_* symbols vanish from firmware.elf). board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.tls build_flags = ${common.build_flags_openevse_tft} ${common.lvgl_tft_renderer_flags} -D ENABLE_TSDB -D DEBUG_PORT=Serial2 -D RAPI_PORT=Serial ; This board has no PSRAM and runs with ~60KB free heap, so it takes a ; smaller schedule table than the 50-entry default. 16 is well clear of any ; usage seen in the field and returns ~4.3KB of .bss. -D SCHEDULER_MAX_EVENTS=16 ; NB: raising ARDUINO_MONGOOSE_DEFAULT_STREAM_BUFFER was tried and reverted. ; At 4096 it did remove the realloc ladder, but every response -- including ; the 2-byte "{}" ones -- then reserved 4KB up front, and with a handful of ; concurrent connections that cost more than the fragmentation it cured ; (measured: /override went from 0 to 4,096 bytes of largest-block drop). ; The handlers that emit large bodies serialise into a right-sized buffer ; and write once instead; see handleStatus and handleConfigGet. lib_deps = ${common.lib_deps} ${common.gfx_display_libs} ${common.neopixel_lib} ${common.ws2812fx_lib} lvgl/lvgl@^8.3.9 adafruit/Adafruit MCP9808 Library @ 2.0.2 ${core3_tsdb_common.esp_tsdb_lib} board_build.partitions = ${common.build_partitions_16mb} board_upload.flash_size = 16MB board_build.flash_mode = qio board_build.f_flash = 80000000L [env:openevse_wifi_tft_v1_dev] extends = env:openevse_wifi_tft_v1 build_flags = ${common.build_flags_openevse_tft} ${common.lvgl_tft_renderer_flags} ${common.debug_flags} -D DEBUG_PORT=Serial -D RAPI_PORT=Serial2 #upload_protocol = custom #upload_command = curl -F firmware=@$SOURCE http://$UPLOAD_PORT/update build_type = debug # ───────────────────────────── core-3.x boards ───────────────────────────── # openevse_wifi_v1, rebuilt on the core-3 toolchain with a 16MB partition table. # Same feature set as the flagship openevse_wifi_v1 (PN532 + MCP9808 + NeoPixel); # the only difference is platform = core-3 and the larger flash layout. This is # the reference target proving the two-core build; feature work (tsdb, HA, P4, # the S3 display boards, …) stacks on top in later PRs. # Shared esp_tsdb lib_dep for ENABLE_TSDB targets (core-3 only). Pinned to an # exact version, not a range: a caret would let a future minor into firmware # builds without anyone deciding to take it. Dependency scanning still works on # an exact pin -- `pio pkg outdated` reports Current/Wanted/Latest -- which is # the reason this is a registry package rather than the git URL it used to be: # a URL dep is invisible to the scanner, so a new esp_tsdb release went # unnoticed until someone happened to look. # # v2.4.0 was the first release with the sidecar header write. Before it, the # database header was rewritten in place on every sample, and because LittleFS # stores a file as a CTZ skip-list a write at offset 0 rewrites the whole file # (~20 ms/KB) -- so once energy.tsdb passed ~170 KB the write exceeded # CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 and the unit boot-looped (#1207). Do not move # this pin back below v2.4.0. [core3_tsdb_common] esp_tsdb_lib = rar/esp_tsdb@2.4.3 [env:openevse_wifi_v1_16mb] board = esp32dev platform = ${common.platform_core3} # Hybrid build (arduino+espidf), same as openevse_wifi_tft_v1, but with NO # board_build.cmake_extra_args: this env gets only the shared sdkconfig.defaults # (16MB flash, stock mbedTLS) and deliberately skips the sdkconfig.defaults.tls # overlay — no TLS dynamic-buffer/wrap here, unlike the TFT env. framework = arduino, espidf lib_deps = ${common.lib_deps} ${common.neopixel_lib} adafruit/Adafruit MCP9808 Library @ 2.0.2 ${core3_tsdb_common.esp_tsdb_lib} build_flags = ${common.build_flags} ${common.debug_flags} -D ENABLE_TSDB -D NEO_PIXEL_PIN=17 -D NEO_PIXEL_LENGTH=14 -D WIFI_PIXEL_NUMBER=1 -D WIFI_BUTTON=0 -D WIFI_BUTTON_PRESSED_STATE=LOW -D RAPI_PORT=Serial -D DEBUG_PORT=Serial1 -D I2C_SDA=21 -D I2C_SCL=22 -D ENABLE_MCP9808 -D ENABLE_PN532 -D TX1=16 board_build.partitions = openevse_16mb.csv board_upload.flash_size = 16MB board_build.flash_mode = qio board_build.f_flash = 80000000L # ───────────────────────── host-side unit test harness ───────────────────── # Runs pure, framework-free logic on the build host. Run with: pio test -e native_test # Feature PRs add their own doctest suites under test/; this env just hosts them. # home_battery.cpp is a pure store, so it is compiled into the suites that need it # (the smoke test is dependency-free and tolerates the extra object). [env:native_test] platform = native framework = test_framework = doctest test_build_src = true build_src_filter = -<*> + + + + + + + + + + build_flags = -std=gnu++17 -I src/lvgl_tft -I src lib_deps = bblanchon/ArduinoJson@6.20.1 extra_scripts = [env:native_openevse] platform = native framework = lib_deps = ${common.lib_deps} https://github.com/jeremypoulter/EpoxyDuino.git EpoxyFS EpoxyEepromEsp EpoxyMockWiFi EpoxymDNS lib_extra_dirs = .pio/libdeps/native_openevse/EpoxyDuino/libraries #lib_extra_dirs = ../EpoxyDuino/libraries build_flags = -std=c++14 ${common.debug_flags} ${common.feature_flags} -fpermissive -Wno-narrowing -D ARDUINO=100 -D ESP32 -D ARDUINO_ARCH_ESP32 -D USE_ESP32 -D EPOXY_DUINO -D EPOXY_CORE_ESP32 -D CS_PLATFORM=CS_P_UNIX -D MO_USE_FILEAPI=POSIX_FILEAPI -D FORMAT_LITTLEFS_IF_FAILED= -D HTTP_SERVER_PORT=8000 -D HTTPS_SERVER_PORT=8443 -D CERT_VALIDATOR_OPENSSL -D WIFI_BUTTON_PRESSED_STATE=HIGH -D DISABLE_HEARTBEAT -lssl -lcrypto -lpthread -lavahi-client -lavahi-common build_type = debug lib_compat_mode = off [env:native_openevse_lvgl] extends = env:native_openevse lib_deps = ${env:native_openevse.lib_deps} lvgl/lvgl@^8.3.9 lib_extra_dirs = .pio/libdeps/native_openevse_lvgl/EpoxyDuino/libraries build_flags = ${env:native_openevse.build_flags} ${common.lvgl_tft_renderer_flags} -D LCD_BACKLIGHT_PIN=0 -D TFT_WIDTH=320 -D TFT_HEIGHT=480 -ldl # divert_sim host binary (scenario runner): pio run -e native_simulator [env:native_simulator] platform = native framework = lib_deps = bblanchon/ArduinoJson@6.20.1 jeremypoulter/Micro Debug@0.0.5 jeremypoulter/ConfigJson@0.0.6 https://github.com/OpenEVSE/OpenEVSE_Lib.git#v0.0.20 jeremypoulter/ESPAL@0.0.7 jeremypoulter/StreamSpy@0.0.2 jeremypoulter/MicroTasks@0.0.4 https://github.com/jeremypoulter/EpoxyDuino.git EpoxyFS EpoxyEepromEsp lib_extra_dirs = .pio/libdeps/native_simulator/EpoxyDuino/libraries build_flags = -std=c++14 -fpermissive -Wno-narrowing -pthread -I .pio/libdeps/native_simulator/EpoxyDuino/cores/epoxy -I .pio/libdeps/native_simulator/EpoxyDuino/libraries/EpoxyMockWiFi -include ${PROJECT_DIR}/divert_sim/sim_platformio_compat.h -D DIVERT_SIM -D ARDUINO=100 -D ESP32 -D ARDUINO_ARCH_ESP32 -D USE_ESP32 -D UNIX_HOST_DUINO -D EPOXY_DUINO -D EPOXY_CORE_ESP8266 -D ENERGY_METER_STORE_STATE=0 -D ARDUINOJSON_ENABLE_PROGMEM=0 -D ENABLE_CONFIG_V1_IMPORT=0 -D ENABLE_CONFIG_CHANGE_NOTIFICATION=0 build_src_filter = -<*> +<../divert_sim/divert_sim.cpp> +<../divert_sim/RapiSender.cpp> +<../divert_sim/sim/*.cpp> + + + + + + + + + + + + + + lib_ignore = EpoxymDNS lib_compat_mode = off