diff --git a/platform.py b/platform.py index 6c9b4ac3d..48822845a 100644 --- a/platform.py +++ b/platform.py @@ -150,15 +150,15 @@ def configure_default_packages(self, variables, targets): self.packages["riscv32-esp-elf"]["optional"] = False self.packages["riscv32-esp-elf"]["version"] = tc_path - # Enable FSM ULP toolchain for ESP32S2, ESP32S3 when IDF is selected - for available_mcu in ("esp32s2", "esp32s3"): - if "espidf" and available_mcu == mcu and tl_flag: + # Enable FSM ULP toolchain for ESP32, ESP32S2, ESP32S3 when IDF is selected + for available_mcu in ("esp32", "esp32s2", "esp32s3"): + if "espidf" in frameworks and available_mcu == mcu and tl_flag: tc_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tc-ulp") self.packages["esp32ulp-elf"]["optional"] = False self.packages["esp32ulp-elf"]["version"] = tc_path # Enable RISC-V ULP toolchain for ESP32C6, ESP32S2, ESP32S3 when IDF is selected for available_mcu in ("esp32s2", "esp32s3", "esp32c6"): - if "espidf" and available_mcu == mcu and tl_flag: + if "espidf" in frameworks and available_mcu == mcu and tl_flag: tc_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tc-rv32") self.packages["riscv32-esp-elf"]["optional"] = False self.packages["riscv32-esp-elf"]["version"] = tc_path