diff --git a/examples/arduino-wifiscan/platformio.ini b/examples/arduino-wifiscan/platformio.ini index ea44328ba..a80b5939a 100644 --- a/examples/arduino-wifiscan/platformio.ini +++ b/examples/arduino-wifiscan/platformio.ini @@ -29,6 +29,23 @@ upload_protocol = esp-builtin monitor_speed = 115200 check_tool = cppcheck +[env:esp32-c2] +platform = espressif32 +framework = arduino +board = esp32-c2-devkitm-1 +upload_protocol = esp-prog +monitor_speed = 115200 +check_tool = clangtidy +custom_component_remove = + espressif/esp-dsp + espressif/network_provisioning + espressif/esp-zboss-lib + espressif/esp-zigbee-lib + espressif/esp_rainmaker + espressif/esp-sr + espressif/esp-modbus + espressif/esp32-camera + [env:esp32-c3] platform = espressif32 framework = arduino diff --git a/platform.json b/platform.json index 6d2ed2f08..eca066cb9 100644 --- a/platform.json +++ b/platform.json @@ -56,20 +56,20 @@ "toolchain-xtensa-esp-elf": { "type": "toolchain", "optional": true, - "owner": "platformio", - "version": "14.2.0+20241119" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/xtensa-esp-elf-14.2.0_20241119.zip" }, "toolchain-riscv32-esp": { "type": "toolchain", "optional": true, - "owner": "platformio", - "version": "14.2.0+20241119" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/riscv32-esp-elf-14.2.0_20241119.zip" }, "toolchain-esp32ulp": { "type": "toolchain", "optional": true, - "owner": "platformio", - "version": "~1.23800.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/esp32ulp-elf-2.38_20240113.zip" }, "tool-xtensa-esp-elf-gdb": { "type": "debugger", @@ -98,8 +98,8 @@ "tool-dfuutil-arduino": { "type": "uploader", "optional": true, - "owner": "platformio", - "version": "~1.11.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/dfuutil-arduino-v1.11.0.zip" }, "tool-openocd-esp32": { "type": "debugger", @@ -110,62 +110,62 @@ "tool-mklittlefs": { "type": "uploader", "optional": true, - "owner": "tasmota", - "version": "^3.2.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mklittlefs-3.2.0.zip" }, "tool-mkfatfs": { "type": "uploader", "optional": true, - "owner": "platformio", - "version": "~2.0.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mkfatfs-v2.0.1.zip" }, "tool-mkspiffs": { "type": "uploader", "optional": true, - "owner": "platformio", - "version": "~2.230.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mkspiffs-v2.230.0.zip" }, "tool-cppcheck": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "~1.21100" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/cppcheck-v2.11.0-230717.zip" }, "tool-clangtidy": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "^1.190100.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/clangtidy-v18.1.1.zip" }, "tool-pvs-studio": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "^7.18.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/pvs-studio-v7.18.zip" }, "tool-cmake": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "~3.30.2" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/cmake-3.30.2.zip" }, "tool-esp-rom-elfs": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "0.0.1+20241011" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/esp-rom-elfs-20241011.zip" }, "tool-ninja": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "^1.7.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/ninja-1.10.2.zip" }, "tool-scons": { "type": "tool", "optional": true, - "owner": "platformio", - "version": "~4.40801.0" + "owner": "pioarduino", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/scons-4.8.1.zip" } } } diff --git a/platform.py b/platform.py index b5dac1b35..ad350317f 100644 --- a/platform.py +++ b/platform.py @@ -129,13 +129,13 @@ def install_tool(TOOL): if mcu in supported_mcus: # Set mandatory toolchains for toolchain in toolchain_data["toolchains"]: - self.packages[toolchain]["optional"] = False + install_tool(toolchain) # Set ULP toolchain if applicable ulp_toolchain = toolchain_data.get("ulp_toolchain") if ulp_toolchain and os.path.isdir("ulp"): for toolchain in ulp_toolchain: - self.packages[toolchain]["optional"] = False + install_tool(toolchain) # Install debug tools if conditions match if (variables.get("build_type") or "debug" in "".join(targets)) or variables.get("upload_protocol"): for debug_tool in toolchain_data["debug_tools"]: @@ -152,7 +152,7 @@ def install_tool(TOOL): ] if "espidf" in frameworks: for package in COMMON_IDF_PACKAGES: - self.packages[package]["optional"] = False + install_tool(package) CHECK_PACKAGES = [ "tool-cppcheck", @@ -164,28 +164,28 @@ def install_tool(TOOL): for package in CHECK_PACKAGES: for check_tool in variables.get("check_tool", ""): if check_tool in package: - self.packages[package]["optional"] = False + install_tool(package) if "buildfs" in targets: filesystem = variables.get("board_build.filesystem", "littlefs") if filesystem == "littlefs": - self.packages["tool-mklittlefs"]["optional"] = False + install_tool("tool-mklittlefs") elif filesystem == "fatfs": - self.packages["tool-mkfatfs"]["optional"] = False + install_tool("tool-mkfatfs") else: - self.packages["tool-mkspiffs"]["optional"] = False + install_tool("tool-mkspiffs") if "downloadfs" in targets: filesystem = variables.get("board_build.filesystem", "littlefs") if filesystem == "littlefs": # Use Tasmota mklittlefs v4.0.0 to unpack, older version is incompatible - self.packages["tool-mklittlefs"]["version"] = "~4.0.0" + self.packages["tool-mklittlefs"]["version"] = "https://github.com/pioarduino/registry/releases/download/0.0.1/mklittlefs-4.0.0.zip" + self.packages["tool-mklittlefs"]["optional"] = False + install_tool("tool-mklittlefs") # Currently only Arduino Nano ESP32 uses the dfuutil tool as uploader if variables.get("board") == "arduino_nano_esp32": - self.packages["tool-dfuutil-arduino"]["optional"] = False - else: - del self.packages["tool-dfuutil-arduino"] + install_tool("tool-dfuutil-arduino") return super().configure_default_packages(variables, targets)