Skip to content

Commit 6a48a31

Browse files
authored
Platform 2025.02.30
1 parent d46a584 commit 6a48a31

File tree

4 files changed

+71
-13
lines changed

4 files changed

+71
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Espressif Systems is a privately held fabless semiconductor company. They provid
1717

1818
# Usage
1919

20-
## Tasmota release Arduino 3.1.1.250109 and IDF 5.3.2.250106
20+
## Tasmota release Arduino 3.1.1.250203 and IDF 5.3.2.250120
2121
Support for the ESP32/ESP32solo1, ESP32C2, ESP32C3, ESP32C6, ESP32S2, ESP32S3, ESP32-H2 and ESP32-P4
2222
```
2323
[platformio]
24-
platform = https://github.com/tasmota/platform-espressif32/releases/download/2025.01.31/platform-espressif32.zip
24+
platform = https://github.com/tasmota/platform-espressif32/releases/download/2025.02.30/platform-espressif32.zip
2525
framework = arduino
2626
```
2727
## Hybrid compile: Build customized Arduino IDF libraries

builder/frameworks/espidf.py

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,11 +1584,37 @@ def get_idf_venv_dir():
15841584

15851585
def ensure_python_venv_available():
15861586

1587+
def _get_idf_venv_python_version():
1588+
try:
1589+
version = subprocess.check_output(
1590+
[
1591+
get_python_exe(),
1592+
"-c",
1593+
"import sys;print('{0}.{1}.{2}-{3}.{4}'.format(*list(sys.version_info)))"
1594+
], text=True
1595+
)
1596+
return version.strip()
1597+
except subprocess.CalledProcessError as e:
1598+
print("Failed to extract Python version from IDF virtual env!")
1599+
return None
1600+
15871601
def _is_venv_outdated(venv_data_file):
15881602
try:
15891603
with open(venv_data_file, "r", encoding="utf8") as fp:
15901604
venv_data = json.load(fp)
15911605
if venv_data.get("version", "") != IDF_ENV_VERSION:
1606+
print(
1607+
"Warning! IDF virtual environment version changed!"
1608+
)
1609+
return True
1610+
if (
1611+
venv_data.get("python_version", "")
1612+
!= _get_idf_venv_python_version()
1613+
):
1614+
print(
1615+
"Warning! Python version in the IDF virtual environment"
1616+
" differs from the current Python!"
1617+
)
15921618
return True
15931619
return False
15941620
except:
@@ -1603,7 +1629,7 @@ def _create_venv(venv_dir):
16031629

