Skip to content

Commit ce5de11

Browse files
authored
install all tools and toolchains from free open source github repos (#161)
1 parent 74fe91d commit ce5de11

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

platform.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@
5656
"toolchain-xtensa-esp-elf": {
5757
"type": "toolchain",
5858
"optional": true,
59-
"owner": "platformio",
60-
"version": "14.2.0+20241119"
59+
"owner": "pioarduino",
60+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/xtensa-esp-elf-14.2.0_20241119.zip"
6161
},
6262
"toolchain-riscv32-esp": {
6363
"type": "toolchain",
6464
"optional": true,
65-
"owner": "platformio",
66-
"version": "14.2.0+20241119"
65+
"owner": "pioarduino",
66+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/riscv32-esp-elf-14.2.0_20241119.zip"
6767
},
6868
"toolchain-esp32ulp": {
6969
"type": "toolchain",
7070
"optional": true,
71-
"owner": "platformio",
72-
"version": "~1.23800.0"
71+
"owner": "pioarduino",
72+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/esp32ulp-elf-2.38_20240113.zip"
7373
},
7474
"tool-xtensa-esp-elf-gdb": {
7575
"type": "debugger",
@@ -98,8 +98,8 @@
9898
"tool-dfuutil-arduino": {
9999
"type": "uploader",
100100
"optional": true,
101-
"owner": "platformio",
102-
"version": "~1.11.0"
101+
"owner": "pioarduino",
102+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/dfuutil-arduino-v1.11.0.zip"
103103
},
104104
"tool-openocd-esp32": {
105105
"type": "debugger",
@@ -110,62 +110,62 @@
110110
"tool-mklittlefs": {
111111
"type": "uploader",
112112
"optional": true,
113-
"owner": "tasmota",
114-
"version": "^3.2.0"
113+
"owner": "pioarduino",
114+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mklittlefs-3.2.0.zip"
115115
},
116116
"tool-mkfatfs": {
117117
"type": "uploader",
118118
"optional": true,
119-
"owner": "platformio",
120-
"version": "~2.0.0"
119+
"owner": "pioarduino",
120+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mkfatfs-v2.0.1.zip"
121121
},
122122
"tool-mkspiffs": {
123123
"type": "uploader",
124124
"optional": true,
125-
"owner": "platformio",
126-
"version": "~2.230.0"
125+
"owner": "pioarduino",
126+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/mkspiffs-v2.230.0.zip"
127127
},
128128
"tool-cppcheck": {
129129
"type": "tool",
130130
"optional": true,
131-
"owner": "platformio",
132-
"version": "~1.21100"
131+
"owner": "pioarduino",
132+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/cppcheck-v2.11.0-230717.zip"
133133
},
134134
"tool-clangtidy": {
135135
"type": "tool",
136136
"optional": true,
137-
"owner": "platformio",
138-
"version": "^1.190100.0"
137+
"owner": "pioarduino",
138+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/clangtidy-v18.1.1.zip"
139139
},
140140
"tool-pvs-studio": {
141141
"type": "tool",
142142
"optional": true,
143-
"owner": "platformio",
144-
"version": "^7.18.0"
143+
"owner": "pioarduino",
144+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/pvs-studio-v7.18.zip"
145145
},
146146
"tool-cmake": {
147147
"type": "tool",
148148
"optional": true,
149-
"owner": "platformio",
150-
"version": "~3.30.2"
149+
"owner": "pioarduino",
150+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/cmake-3.30.2.zip"
151151
},
152152
"tool-esp-rom-elfs": {
153153
"type": "tool",
154154
"optional": true,
155-
"owner": "platformio",
156-
"version": "0.0.1+20241011"
155+
"owner": "pioarduino",
156+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/esp-rom-elfs-20241011.zip"
157157
},
158158
"tool-ninja": {
159159
"type": "tool",
160160
"optional": true,
161-
"owner": "platformio",
162-
"version": "^1.7.0"
161+
"owner": "pioarduino",
162+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/ninja-1.10.2.zip"
163163
},
164164
"tool-scons": {
165165
"type": "tool",
166166
"optional": true,
167-
"owner": "platformio",
168-
"version": "~4.40801.0"
167+
"owner": "pioarduino",
168+
"version": "https://github.com/pioarduino/registry/releases/download/0.0.1/scons-4.8.1.zip"
169169
}
170170
}
171171
}

platform.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ def install_tool(TOOL):
134134
if mcu in supported_mcus:
135135
# Set mandatory toolchains
136136
for toolchain in toolchain_data["toolchains"]:
137-
self.packages[toolchain]["optional"] = False
137+
install_tool(toolchain)
138138

139139
# Set ULP toolchain if applicable
140140
ulp_toolchain = toolchain_data.get("ulp_toolchain")
141141
if ulp_toolchain and os.path.isdir("ulp"):
142142
for toolchain in ulp_toolchain:
143-
self.packages[toolchain]["optional"] = False
143+
install_tool(toolchain)
144144
# Install debug tools if conditions match
145145
if (variables.get("build_type") or "debug" in "".join(targets)) or variables.get("upload_protocol"):
146146
for debug_tool in toolchain_data["debug_tools"]:
@@ -157,7 +157,7 @@ def install_tool(TOOL):
157157
]
158158
if "espidf" in frameworks:
159159
for package in COMMON_IDF_PACKAGES:
160-
self.packages[package]["optional"] = False
160+
install_tool(package)
161161

162162
CHECK_PACKAGES = [
163163
"tool-cppcheck",
@@ -169,28 +169,28 @@ def install_tool(TOOL):
169169
for package in CHECK_PACKAGES:
170170
for check_tool in variables.get("check_tool", ""):
171171
if check_tool in package:
172-
self.packages[package]["optional"] = False
172+
install_tool(package)
173173

174174
if "buildfs" in targets:
175175
filesystem = variables.get("board_build.filesystem", "littlefs")
176176
if filesystem == "littlefs":
177-
self.packages["tool-mklittlefs"]["optional"] = False
177+
install_tool("tool-mklittlefs")
178178
elif filesystem == "fatfs":
179-
self.packages["tool-mkfatfs"]["optional"] = False
179+
install_tool("tool-mkfatfs")
180180
else:
181-
self.packages["tool-mkspiffs"]["optional"] = False
181+
install_tool("tool-mkspiffs")
182182

183183
if "downloadfs" in targets:
184184
filesystem = variables.get("board_build.filesystem", "littlefs")
185185
if filesystem == "littlefs":
186186
# Use Tasmota mklittlefs v4.0.0 to unpack, older version is incompatible
187-
self.packages["tool-mklittlefs"]["version"] = "~4.0.0"
187+
self.packages["tool-mklittlefs"]["version"] = "https://github.com/pioarduino/registry/releases/download/0.0.1/mklittlefs-4.0.0.zip"
188+
self.packages["tool-mklittlefs"]["optional"] = False
189+
install_tool("tool-mklittlefs")
188190

189191
# Currently only Arduino Nano ESP32 uses the dfuutil tool as uploader
190192
if variables.get("board") == "arduino_nano_esp32":
191-
self.packages["tool-dfuutil-arduino"]["optional"] = False
192-
else:
193-
del self.packages["tool-dfuutil-arduino"]
193+
install_tool("tool-dfuutil-arduino")
194194

195195
return super().configure_default_packages(variables, targets)
196196

0 commit comments

Comments
 (0)