Skip to content

Commit 0bad580

Browse files
authored
add C2 skeleton to espidf builder
for building C2 as an component of IDF
1 parent 7466223 commit 0bad580

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,14 @@ def _get_installed_standard_pip_packages():
155155
):
156156
print("Warning! Debugging an IDF project requires PlatformIO Core >= 6.1.11!")
157157

158-
# Arduino framework as a component is not compatible with ESP-IDF >5.3
159158
if "arduino" in env.subst("$PIOFRAMEWORK"):
160159
ARDUINO_FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
161160
ARDUINO_FRMWRK_LIB_DIR = platform.get_package_dir("framework-arduinoespressif32-libs")
161+
if mcu == "esp32c2":
162+
ARDUINO_FRMWRK_C2_LIB_DIR = join(platform.get_package_dir("framework-arduinoespressif32-libs"),mcu)
163+
if not os.path.exists(ARDUINO_FRMWRK_C2_LIB_DIR):
164+
ARDUINO_C2_DIR = join(platform.get_package_dir("framework-arduino-c2-skeleton-lib"),mcu)
165+
shutil.copytree(ARDUINO_C2_DIR, ARDUINO_FRMWRK_C2_LIB_DIR, dirs_exist_ok=True)
162166
# Possible package names in 'package@version' format is not compatible with CMake
163167
if "@" in os.path.basename(ARDUINO_FRAMEWORK_DIR):
164168
new_path = os.path.join(

0 commit comments

Comments
 (0)