Added c3 target
This commit is contained in:
parent
1ddd8bc669
commit
1148a23bb4
2
.github/workflows/pio-build.yaml
vendored
2
.github/workflows/pio-build.yaml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
git config --global advice.detachedHead false
|
git config --global advice.detachedHead false
|
||||||
|
|
||||||
- name: Run PlatformIO
|
- name: Run PlatformIO
|
||||||
run: pio run -e gravity-release -e gravity-perf -e gravity32-release -e gravity32-perf
|
run: pio run -e gravity-release -e gravity-perf -e gravity32-release -e gravity32-perf -e gravity32-c3-release
|
||||||
|
|
||||||
- uses: EndBug/add-and-commit@v7 # You can change this to use a specific version. https://github.com/marketplace/actions/add-commit
|
- uses: EndBug/add-and-commit@v7 # You can change this to use a specific version. https://github.com/marketplace/actions/add-commit
|
||||||
with:
|
with:
|
||||||
|
204
platformio.ini
204
platformio.ini
@ -16,73 +16,72 @@ include_dir = lib
|
|||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
platform = espressif8266 @ 4.0.1
|
platform = espressif8266 @ 4.0.1
|
||||||
|
platform32 = espressif32 @ 5.2.0
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = d1_mini
|
board = d1_mini
|
||||||
build_unflags =
|
build_unflags =
|
||||||
build_flags =
|
build_flags =
|
||||||
-Wl,-Map,output.map
|
-Wl,-Map,output.map
|
||||||
-D BAUD=${common_env_data.monitor_speed}
|
-D BAUD=${common_env_data.monitor_speed}
|
||||||
-D ACTIVATE_OTA
|
|
||||||
#-D DEBUG_ESP_HTTP_CLIENT
|
|
||||||
#-D DEBUG_ESP_HTTP_SERVER
|
|
||||||
#-D DEBUG_ESP_PORT=Serial
|
|
||||||
#-D DEBUG_ESP_WIFI
|
|
||||||
#-D DEBUG_ESP_SSL
|
|
||||||
#-D DEBUG_ESP_CORE
|
|
||||||
#-D SKIP_SLEEPMODE
|
#-D SKIP_SLEEPMODE
|
||||||
-D USE_LITTLEFS=true
|
#-D FORCE_GRAVITY_MODE
|
||||||
-D EMBED_HTML # If this is not used the html files needs to be on the file system (can be uploaded)
|
#-D DOUBLERESETDETECTOR_DEBUG=true
|
||||||
-D USER_SSID=\""\"" # =\""myssid\""
|
-DACTIVATE_OTA
|
||||||
-D USER_SSID_PWD=\""\"" # =\""mypwd\""
|
-DCFG_DISABLE_LOGGING # Turn off verbose/notice logging to reduce size and dont overload uart (applies to LOG_LEVEL6)
|
||||||
-D CFG_APPVER="\"1.1.0\""
|
-DGYRO_DISABLE_LOGGING
|
||||||
#-D CFG_GITREV=\""beta-4\""
|
-DCALC_DISABLE_LOGGING
|
||||||
!python script/git_rev.py
|
-DHELPER_DISABLE_LOGGING
|
||||||
lib_deps = # Switched to forks for better version control.
|
-DPUSH_DISABLE_LOGGING
|
||||||
|
-DTSEN_DISABLE_LOGGING
|
||||||
|
-DWIFI_DISABLE_LOGGING
|
||||||
|
-DWEB_DISABLE_LOGGING
|
||||||
|
-DMAIN_DISABLE_LOGGING
|
||||||
|
-DUSE_LITTLEFS=true
|
||||||
|
-DUSER_SSID=\""\"" # =\""myssid\""
|
||||||
|
-DUSER_SSID_PWD=\""\"" # =\""mypwd\""
|
||||||
|
-DCFG_APPVER="\"1.2.0\""
|
||||||
|
-DCFG_GITREV=\""beta-1\""
|
||||||
|
#!python script/git_rev.py
|
||||||
|
lib_deps =
|
||||||
# Using local copy of these libraries
|
# Using local copy of these libraries
|
||||||
#https://github.com/mp-se/i2cdevlib.git#<document>
|
#https://github.com/mp-se/i2cdevlib.git#<document>
|
||||||
#https://github.com/mp-se/OneWire # Using this version; https://github.com/arendst/Tasmota/tree/development/lib/lib_basic/OneWire-Stickbreaker
|
#https://github.com/mp-se/OneWire
|
||||||
#https://github.com/mp-se/Arduino-Temperature-Control-Library
|
#https://github.com/mp-se/Arduino-Temperature-Control-Library
|
||||||
#https://github.com/khoih-prog/ESP_WiFiManager
|
#https://github.com/khoih-prog/ESP_WiFiManager
|
||||||
#https://github.com/khoih-prog/ESP_DoubleResetDetector
|
#https://github.com/khoih-prog/ESP_DoubleResetDetector
|
||||||
https://github.com/mp-se/tinyexpr # https://github.com/codeplea/tinyexpr
|
https://github.com/mp-se/tinyexpr # https://github.com/codeplea/tinyexpr
|
||||||
https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin
|
https://github.com/mp-se/Arduino-Log#1.1.1 # https://github.com/thijse/Arduino-Log
|
||||||
https://github.com/mp-se/Arduino-Log#1.1.1 # https://github.com/thijse/Arduino-Log
|
https://github.com/mp-se/ArduinoJson#v6.18.5 # https://github.com/bblanchon/ArduinoJson
|
||||||
https://github.com/mp-se/ArduinoJson#v6.18.5 # https://github.com/bblanchon/ArduinoJson
|
https://github.com/mp-se/arduinoCurveFitting#v1.0.6 # https://github.com/Rotario/arduinoCurveFitting
|
||||||
https://github.com/mp-se/arduinoCurveFitting#v1.0.6 # https://github.com/Rotario/arduinoCurveFitting
|
https://github.com/mp-se/arduino-mqtt#v2.5.0 # https://github.com/256dpi/arduino-mqtt
|
||||||
https://github.com/mp-se/arduino-mqtt#v2.5.0 # https://github.com/256dpi/arduino-mqtt
|
lib_deps32 =
|
||||||
|
https://github.com/mp-se/NimBLE-Arduino#1.3.8 # https://github.com/h2zero/NimBLE-Arduino
|
||||||
|
extra_scripts =
|
||||||
|
script/copy_firmware.py
|
||||||
|
script/create_versionjson.py
|
||||||
|
|
||||||
[env:gravity-debug]
|
[env:gravity-debug]
|
||||||
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}
|
||||||
framework = ${common_env_data.framework}
|
framework = ${common_env_data.framework}
|
||||||
platform = ${common_env_data.platform}
|
platform = ${common_env_data.platform}
|
||||||
extra_scripts =
|
extra_scripts = ${common_env_data.extra_scripts}
|
||||||
script/copy_html.py
|
build_unflags = ${common_env_data.build_unflags}
|
||||||
script/copy_firmware.py
|
|
||||||
script/create_versionjson.py
|
|
||||||
build_unflags =
|
|
||||||
${common_env_data.build_unflags}
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${common_env_data.build_flags}
|
${common_env_data.build_flags}
|
||||||
-D PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
|
#-D DEBUG_ESP_HTTP_CLIENT
|
||||||
#-D SKIP_SLEEPMODE
|
#-D DEBUG_ESP_HTTP_SERVER
|
||||||
#-D DOUBLERESETDETECTOR_DEBUG=true
|
#-D DEBUG_ESP_PORT=Serial
|
||||||
#-D FORCE_GRAVITY_MODE # used to debug gravity mode
|
#-D DEBUG_ESP_WIFI
|
||||||
-D COLLECT_PERFDATA # This option will collect runtime data for a few defined methods to measure time, dumped to serial and/or influxdb
|
#-D DEBUG_ESP_SSL
|
||||||
-D LOG_LEVEL=6 # Maximum log level for the debug build.
|
#-D DEBUG_ESP_CORE
|
||||||
-D CFG_DISABLE_LOGGING # Turn off verbose/notice logging to reduce size and dont overload uart.
|
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
|
||||||
-D GYRO_DISABLE_LOGGING
|
-DCOLLECT_PERFDATA # Collect runtime data for a few defined methods to measure time, dumped to serial and/or influxdb
|
||||||
-D CALC_DISABLE_LOGGING
|
-DLOG_LEVEL=6
|
||||||
-D HELPER_DISABLE_LOGGING
|
|
||||||
-D PUSH_DISABLE_LOGGING
|
|
||||||
-D TSEN_DISABLE_LOGGING
|
|
||||||
-D WIFI_DISABLE_LOGGING
|
|
||||||
-D WEB_DISABLE_LOGGING
|
|
||||||
-D MAIN_DISABLE_LOGGING
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin
|
||||||
${common_env_data.lib_deps}
|
${common_env_data.lib_deps}
|
||||||
board = ${common_env_data.board}
|
board = ${common_env_data.board}
|
||||||
#build_type = debug
|
|
||||||
build_type = release
|
build_type = release
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
monitor_filters = esp8266_exception_decoder
|
monitor_filters = esp8266_exception_decoder
|
||||||
@ -92,15 +91,13 @@ upload_speed = ${common_env_data.upload_speed}
|
|||||||
monitor_speed = ${common_env_data.monitor_speed}
|
monitor_speed = ${common_env_data.monitor_speed}
|
||||||
framework = ${common_env_data.framework}
|
framework = ${common_env_data.framework}
|
||||||
platform = ${common_env_data.platform}
|
platform = ${common_env_data.platform}
|
||||||
extra_scripts =
|
extra_scripts = ${common_env_data.extra_scripts}
|
||||||
script/copy_html.py
|
|
||||||
script/copy_firmware.py
|
|
||||||
script/create_versionjson.py
|
|
||||||
build_unflags = ${common_env_data.build_unflags}
|
build_unflags = ${common_env_data.build_unflags}
|
||||||
build_flags =
|
build_flags =
|
||||||
${common_env_data.build_flags}
|
${common_env_data.build_flags}
|
||||||
-D LOG_LEVEL=4
|
-D LOG_LEVEL=4
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin
|
||||||
${common_env_data.lib_deps}
|
${common_env_data.lib_deps}
|
||||||
board = ${common_env_data.board}
|
board = ${common_env_data.board}
|
||||||
build_type = release
|
build_type = release
|
||||||
@ -111,16 +108,14 @@ upload_speed = ${common_env_data.upload_speed}
|
|||||||
monitor_speed = ${common_env_data.monitor_speed}
|
monitor_speed = ${common_env_data.monitor_speed}
|
||||||
framework = ${common_env_data.framework}
|
framework = ${common_env_data.framework}
|
||||||
platform = ${common_env_data.platform}
|
platform = ${common_env_data.platform}
|
||||||
extra_scripts =
|
extra_scripts = ${common_env_data.extra_scripts}
|
||||||
script/copy_html.py
|
|
||||||
script/copy_firmware.py
|
|
||||||
script/create_versionjson.py
|
|
||||||
build_unflags = ${common_env_data.build_unflags}
|
build_unflags = ${common_env_data.build_unflags}
|
||||||
build_flags =
|
build_flags =
|
||||||
${common_env_data.build_flags}
|
${common_env_data.build_flags}
|
||||||
-D COLLECT_PERFDATA
|
-DCOLLECT_PERFDATA
|
||||||
-D LOG_LEVEL=5
|
-DLOG_LEVEL=5
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
https://github.com/mp-se/incbin # https://github.com/graphitemaster/incbin
|
||||||
${common_env_data.lib_deps}
|
${common_env_data.lib_deps}
|
||||||
board = ${common_env_data.board}
|
board = ${common_env_data.board}
|
||||||
build_type = release
|
build_type = release
|
||||||
@ -128,60 +123,105 @@ board_build.filesystem = littlefs
|
|||||||
|
|
||||||
[env:gravity32-release]
|
[env:gravity32-release]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
platform = espressif32 @ 5.0.0
|
platform = ${common_env_data.platform32}
|
||||||
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 = ${common_env_data.extra_scripts}
|
||||||
script/copy_html.py
|
|
||||||
script/copy_firmware.py
|
|
||||||
script/create_versionjson.py
|
|
||||||
build_unflags =
|
build_unflags =
|
||||||
${common_env_data.build_unflags}
|
${common_env_data.build_unflags}
|
||||||
build_flags =
|
build_flags =
|
||||||
-Wl,-Map,output.map
|
-Wl,-Map,output.map
|
||||||
|
#-DCORE_DEBUG_LEVEL=0
|
||||||
${common_env_data.build_flags}
|
${common_env_data.build_flags}
|
||||||
#-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 (applies to LOG_LEVEL6)
|
|
||||||
-D GYRO_DISABLE_LOGGING
|
|
||||||
-D CALC_DISABLE_LOGGING
|
|
||||||
-D HELPER_DISABLE_LOGGING
|
|
||||||
-D PUSH_DISABLE_LOGGING
|
|
||||||
-D TSEN_DISABLE_LOGGING
|
|
||||||
-D WIFI_DISABLE_LOGGING
|
|
||||||
-D WEB_DISABLE_LOGGING
|
|
||||||
-D MAIN_DISABLE_LOGGING
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common_env_data.lib_deps}
|
${common_env_data.lib_deps}
|
||||||
https://github.com/mp-se/NimBLE-Arduino#1.3.8 # https://github.com/h2zero/NimBLE-Arduino
|
${common_env_data.lib_deps32}
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
board = featheresp32
|
board = featheresp32
|
||||||
build_type = release
|
build_type = release
|
||||||
|
#board_build.partitions = min_spiffs.csv
|
||||||
board_build.partitions = part32.csv
|
board_build.partitions = part32.csv
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
|
board_build.embed_txtfiles =
|
||||||
|
html/calibration.min.htm
|
||||||
|
html/config.min.htm
|
||||||
|
html/firmware.min.htm
|
||||||
|
html/format.min.htm
|
||||||
|
html/about.min.htm
|
||||||
|
html/index.min.htm
|
||||||
|
html/test.min.htm
|
||||||
|
|
||||||
[env:gravity32-perf]
|
[env:gravity32-perf]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
platform = espressif32 @ 5.0.0
|
platform = ${common_env_data.platform32}
|
||||||
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 = ${common_env_data.extra_scripts}
|
||||||
script/copy_html.py
|
build_unflags =
|
||||||
script/copy_firmware.py
|
${common_env_data.build_unflags}
|
||||||
script/create_versionjson.py
|
build_flags =
|
||||||
|
-Wl,-Map,output.map
|
||||||
|
#-DCORE_DEBUG_LEVEL=0
|
||||||
|
${common_env_data.build_flags}
|
||||||
|
-DCOLLECT_PERFDATA
|
||||||
|
-DLOG_LEVEL=5
|
||||||
|
lib_deps =
|
||||||
|
${common_env_data.lib_deps}
|
||||||
|
${common_env_data.lib_deps32}
|
||||||
|
board = featheresp32
|
||||||
|
build_type = release
|
||||||
|
#board_build.partitions = min_spiffs.csv
|
||||||
|
board_build.partitions = part32.csv
|
||||||
|
board_build.filesystem = littlefs
|
||||||
|
monitor_filters = esp32_exception_decoder
|
||||||
|
board_build.embed_txtfiles =
|
||||||
|
html/calibration.min.htm
|
||||||
|
html/config.min.htm
|
||||||
|
html/firmware.min.htm
|
||||||
|
html/format.min.htm
|
||||||
|
html/about.min.htm
|
||||||
|
html/index.min.htm
|
||||||
|
html/test.min.htm
|
||||||
|
|
||||||
|
[env:gravity32-c3-release]
|
||||||
|
framework = arduino
|
||||||
|
platform = ${common_env_data.platform32}
|
||||||
|
upload_speed = 115200
|
||||||
|
monitor_speed = ${common_env_data.monitor_speed}
|
||||||
|
extra_scripts = ${common_env_data.extra_scripts}
|
||||||
|
debug_tool = custom
|
||||||
|
debug_server =
|
||||||
|
${platformio.packages_dir}/tool-openocd-esp32/bin/openocd
|
||||||
|
-f
|
||||||
|
${platformio.packages_dir}/tool-openocd-esp32/share/openocd/scripts/board/esp32c3-builtin.cfg
|
||||||
|
debug_port = localhost:3333
|
||||||
|
debug_init_break = break setup
|
||||||
build_unflags =
|
build_unflags =
|
||||||
${common_env_data.build_unflags}
|
${common_env_data.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
|
-DLOG_LEVEL=5
|
||||||
-D LOG_LEVEL=5
|
-DCORE_DEBUG_LEVEL=0
|
||||||
|
-DESP32C3
|
||||||
|
-DARDUINO_ESP32C3_DEV
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common_env_data.lib_deps}
|
${common_env_data.lib_deps}
|
||||||
https://github.com/mp-se/NimBLE-Arduino#1.3.8 # https://github.com/h2zero/NimBLE-Arduino
|
${common_env_data.lib_deps32}
|
||||||
board = featheresp32
|
lib_ignore =
|
||||||
build_type = release
|
board = lolin_c3_mini
|
||||||
|
build_type = debug
|
||||||
|
#board_build.partitions = min_spiffs.csv
|
||||||
board_build.partitions = part32.csv
|
board_build.partitions = part32.csv
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
|
board_build.embed_txtfiles =
|
||||||
|
html/calibration.min.htm
|
||||||
|
html/config.min.htm
|
||||||
|
html/firmware.min.htm
|
||||||
|
html/format.min.htm
|
||||||
|
html/about.min.htm
|
||||||
|
html/index.min.htm
|
||||||
|
html/test.min.htm
|
||||||
|
@ -46,12 +46,17 @@ def after_build(source, target, env):
|
|||||||
print( "Copy file : " + source + " -> " + target )
|
print( "Copy file : " + source + " -> " + target )
|
||||||
shutil.copyfile( source, target )
|
shutil.copyfile( source, target )
|
||||||
|
|
||||||
if name == "gravity32-release2" :
|
if name == "gravity32-c3-release" :
|
||||||
target = dir + "/bin/firmware32_2.bin"
|
target = dir + "/bin/firmware32_c3.bin"
|
||||||
source = dir + "/.pio/build/" + name + "/firmware.bin"
|
source = dir + "/.pio/build/" + name + "/firmware.bin"
|
||||||
print( "Copy file : " + source + " -> " + target )
|
print( "Copy file : " + source + " -> " + target )
|
||||||
shutil.copyfile( source, target )
|
shutil.copyfile( source, target )
|
||||||
|
|
||||||
|
target = dir + "/bin/partitions32_c3.bin"
|
||||||
|
source = dir + "/.pio/build/" + name + "/partitions.bin"
|
||||||
|
print( "Copy file : " + source + " -> " + target )
|
||||||
|
shutil.copyfile( source, target )
|
||||||
|
|
||||||
|
|
||||||
print( "Adding custom build step (copy firmware): ")
|
print( "Adding custom build step (copy firmware): ")
|
||||||
env.AddPostAction("buildprog", after_build)
|
env.AddPostAction("buildprog", after_build)
|
||||||
|
Loading…
Reference in New Issue
Block a user