16041630
if os.path.isdir(venv_dir):
16051631
try:
1606-
print("Removing an oudated IDF virtual environment")
1632+
print("Removing an outdated IDF virtual environment")
16071633
shutil.rmtree(venv_dir)
16081634
except OSError:
16091635
print(
@@ -1628,8 +1654,12 @@ def _create_venv(venv_dir):
16281654
venv_data_file = os.path.join(venv_dir, "pio-idf-venv.json")
16291655
if not os.path.isfile(venv_data_file) or _is_venv_outdated(venv_data_file):
16301656
_create_venv(venv_dir)
1657+
install_python_deps()
16311658
with open(venv_data_file, "w", encoding="utf8") as fp:
1632-
venv_info = {"version": IDF_ENV_VERSION}
1659+
venv_info = {
1660+
"version": IDF_ENV_VERSION,
1661+
"python_version": _get_idf_venv_python_version()
1662+
}
16331663
json.dump(venv_info, fp, indent=2)
16341664

16351665

@@ -1648,11 +1678,10 @@ def get_python_exe():
16481678

16491679

16501680
#
1651-
# ESP-IDF requires Python packages with specific versions in a virtual environment
1681+
# Ensure Python environment contains everything required for IDF
16521682
#
16531683

16541684
ensure_python_venv_available()
1655-
install_python_deps()
16561685

16571686
# ESP-IDF package doesn't contain .git folder, instead package version is specified
16581687
# in a special file "version.h" in the root folder of the package
@@ -1858,7 +1887,15 @@ def get_python_exe():
18581887
# Extra flags which need to be explicitly specified in LINKFLAGS section because SCons
18591888
# cannot merge them correctly
18601889
extra_flags = filter_args(
1861-
link_args["LINKFLAGS"], ["-T", "-u", "-Wl,--start-group", "-Wl,--end-group"]
1890+
link_args["LINKFLAGS"],
1891+
[
1892+
"-T",
1893+
"-u",
1894+
"-Wl,--start-group",
1895+
"-Wl,--end-group",
1896+
"-Wl,--whole-archive",
1897+
"-Wl,--no-whole-archive",
1898+
],
18621899
)
18631900
link_args["LINKFLAGS"] = sorted(list(set(link_args["LINKFLAGS"]) - set(extra_flags)))
18641901

@@ -2078,6 +2115,7 @@ def idf_lib_copy(source, target, env):
20782115
shutil.move(join(lib_dst,"libfreertos.a"),join(mem_var,"libfreertos.a"))
20792116
shutil.move(join(lib_dst,"libbootloader_support.a"),join(mem_var,"libbootloader_support.a"))
20802117
shutil.move(join(lib_dst,"libesp_hw_support.a"),join(mem_var,"libesp_hw_support.a"))
2118+
shutil.move(join(lib_dst,"libesp_lcd.a"),join(mem_var,"libesp_lcd.a"))
20812119

20822120
shutil.copyfile(sdkconfig_h_path,join(mem_var,"include","sdkconfig.h"))
20832121
if not bool(os.path.isfile(join(arduino_libs,mcu,"sdkconfig.orig"))):

platform.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"type": "git",
1919
"url": "https://github.com/tasmota/platform-espressif32.git"
2020
},
21-
"version": "2025.01.30",
21+
"version": "2025.02.30",
2222
"frameworks": {
2323
"arduino": {
2424
"script": "builder/frameworks/arduino.py"
@@ -33,25 +33,25 @@
3333
"type": "framework",
3434
"optional": true,
3535
"owner": "tasmota",
36-
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250109/framework-arduinoespressif32.zip"
36+
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250203/framework-arduinoespressif32.zip"
3737
},
3838
"framework-arduino-solo1": {
3939
"type": "framework",
4040
"optional": true,
4141
"owner": "tasmota",
42-
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250109/framework-arduinoespressif32-solo1.zip"
42+
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250203/framework-arduinoespressif32-solo1.zip"
4343
},
4444
"framework-arduino-ITEAD": {
4545
"type": "framework",
4646
"optional": true,
4747
"owner": "tasmota",
48-
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250109/framework-arduinoespressif32-ITEAD.zip"
48+
"version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.1.250203/framework-arduinoespressif32-ITEAD.zip"
4949
},
5050
"framework-espidf": {
5151
"type": "framework",
5252
"optional": true,
5353
"owner": "Jason2866",
54-
"version": "https://github.com/tasmota/esp-idf/releases/download/v5.3.2.250106/esp-idf-v5.3.2.zip"
54+
"version": "https://github.com/tasmota/esp-idf/releases/download/v5.3.2.250120/esp-idf-v5.3.2.zip"
5555
},
5656
"toolchain-xtensa-esp-elf": {
5757
"type": "toolchain",
@@ -86,7 +86,7 @@
8686
"tool-esptoolpy": {
8787
"type": "uploader",
8888
"owner": "tasmota",
89-
"version": "https://github.com/tasmota/esptool/releases/download/v4.8.6/esptool.zip"
89+
"version": "https://github.com/tasmota/esptool/releases/download/v4.8.7/esptool.zip"
9090
},
9191
"tool-dfuutil-arduino": {
9292
"type": "uploader",
@@ -111,6 +111,21 @@
111111
"owner": "platformio",
112112
"version": "~2.0.0"
113113
},
114+
"tool-cppcheck": {
115+
"optional": true,
116+
"owner": "platformio",
117+
"version": "^1.21100.241030"
118+
},
119+
"tool-clangtidy": {
120+
"optional": true,
121+
"owner": "platformio",
122+
"version": "^1.190100.0"
123+
},
124+
"tool-pvs-studio": {
125+
"optional": true,
126+
"owner": "platformio",
127+
"version": "^7.18.59866"
128+
},
114129
"tool-cmake": {
115130
"optional": true,
116131
"owner": "platformio",

platform.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ def configure_default_packages(self, variables, targets):
5656
self.packages["framework-espidf"]["optional"] = False
5757
self.packages["framework-arduinoespressif32"]["optional"] = False
5858

59+
# Enable check tools only when "check_tool" is enabled
60+
for p in self.packages:
61+
if p in ("tool-cppcheck", "tool-clangtidy", "tool-pvs-studio"):
62+
self.packages[p]["optional"] = False if str(variables.get("check_tool")).strip("['']") in p else True
63+
5964
if "buildfs" in targets:
6065
filesystem = variables.get("board_build.filesystem", "littlefs")
6166
if filesystem == "littlefs":

0 commit comments

Comments
 (0)