6868 "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json,"
6969 "https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json,"
7070 "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"
7273)
7374
7475# global exit code
7576success = 0
7677
78+
7779class ColorPrint :
7880
7981 @staticmethod
@@ -96,6 +98,7 @@ def print_info(message, end = '\n'):
9698 def print_bold (message , end = '\n ' ):
9799 sys .stdout .write ('\x1b [1;37m' + message .strip () + '\x1b [0m' + end )
98100
101+
99102def manually_install_esp32_bsp (repo_info ):
100103 print ("Manually installing latest ESP32 BSP..." )
101104 # Assemble git url
@@ -130,6 +133,7 @@ def manually_install_esp32_bsp(repo_info):
130133 print (out )
131134 print ("Installed ESP32 BSP from source!" )
132135
136+
133137def install_platform (fqbn , full_platform_name = None ):
134138 if os .path .exists ("/home/runner/.arduino15/package_drazzy.json" ):
135139 print ("Moving drazzy.json" )
@@ -153,6 +157,7 @@ def install_platform(fqbn, full_platform_name=None):
153157 # print installed core version
154158 print (os .popen ('arduino-cli core list | grep {}' .format (fqbn )).read (), end = '' )
155159
160+
156161def run_or_die (cmd , error ):
157162 print (cmd )
158163 attempt = 0
@@ -225,18 +230,21 @@ def install_library_deps():
225230
226231################################ UF2 Utils.
227232
233+
228234def glob01 (pattern ):
229235 result = glob .glob (pattern )
230236 if len (result ) > 1 :
231237 raise RuntimeError (f"Required pattern { pattern } to match at most 1 file, got { result } " )
232238 return result [0 ] if result else None
233239
240+
234241def glob1 (pattern ):
235242 result = glob .glob (pattern )
236243 if len (result ) != 1 :
237244 raise RuntimeError (f"Required pattern { pattern } to match exactly 1 file, got { result } " )
238245 return result [0 ]
239246
247+
240248def download_uf2_utils ():
241249 """Downloads uf2conv tools if we don't already have them
242250 """
0 commit comments