diff --git a/platformio.ini b/platformio.ini index ba83847..cb9a730 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,6 +1,4 @@ [common] -platform = espressif8266 -board = esp8285 framework = arduino upload_speed = 921600 monitor_speed = 115200 @@ -8,60 +6,68 @@ build.filesystem = littlefs lib_deps = bblanchon/ArduinoJson @ 7.4.2 knolleary/PubSubClient -[env:Sonoff4ChPro] -platform = ${common.platform} -board = ${common.board} -framework = ${common.framework} -upload_speed = ${common.upload_speed} -monitor_speed = ${common.monitor_speed} -build.filesystem = ${common.build.filesystem} -lib_deps = ${common.lib_deps} -upload_port = 10.0.0.178 +[Sonoff4ChPro] +platform = espressif8266 +board = esp8285 build_flags = -D Sonoff4ChPro -[env:Sonoff4ChPro_ESP32] +[GosundSP111] +platform = espressif8266 +board = esp8285 +build_flags = -D GosundSP111 + +[ESP32_TEST] platform = espressif32 board = esp32dev -framework = ${common.framework} -upload_speed = ${common.upload_speed} -monitor_speed = ${common.monitor_speed} build_type = debug debug_tool = esp-prog monitor_filters = esp32_exception_decoder -build.filesystem = ${common.build.filesystem} -lib_deps = ${common.lib_deps} -build_flags = -D Sonoff4ChPro -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0 +build_flags = -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0 -[env:GosundSP111_USB] -platform = ${common.platform} -board = ${common.board} +[env:Sonoff4ChPro] +platform = ${Sonoff4ChPro.platform} +board = ${Sonoff4ChPro.board} framework = ${common.framework} upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} build.filesystem = ${common.build.filesystem} lib_deps = ${common.lib_deps} -build_flags = -D GosundSP111 +upload_protocol = espota +upload_port = 10.0.0.178 +build_flags = ${Sonoff4ChPro.build_flags} -[env:GosundSP111_02] -platform = ${common.platform} -board = ${common.board} +[env:Sonoff4ChPro_ESP32] +platform = ${ESP32_TEST.platform} +board = ${ESP32_TEST.board} +framework = ${common.framework} +upload_speed = ${common.upload_speed} +monitor_speed = ${common.monitor_speed} +build_type = ${ESP32_TEST.build_type} +debug_tool = ${ESP32_TEST.debug_tool} +monitor_filters = ${ESP32_TEST.monitor_filters} +build.filesystem = ${common.build.filesystem} +lib_deps = ${common.lib_deps} +build_flags = ${Sonoff4ChPro.build_flags} ${ESP32_TEST.build_flags} + +[env:GosundSP111] +platform = ${GosundSP111.platform} +board = ${GosundSP111.board} framework = ${common.framework} upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} build.filesystem = ${common.build.filesystem} lib_deps = ${common.lib_deps} -upload_port = 10.0.0.179 -build_flags = -D GosundSP111 +build_flags = ${GosundSP111.build_flags} [env:GosundSP111_ESP32] -platform = espressif32 -board = esp32dev +platform = ${ESP32_TEST.platform} +board = ${ESP32_TEST.board} framework = ${common.framework} upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} -build_type = debug -debug_tool = esp-prog -monitor_filters = esp32_exception_decoder +build_type = ${ESP32_TEST.build_type} +debug_tool = ${ESP32_TEST.debug_tool} +monitor_filters = ${ESP32_TEST.monitor_filters} build.filesystem = ${common.build.filesystem} lib_deps = ${common.lib_deps} -build_flags = -D GosundSP111 -D ESP32_TESTBOARD -D CORE_DEBUG_LEVEL=0 \ No newline at end of file +build_flags = ${GosundSP111.build_flags} ${ESP32_TEST.build_flags} \ No newline at end of file