Skip to content
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

Support Arduino ESP32 alpha/RC v3.0.0 based on ESP-IDF v5.1 #1281

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
"owner": "platformio",
"version": "~3.20014.0"
},
"framework-arduinoespressif32-libs": {
"type": "sdk",
"optional": true,
"owner": "espressif",
"version": "~5.1.0"
},
"framework-espidf": {
"type": "framework",
"optional": true,
Expand Down
6 changes: 5 additions & 1 deletion platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,15 @@ def _parse_version(original_version):
r"^gcc(?P<MAJOR>\d+)_(?P<MINOR>\d+)_(?P<PATCH>\d+)-esp-(?P<EXTRA>.+)$",
r"^esp-(?P<EXTRA>.+)-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.?(?P<PATCH>\d+)$",
r"^esp-(?P<MAJOR>\d+)\.(?P<MINOR>\d+)\.(?P<PATCH>\d+)(_(?P<EXTRA>.+))?$",
r"^idf-release_v(?P<MAJOR>\d+)\.(?P<MINOR>\d+)(.(?P<PATCH>\d+))?(-(?P<EXTRA>.+))?$",
)
for pattern in version_patterns:
match = re.search(pattern, original_version)
if match:
result = "%s.%s.%s" % (
match.group("MAJOR"),
match.group("MINOR"),
match.group("PATCH"),
match.group("PATCH") if match.group("PATCH") is not None else "0",
)
if match.group("EXTRA"):
result = result + "+%s" % match.group("EXTRA")
Expand All @@ -326,6 +327,7 @@ def _parse_version(original_version):
)

toolchain_remap = {
"esp32-arduino-libs": "framework-arduinoespressif32-libs",
"xtensa-esp32-elf-gcc": "toolchain-xtensa-esp32",
"xtensa-esp32s2-elf-gcc": "toolchain-xtensa-esp32s2",
"xtensa-esp32s3-elf-gcc": "toolchain-xtensa-esp32s3",
Expand Down Expand Up @@ -385,6 +387,8 @@ def configure_arduino_toolchains(self, package_index):
self.packages[toolchain_package]["version"] = version
self.packages[toolchain_package]["owner"] = "espressif"
self.packages[toolchain_package]["type"] = "toolchain"
if (toolchain_package == "framework-arduinoespressif32-libs"):
self.packages[toolchain_package]["optional"] = False

def configure_upstream_arduino_packages(self, url_items):
framework_index_file = os.path.join(
Expand Down