-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: Added platform_packages for esp32s2, c3, s3 #4830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -296,6 +296,7 @@ board_build.partitions = ${esp32.default_partitions} ;; default partioning for | |||||||
| [esp32s2] | ||||||||
| ;; generic definitions for all ESP32-S2 boards | ||||||||
| platform = ${esp32_idf_V4.platform} | ||||||||
| platform_packages = ${esp32.platform_packages} | ||||||||
| build_unflags = ${common.build_unflags} | ||||||||
| build_flags = -g | ||||||||
| -DARDUINO_ARCH_ESP32 | ||||||||
|
|
@@ -315,6 +316,7 @@ board_build.partitions = ${esp32.default_partitions} ;; default partioning for | |||||||
| [esp32c3] | ||||||||
| ;; generic definitions for all ESP32-C3 boards | ||||||||
| platform = ${esp32_idf_V4.platform} | ||||||||
| platform_packages = ${esp32.platform_packages} | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion ESP32-C3 likely needs Arduino-ESP32 2.x; avoid overriding with 1.x Using ${esp32.platform_packages} here pulls in arduino-esp32 1.0.6.x, which is not suitable for C3 on IDF v4. This can cause build or runtime issues (USB CDC, target configs). Either remove the override or introduce an IDF v4-compatible package reference (e.g., 2.0.9) that matches ${esp32_idf_V4.platform}. If you want consistency, define a dedicated variable (e.g., esp32_idf_V4.platform_packages) and reference that here. - platform_packages = ${esp32.platform_packages}
+ ; platform_packages intentionally omitted (use defaults from ${esp32_idf_V4.platform})
+ ; or: platform_packages = framework-arduinoespressif32 @ ~2.0.9 ; ensure compatibility with chosen platform📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| build_unflags = ${common.build_unflags} | ||||||||
| build_flags = -g | ||||||||
| -DARDUINO_ARCH_ESP32 | ||||||||
|
|
@@ -334,6 +336,7 @@ board_build.flash_mode = qio | |||||||
| [esp32s3] | ||||||||
| ;; generic definitions for all ESP32-S3 boards | ||||||||
| platform = ${esp32_idf_V4.platform} | ||||||||
| platform_packages = ${esp32.platform_packages} | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainESP32-S3 framework mismatch risk Same concern: ${esp32.platform_packages} points to Arduino-ESP32 1.0.6.x, which doesn’t properly support S3 features and doesn’t align with the Tasmota IDF v4 platform in use. This override can silently downgrade framework components and break USB/config macros. The summary claims this will “mirror the base ESP32 platform packages” and affect those builds; however, most S3 environments here do not extend [esp32s3] and don’t reference ${esp32s3.platform_packages}, so this change may be a no-op for them. Please verify inheritance/usage. Recommended change: - platform_packages = ${esp32.platform_packages}
+ ; platform_packages intentionally omitted to use framework bundled with ${esp32_idf_V4.platform}🏁 Script executed: #!/bin/bash
set -e
echo "Do S3 envs consume esp32s3.platform_packages?"
rg -n '\$\{esp32s3\.platform_packages\}' platformio.ini || true
echo
echo "Which S3 envs set platform directly?"
rg -n '^\[env:esp32s3' -n platformio.ini
rg -n -A3 '^\[env:esp32s3' platformio.ini
echo
echo "List platform for these envs:"
rg -n '^\s*platform\s*=' platformio.ini | rg 'esp32s3' -nLength of output: 1498 🏁 Script executed: #!/bin/bash
set -e
echo "Showing lines 330–350 around the platform_packages override in platformio.ini:"
sed -n '330,350p' platformio.iniLength of output: 1010 Remove the unused The line platform_packages = ${esp32.platform_packages}in the • File: platformio.ini (around line 339) Suggested diff: [esp32s3]
- platform_packages = ${esp32.platform_packages}🤖 Prompt for AI Agents |
||||||||
| build_unflags = ${common.build_unflags} | ||||||||
| build_flags = -g | ||||||||
| -DESP32 | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Potentially incompatible framework override for ESP32-S2
This forces the Arduino-ESP32 1.x framework (${esp32.platform_packages} → 1.0.6.x) onto an IDF v4-based platform (${esp32_idf_V4.platform}), which is likely incompatible (USB stack and S2 support rely on 2.x). Prefer omitting platform_packages here to let the selected platform supply the correct framework, or explicitly point to an IDF v4/Arduino 2.0.9-compatible framework if you must override.
Run to confirm whether any env actually consumes this new key and to assess impact:
Suggested safe change (omit the override):
🏁 Script executed:
Length of output: 2994
🏁 Script executed:
Length of output: 134
Remove incompatible Arduino-ESP32 1.x overrides from IDF v4 environments
The three environments targeting
${esp32_idf_V4.platform}currently force the old Arduino-ESP32 1.x framework (IDF v3) viaplatform_packages = ${esp32.platform_packages}, which will break USB/S2/S3 support. You should let the IDF v4-based platform supply its matching Arduino-ESP32 2.x framework by removing these overrides (or, if you really need a custom override, point to a known 2.x release).Locations to fix in platformio.ini:
Apply the same change in each section:
📝 Committable suggestion
🤖 Prompt for AI Agents