; example custom platformio ini file for EMS-ESP [common] ; custom build flags to use in my_build_flags ; -DEMSESP_UART_DEBUG ; debugging UART ; -DEMSESP_DEBUG ; enables DEBUG to the log. Will generate a lot of extra traffic on Console and Syslog ; -DEMSESP_DEFAULT_BOARD_PROFILE=\"NODEMCU\" ; hard code the default board name ; -DEMSESP_DEBUG_SENSOR ; additional debug for the sensors ; -DCORE_DEBUG_LEVEL=5 ; verbose core level debugging 5=verbose, 4=debug, 3=info ; -DEMSESP_TEST ; enable the tests. EN language only ; -DEMSESP_DE_ONLY ; only DE translated entity names ; -DEMSESP_EN_ONLY ; only EN translated entity names ; -DEMSESP_PINGTEST ; send log message every 1/2 second my_build_flags = -DEMSESP_TEST ; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST ; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST -DEMSESP_PINGTEST [platformio] ; default_envs = esp32_4M default_envs = esp32_16M ; default_envs = lolin_s3 ; default_envs = native ; default_envs = debug ; default_envs = custom [env] ; upload settings ; for USB upload_protocol = esptool upload_port = /dev/ttyUSB* ; for OTA add scripts/upload.py to extra_scripts ; upload_protocol = custom custom_emsesp_ip = 10.10.10.173 ; custom_emsesp_ip = ems-esp.local custom_username = admin custom_password = admin ; example below is using a locally built version of EMS-ESP-Modules. You can also test with: ; rm -rf .pio/libdeps/native/EMS-ESP-Modules; pio run -e native -t clean; pio run -e native -t exec lib_deps = file://../../modules/EMS-ESP-Modules bblanchon/ArduinoJson@^7.0.4 [env:native] extra_scripts = ; pre:scripts/refresh_module_library_native.py ; post:scripts/run_native.py [env:esp32_4M] extra_scripts = pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time scripts/rename_fw.py scripts/upload.py [env:lolin_s3] extra_scripts = pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time scripts/rename_fw.py scripts/upload.py [env:esp32_16M] extra_scripts = ; pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time scripts/rename_fw.py ; scripts/upload.py [env:custom] ; use for basic ESP boards with 4MB flash ; make sure -D TASMOTA_SDK is also enabled platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.00/platform-espressif32.zip ; use for S3 boards: ; platform = espressif32 framework = arduino board = esp32dev board_build.filesystem = littlefs board_build.f_cpu = 240000000L board_upload.flash_size = 4MB board_build.partitions = esp32_partition_4M.csv board_upload.use_1200bps_touch = false board_upload.wait_for_upload_port = true upload_port = /dev/ttyUSB0 extra_scripts = pre:scripts/build_interface.py scripts/rename_fw.py build_unflags = ${common.unbuild_flags} build_flags = ${common.core_build_flags} ${factory_settings.build_flags} ${common.my_build_flags} -D ONEWIRE_CRC16=0 -D NO_GLOBAL_ARDUINOOTA -D ARDUINOJSON_ENABLE_STD_STRING=1 -D TASMOTA_SDK ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN -D EMSESP_TEST -D EMSESP_DEBUG -D CONFIG_ETH_ENABLED -D CONFIG_ASYNC_TCP_STACK_SIZE=8192 '-DEMSESP_DEFAULT_BOARD_PROFILE="Test"' ; pio run -e debug ; or from Visual Studio Code do PIO -> Project Tasks -> debug -> General -> Upload and Monitor ; options for debugging are: EMSESP_DEBUG EMSESP_UART_DEBUG EMSESP_DEBUG_SENSOR [env:debug] board = esp32dev framework = arduino platform = espressif32 board_build.partitions = esp32_partition_debug.csv board_upload.flash_size = 4MB board_build.filesystem = littlefs upload_protocol = esptool build_type = debug monitor_raw = no monitor_filters = esp32_exception_decoder debug_tool = esp-prog debug_init_break = tbreak setup build_flags = ${factory_settings.build_flags} -DEMSESP_EN_ONLY -DCORE_DEBUG_LEVEL=5 -DONEWIRE_CRC16=0 -DNO_GLOBAL_ARDUINOOTA -DARDUINOJSON_ENABLE_STD_STRING=1 -DESP32=1 -DARDUINO_ARCH_ESP32=1 upload_port = /dev/ttyUSB0 extra_scripts = scripts/rename_fw.py post:scripts/app-tls-size.py