Skip to content

Commit

Permalink
One Tasmota Platformio Platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Sep 23, 2022
1 parent e679da6 commit 3629217
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
17 changes: 15 additions & 2 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,24 @@

env = DefaultEnvironment()
board = env.BoardConfig()
build_core = board.get("build.core", "").lower()
extra_flags = board.get("build.extra_flags", "")
build_flags = env.GetProjectOption("build_flags")

SConscript("_embed_files.py", exports="env")

if "espidf" not in env.subst("$PIOFRAMEWORK"):
if "arduino" in env.subst("$PIOFRAMEWORK") and "-DCORE32SOLO1" in extra_flags and "espidf" not in env.subst("$PIOFRAMEWORK"):
SConscript(
join(DefaultEnvironment().PioPlatform().get_package_dir(
"framework-arduino-solo1"), "tools", "platformio-build.py"))
env["INTEGRATION_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})

elif "arduino" in env.subst("$PIOFRAMEWORK") and "-DFRAMEWORK-ARDUINO-ITEAD" in build_flags and "espidf" not in env.subst("$PIOFRAMEWORK"):
SConscript(
join(DefaultEnvironment().PioPlatform().get_package_dir(
"framework-arduino-ITEAD"), "tools", "platformio-build.py"))
env["INTEGRATION_EXTRA_DATA"].update({"application_offset": env.subst("$ESP32_APP_OFFSET")})

elif "arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK"):
SConscript(
join(DefaultEnvironment().PioPlatform().get_package_dir(
"framework-arduinoespressif32"), "tools", "platformio-build.py"))
Expand Down
29 changes: 26 additions & 3 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"version": "2.0.5",
"frameworks": {
"arduino": {
"package": "framework-arduinoespressif32",
"script": "builder/frameworks/arduino.py"
},
"espidf": {
Expand All @@ -35,9 +34,21 @@
"packages": {
"framework-arduinoespressif32": {
"type": "framework",
"optional": true,
"optional": false,
"owner": "tasmota",
"version": "https://github.com/tasmota/arduino-esp32/releases/download/2.0.5/framework-arduinoespressif32.zip"
},
"framework-arduino-solo1": {
"type": "framework",
"optional": false,
"owner": "tasmota",
"version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1012/framework-arduinoespressif32-solo1-IDF_Arduino-d772747b2.zip"
},
"framework-arduino-ITEAD": {
"type": "framework",
"optional": false,
"owner": "tasmota",
"version": "https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1011/framework-arduinoespressif32-ITEAD-IDF_Arduino-d772747b2.zip"
},
"framework-espidf": {
"type": "framework",
Expand Down Expand Up @@ -75,11 +86,22 @@
"owner": "jason2866",
"version": "https://github.com/Jason2866/crosstool-NG/releases/download/v8.4.0/esp32ulp-elf-2.35_20220830-linux_x86_64.zip"
},
"framework-arduino-mbcwb": {
"type": "framework",
"optional": true,
"owner": "meteca",
"version": ">=2.1.1"
},
"tool-esptoolpy": {
"type": "uploader",
"owner": "tasmota",
"version": "https://github.com/tasmota/esptool/releases/download/v4.3/esptool-4.3.zip"
},
"tool-mbctool": {
"optional": true,
"owner": "meteca",
"version": ">=2.0.0"
},
"tool-openocd-esp32": {
"type": "debugger",
"optional": true,
Expand All @@ -105,7 +127,7 @@
"tool-cmake": {
"optional": true,
"owner": "platformio",
"version": "~3.21.0"
"version": "~3.16.0"
},
"tool-ninja": {
"optional": true,
Expand All @@ -124,3 +146,4 @@
}
}
}

0 comments on commit 3629217

Please sign in to comment.