; 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] default_envs = dev [env] platform = espressif32 board = az-delivery-devkit-v4 framework = arduino board_build.tasks_stack_size = 8192 lib_deps = adafruit/Adafruit ST7735 and ST7789 Library@^1.11.0 https://github.com/avrilogic/nanopb.git#fix/esp32-pio-include-path ESP32Async/AsyncTCP@^3.4.8 ESP32Async/ESPAsyncWebServer@^3.8.1 rweather/Crypto@^0.4.0 adafruit/Adafruit NeoPixel@^1.15.1 ArduinoOTA monitor_speed = 115200 monitor_filters = esp32_exception_decoder board_build.filesystem = littlefs #lib_extra_dirs = .pio/libdeps/dev/Nanopb build_unflags = -std=gnu++11 -fno-rtti build_flags = -std=gnu++17 -ffunction-sections -fdata-sections -Wl,--gc-sections -D CONFIG_BT_ENABLED=n -D CONFIG_BLUEDROID_ENABLED=n custom_nanopb_protos = + + + + + custom_nanopb_options = --error-on-unmatched [env:dev] build_type = debug board_build.partitions = partitions_custom.csv build_flags = ${env.build_flags} -Os -D DEBUG_MODE -D CORE_DEBUG_LEVEL=4 -D LOG_LOCAL_LEVEL=4 -fstack-protector-strong -D CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y -D CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y -D CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y -D CONFIG_ESP_TASK_WDT=y -D CONFIG_ESP_TASK_WDT_TIMEOUT_S=15 -D CONFIG_ESP_TASK_WDT_PANIC=y [env:prod] build_type = release board_build.partitions = partitions_prod.csv build_flags = ${env.build_flags} ; --- CORE OPTIMIZATIONS --- -Os ; <-- 1. Optimize for SIZE, not speed -fno-exceptions ; <-- 2. Disable C++ exceptions ; --- DISABLE BLUETOOTH --- -D CONFIG_BT_ENABLED=n ; <-- 2. Disable Bluetooth stack -D CONFIG_BLUEDROID_ENABLED=n ; <-- 2. Disable classic Bluetooth ; --- STRIP DEBUG SYMBOLS (already correct) --- -D NDEBUG -D CORE_DEBUG_LEVEL=0 -D LOG_LOCAL_LEVEL=0 ; --- Security vs. Size Trade-off (optional) --- -fstack-protector ; Keep this for security. Removing it saves a tiny amount of space. ; --- OTHER FLAGS (already correct) --- -D CONFIG_ESP32_ENABLE_COREDUMP=n -D CONFIG_ESP_TASK_WDT=y -D CONFIG_ESP_TASK_WDT_TIMEOUT_S=60 -D CONFIG_ESP_TASK_WDT_PANIC=n