Skip to content

Commit f4def7f

Browse files
authored
Remove all dependencies to Platformio registry (#160)
1 parent d501a0a commit f4def7f

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
@@ -129,13 +129,13 @@ def install_tool(TOOL):
129129
if mcu in supported_mcus:
130130
# Set mandatory toolchains
131131
for toolchain in toolchain_data["toolchains"]:
132-
self.packages[toolchain]["optional"] = False
132+
install_tool(toolchain)
133133

134134
# Set ULP toolchain if applicable
135135
ulp_toolchain = toolchain_data.get("ulp_toolchain")
136136
if ulp_toolchain and os.path.isdir("ulp"):
137137
for toolchain in ulp_toolchain:
138-
self.packages[toolchain]["optional"] = False
138+
install_tool(toolchain)
139139
# Install debug tools if conditions match
140140
if (variables.get("build_type") or "debug" in "".join(targets)) or variables.get("upload_protocol"):
141141
for debug_tool in toolchain_data["debug_tools"]:
@@ -152,7 +152,7 @@ def install_tool(TOOL):
152152
]
153153
if "espidf" in frameworks:
154154
for package in COMMON_IDF_PACKAGES:
155-
self.packages[package]["optional"] = False
155+
install_tool(package)
156156

157157
CHECK_PACKAGES = [
158158
"tool-cppcheck",
@@ -164,28 +164,28 @@ def install_tool(TOOL):
164164
for package in CHECK_PACKAGES:
165165
for check_tool in variables.get("check_tool", ""):
166166
if check_tool in package:
167-
self.packages[package]["optional"] = False
167+
install_tool(package)
168168

169169
if "buildfs" in targets:
170170
filesystem = variables.get("board_build.filesystem", "littlefs")
171171
if filesystem == "littlefs":
172-
self.packages["tool-mklittlefs"]["optional"] = False
172+
install_tool("tool-mklittlefs")
173173
elif filesystem == "fatfs":
174-
self.packages["tool-mkfatfs"]["optional"] = False
174+
install_tool("tool-mkfatfs")
175175
else:
176-
self.packages["tool-mkspiffs"]["optional"] = False
176+
install_tool("tool-mkspiffs")
177177

178178
if "downloadfs" in targets:
179179
filesystem = variables.get("board_build.filesystem", "littlefs")
180180
if filesystem == "littlefs":
181181
# Use Tasmota mklittlefs v4.0.0 to unpack, older version is incompatible
182-
self.packages["tool-mklittlefs"]["version"] = "~4.0.0"
182+
self.packages["tool-mklittlefs"]["version"] = "https://github.com/pioarduino/registry/releases/download/0.0.1/mklittlefs-4.0.0.zip"
183+
self.packages["tool-mklittlefs"]["optional"] = False
184+
install_tool("tool-mklittlefs")
183185

184186
# Currently only Arduino Nano ESP32 uses the dfuutil tool as uploader
185187
if variables.get("board") == "arduino_nano_esp32":
186-
self.packages["tool-dfuutil-arduino"]["optional"] = False
187-
else:
188-
del self.packages["tool-dfuutil-arduino"]
188+
install_tool("tool-dfuutil-arduino")
189189

190190
return super().configure_default_packages(variables, targets)
191191

0 commit comments

Comments
 (0)