Added target with esp32 fwk 2.0

This commit is contained in:
Magnus Persson 2022-03-12 19:49:04 +01:00
parent 3d497a1acc
commit 6193f422e8
3 changed files with 36 additions and 14 deletions

View File

@ -125,13 +125,7 @@ board_build.filesystem = littlefs
[env:gravity32-release] [env:gravity32-release]
framework = arduino framework = arduino
platform = espressif32 # platformio only supports v1.0.6 of the esp32 libs. platform = espressif32
# tasmota port of v2.0.2
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.1/platform-tasmota-espressif32-2.0.2.1.zip
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2idf/platform-espressif32-2.0.3.zip
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2/platform-tasmota-espressif32-2.0.2.zip
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2idf/platform-espressif32-2.0.2.zip
upload_speed = ${common_env_data.upload_speed} upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed} monitor_speed = ${common_env_data.monitor_speed}
extra_scripts = extra_scripts =
@ -143,9 +137,9 @@ build_unflags =
build_flags = build_flags =
-Wl,-Map,output.map -Wl,-Map,output.map
${common_env_data.build_flags} ${common_env_data.build_flags}
-D COLLECT_PERFDATA #-D COLLECT_PERFDATA
-D LOG_LEVEL=5 -D LOG_LEVEL=5
-D CFG_DISABLE_LOGGING # Turn off verbose/notice logging to reduce size and dont overload uart. -D CFG_DISABLE_LOGGING # Turn off verbose/notice logging to reduce size and dont overload uart (applies to LOG_LEVEL6)
-D GYRO_DISABLE_LOGGING -D GYRO_DISABLE_LOGGING
-D CALC_DISABLE_LOGGING -D CALC_DISABLE_LOGGING
-D HELPER_DISABLE_LOGGING -D HELPER_DISABLE_LOGGING
@ -160,8 +154,30 @@ lib_deps =
https://github.com/h2zero/NimBLE-Arduino#1.3.7 https://github.com/h2zero/NimBLE-Arduino#1.3.7
board = featheresp32 board = featheresp32
build_type = release build_type = release
board_build.partitions = part32.csv # No room for OTA using this partition setup, use this for dev/test for now. board_build.partitions = part32.csv
#build_type = debug
board_build.filesystem = littlefs board_build.filesystem = littlefs
#board_build.filesystem = spiffs monitor_filters = esp32_exception_decoder
monitor_filters = esp32_exception_decoder
[env:gravity32-release2]
framework = arduino
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip # build fails
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2/platform-tasmota-espressif32-2.0.2.zip
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts =
script/copy_html.py
script/copy_firmware.py
script/create_versionjson.py
build_unflags =
${common_env_data.build_unflags}
build_flags =
${common_env_data.build_flags}
-D ESPRESSIF32_20 # v2.0 framework
-D LOG_LEVEL=5
lib_deps =
${common_env_data.lib_deps}
https://github.com/h2zero/NimBLE-Arduino#1.3.7
board = featheresp32
build_type = release
board_build.partitions = part32.csv
board_build.filesystem = littlefs

View File

@ -20,6 +20,8 @@ def after_build(source, target, env):
target = dir + "/bin/firmware-perf.bin" target = dir + "/bin/firmware-perf.bin"
if name == "gravity32-release" : if name == "gravity32-release" :
target = dir + "/bin/firmware32.bin" target = dir + "/bin/firmware32.bin"
if name == "gravity32-release2" :
target = dir + "/bin/firmware32_2.bin"
print( "Copy file : " + source + " -> " + target ) print( "Copy file : " + source + " -> " + target )
shutil.copyfile( source, target ) shutil.copyfile( source, target )

View File

@ -37,9 +37,13 @@ SOFTWARE.
#define PIN_DS D6 #define PIN_DS D6
#define PIN_A0 A0 #define PIN_A0 A0
#else // defined (ESP32) #else // defined (ESP32)
#if defined (ESPRESSIF32_20)
#include <LittleFS.h>
#else
#include <LITTLEFS.h> #include <LITTLEFS.h>
#include <FS.h>
#define LittleFS LITTLEFS #define LittleFS LITTLEFS
#endif
#include <FS.h>
#define ESPhttpUpdate httpUpdate #define ESPhttpUpdate httpUpdate
#define ESP_RESET ESP.restart #define ESP_RESET ESP.restart
#define ESP8266WebServer WebServer #define ESP8266WebServer WebServer