Revert "Platform 2025.07.31 Tasmota Arduino Core 3.1.3.250712 based on IDF 5.…" (#23684)

This reverts commit 228588a6a3a005ef6cc88650225bb7c327f61f57.
This commit is contained in:
Jason2866 2025-07-15 18:42:30 +02:00 committed by GitHub
parent 228588a6a3
commit a38146cc95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 20 deletions

View File

@ -7,7 +7,7 @@
- [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR and the code change compiles without warnings
- [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.8
- [ ] The code change is tested and works with Tasmota core ESP32 V.3.1.3.250712
- [ ] The code change is tested and works with Tasmota core ESP32 V.3.1.3.250707
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).
_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_

View File

@ -27,6 +27,7 @@ Import("env")
platform = env.PioPlatform()
board = env.BoardConfig()
mcu = board.get("build.mcu", "esp32")
esptoolpy = os.path.join(ProjectConfig.get_instance().get("platformio", "packages_dir"),("tool-esptoolpy") or "", "esptool.py")
IS_WINDOWS = sys.platform.startswith("win")
class FSType(Enum):
@ -174,7 +175,7 @@ def get_partition_table():
if not os.path.exists(build_dir):
os.makedirs(build_dir)
fs_file = join(env.subst("$BUILD_DIR"), "partition_table_from_flash.bin")
esptool_flags = [
esptoolpy_flags = [
"--chip", mcu,
"--port", upload_port,
"--baud", download_speed,
@ -185,9 +186,9 @@ def get_partition_table():
"0x1000",
fs_file
]
esptool_cmd = [env["PYTHONEXE"], env.subst("$OBJCOPY")] + esptool_flags
esptoolpy_cmd = [env["PYTHONEXE"], esptoolpy] + esptoolpy_flags
try:
returncode = subprocess.call(esptool_cmd, shell=False)
returncode = subprocess.call(esptoolpy_cmd, shell=False)
except subprocess.CalledProcessError as exc:
print("Downloading failed with " + str(exc))
with open(fs_file, mode="rb") as file:
@ -227,7 +228,7 @@ def download_fs(fs_info: FSInfo):
env.AutodetectUploadPort()
upload_port = join(env.get("UPLOAD_PORT", "none"))
fs_file = join(env.subst("$BUILD_DIR"), f"downloaded_fs_{hex(fs_info.start)}_{hex(fs_info.length)}.bin")
esptool_flags = [
esptoolpy_flags = [
"--chip", mcu,
"--port", upload_port,
"--baud", download_speed,
@ -238,10 +239,10 @@ def download_fs(fs_info: FSInfo):
hex(fs_info.length),
fs_file
]
esptool_cmd = [env["PYTHONEXE"], env.subst("$OBJCOPY")] + esptool_flags
esptoolpy_cmd = [env["PYTHONEXE"], esptoolpy] + esptoolpy_flags
print("Download filesystem image")
try:
returncode = subprocess.call(esptool_cmd, shell=False)
returncode = subprocess.call(esptoolpy_cmd, shell=False)
return (True, fs_file)
except subprocess.CalledProcessError as exc:
print("Downloading failed with " + str(exc))
@ -295,7 +296,7 @@ def upload_factory(*args, **kwargs):
env.AutodetectUploadPort()
upload_port = join(env.get("UPLOAD_PORT", "none"))
if "tasmota" in target_firm:
esptool_flags = [
esptoolpy_flags = [
"--chip", mcu,
"--port", upload_port,
"--baud", env.subst("$UPLOAD_SPEED"),
@ -303,9 +304,9 @@ def upload_factory(*args, **kwargs):
"0x0",
target_firm
]
esptool_cmd = [env["PYTHONEXE"], env.subst("$OBJCOPY")] + esptool_flags
esptoolpy_cmd = [env["PYTHONEXE"], esptoolpy] + esptoolpy_flags
print("Flash firmware at address 0x0")
subprocess.call(esptool_cmd, shell=False)
subprocess.call(esptoolpy_cmd, shell=False)
def esp32_use_external_crashreport(*args, **kwargs):
try:
@ -357,15 +358,15 @@ def reset_target(*args, **kwargs):
if "none" in upload_port:
env.AutodetectUploadPort()
upload_port = join(env.get("UPLOAD_PORT", "none"))
esptool_flags = [
esptoolpy_flags = [
"--no-stub",
"--chip", mcu,
"--port", upload_port,
"flash-id"
]
esptool_cmd = [env["PYTHONEXE"], env.subst("$OBJCOPY")] + esptool_flags
esptoolpy_cmd = [env["PYTHONEXE"], esptoolpy] + esptoolpy_flags
print("Try to reset device")
subprocess.call(esptool_cmd, shell=False)
subprocess.call(esptoolpy_cmd, shell=False)
# Custom Target Definitions
env.AddCustomTarget(
@ -375,7 +376,7 @@ env.AddCustomTarget(
reset_target
],
title="Reset ESP32 target",
description="This command resets ESP32x target via esptool",
description="This command resets ESP32x target via esptoolpy",
)
env.AddCustomTarget(

View File

@ -36,8 +36,8 @@ from colorama import Fore, Back, Style
from SCons.Script import COMMAND_LINE_TARGETS
from platformio.project.config import ProjectConfig
esptool = env.subst("$OBJCOPY")
sys.path.append(esptool)
esptoolpy = os.path.join(ProjectConfig.get_instance().get("platformio", "packages_dir"), "tool-esptoolpy")
sys.path.append(esptoolpy)
import esptool
config = env.GetProjectConfig()
@ -102,10 +102,10 @@ def esp32_detect_flashsize():
if not "esptool" in uploader:
return "4MB",False
else:
esptool_flags = ["flash-id"]
esptool_cmd = [env["PYTHONEXE"], env.subst("$OBJCOPY")] + esptool_flags
esptoolpy_flags = ["flash-id"]
esptoolpy_cmd = ["esptool"] + esptoolpy_flags
try:
output = subprocess.run(esptool_cmd, capture_output=True).stdout.splitlines()
output = subprocess.run(esptoolpy_cmd, capture_output=True).stdout.splitlines()
for l in output:
if l.decode().startswith("Detected flash size: "):
size = (l.decode().split(": ")[1])

View File

@ -81,7 +81,7 @@ lib_ignore = ${esp32_defaults.lib_ignore}
ccronexpr
[core32]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2025.07.31/platform-espressif32.zip
platform = https://github.com/tasmota/platform-espressif32/releases/download/2025.07.30/platform-espressif32.zip
platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}