68
68
"https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json,"
69
69
"https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json,"
70
70
"https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json,"
71
- "https://drazzy.good-enough.cloud/package_drazzy.com_index.json"
71
+ "https://drazzy.good-enough.cloud/package_drazzy.com_index.json,"
72
+ "https://github.com/openwch/board_manager_files/raw/main/package_ch32v_index.json"
72
73
)
73
74
74
75
# global exit code
75
76
success = 0
76
77
78
+
77
79
class ColorPrint :
78
80
79
81
@staticmethod
@@ -96,6 +98,7 @@ def print_info(message, end = '\n'):
96
98
def print_bold (message , end = '\n ' ):
97
99
sys .stdout .write ('\x1b [1;37m' + message .strip () + '\x1b [0m' + end )
98
100
101
+
99
102
def manually_install_esp32_bsp (repo_info ):
100
103
print ("Manually installing latest ESP32 BSP..." )
101
104
# Assemble git url
@@ -130,6 +133,7 @@ def manually_install_esp32_bsp(repo_info):
130
133
print (out )
131
134
print ("Installed ESP32 BSP from source!" )
132
135
136
+
133
137
def install_platform (fqbn , full_platform_name = None ):
134
138
if os .path .exists ("/home/runner/.arduino15/package_drazzy.json" ):
135
139
print ("Moving drazzy.json" )
@@ -153,6 +157,7 @@ def install_platform(fqbn, full_platform_name=None):
153
157
# print installed core version
154
158
print (os .popen ('arduino-cli core list | grep {}' .format (fqbn )).read (), end = '' )
155
159
160
+
156
161
def run_or_die (cmd , error ):
157
162
print (cmd )
158
163
attempt = 0
@@ -225,18 +230,21 @@ def install_library_deps():
225
230
226
231
################################ UF2 Utils.
227
232
233
+
228
234
def glob01 (pattern ):
229
235
result = glob .glob (pattern )
230
236
if len (result ) > 1 :
231
237
raise RuntimeError (f"Required pattern { pattern } to match at most 1 file, got { result } " )
232
238
return result [0 ] if result else None
233
239
240
+
234
241
def glob1 (pattern ):
235
242
result = glob .glob (pattern )
236
243
if len (result ) != 1 :
237
244
raise RuntimeError (f"Required pattern { pattern } to match exactly 1 file, got { result } " )
238
245
return result [0 ]
239
246
247
+
240
248
def download_uf2_utils ():
241
249
"""Downloads uf2conv tools if we don't already have them
242
250
"""
0 commit comments