From 5ed67463534849d7e665d779c44da6d7624e931d Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 29 Jul 2024 19:05:21 +0100 Subject: [PATCH 1/9] Add project dependencies output --- build_platform.py | 168 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 138 insertions(+), 30 deletions(-) diff --git a/build_platform.py b/build_platform.py index 2b0d723..8f48201 100755 --- a/build_platform.py +++ b/build_platform.py @@ -29,6 +29,19 @@ sys.argv.pop(sys.argv.index("--build_timeout") + 1) sys.argv.remove("--build_timeout") +# optional wippersnapper argument to generate a dependencies header file +PRINT_DEPENDENCIES_AS_HEADER = False +INCLUDE_PRINT_DEPENDENCIES_HEADER = False +PRINT_DEPENDENCIES_AS_HEADER_FILENAME = None +if "--include_print_dependencies_header" in sys.argv: + # check argument not null and folder path exists + PRINT_DEPENDENCIES_AS_HEADER_FILENAME = sys.argv[sys.argv.index("--include_print_dependencies_header") + 1] if len(sys.argv) > sys.argv.index("--include_print_dependencies_header") + 1 else None + if PRINT_DEPENDENCIES_AS_HEADER_FILENAME is None or not os.path.exists(PRINT_DEPENDENCIES_AS_HEADER_FILENAME): + raise AttributeError("Header file path not found or not provided to --include_print_dependencies_header argument") + INCLUDE_PRINT_DEPENDENCIES_HEADER = True + sys.argv.pop(sys.argv.index("--include_print_dependencies_header") + 1) + sys.argv.remove("--include_print_dependencies_header") + # add user bin to path! BUILD_DIR = '' # add user bin to path! @@ -56,9 +69,6 @@ print("Found MetroX Examples Repo") IS_LEARNING_SYS = True -#os.system('pwd') -#os.system('ls -lA') - CROSS = u'\N{cross mark}' CHECK = u'\N{check mark}' @@ -104,7 +114,7 @@ def manually_install_esp32_bsp(repo_info): # Assemble git url repo_url = "git clone -b {0} https://github.com/{1}/arduino-esp32.git esp32".format(repo_info.split("/")[1], repo_info.split("/")[0]) # Locally clone repo (https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux) - os.system("mkdir -p /home/runner/Arduino/hardware/espressif") + subprocess.run("mkdir -p /home/runner/Arduino/hardware/espressif", shell=True, check=True) print("Cloning %s"%repo_url) cmd = "cd /home/runner/Arduino/hardware/espressif && " + repo_url proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -135,10 +145,11 @@ def manually_install_esp32_bsp(repo_info): def install_platform(fqbn, full_platform_name=None): + print("Checking for drazzy.json (before moving)") if os.path.exists("/home/runner/.arduino15/package_drazzy.json"): print("Moving drazzy.json") shutil.move("/home/runner/.arduino15/package_drazzy.json", "/home/runner/.arduino15/package_drazzy.com_index.json") - print("Installing", fqbn, end=" ") + print("Installing", fqbn, " (", full_platform_name, ")", end=" ") if fqbn == "adafruit:avr": # we have a platform dep install_platform("arduino:avr", full_platform_name) if full_platform_name[2] is not None: @@ -147,7 +158,7 @@ def install_platform(fqbn, full_platform_name=None): return # bail out for retry in range(0, 3): print("arduino-cli core install "+fqbn+" --additional-urls "+BSP_URLS) - if os.system("arduino-cli core install "+fqbn+" --additional-urls "+BSP_URLS+" > /dev/null") == 0: + if subprocess.run("arduino-cli core install "+fqbn+" --additional-urls "+BSP_URLS+" > /dev/null", shell=True, check=False).returncode == 0: break print("...retrying...", end=" ") time.sleep(10) # wait 10 seconds then try again? @@ -157,14 +168,16 @@ def install_platform(fqbn, full_platform_name=None): exit(-1) ColorPrint.print_pass(CHECK) # print installed core version - print(os.popen('arduino-cli core list | grep {}'.format(fqbn)).read(), end='') + result = subprocess.Popen('arduino-cli core list | grep {}'.format(fqbn), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + print(result.stdout.read().decode(), end='') + def run_or_die(cmd, error): print(cmd) attempt = 0 while attempt < 3: - if os.system(cmd) == 0: + if subprocess.run(cmd, shell=True, check=False).returncode == 0: return attempt += 1 print('attempt {} failed, {} retry left'.format(attempt, 3-attempt)) @@ -175,7 +188,7 @@ def run_or_die(cmd, error): def is_library_installed(lib_name): try: - installed_libs = subprocess.check_output(["arduino-cli", "lib", "list"]).decode("utf-8") + installed_libs = subprocess.check_output("arduino-cli lib list", shell=True).decode("utf-8") return not all(not item for item in [re.match('^'+lib_name+'\\s*\\d+\\.', line) for line in installed_libs.split('\n')]) except subprocess.CalledProcessError as e: print("Error checking installed libraries:", e) @@ -290,6 +303,7 @@ def generate_uf2(platform, fqbn, example_path): family_id = ALL_PLATFORMS[platform][1] cmd = ['python3', 'uf2conv.py', hex_input_file, '-c', '-f', family_id, '-o', output_file] else: + # ColorPrint.print_info(subprocess.check_output(["tree"]).decode("utf-8")) cli_build_path = "build/*.*." + fqbn.split(':')[2] + "/*.ino.bin" input_file = glob1(os.path.join(example_path, cli_build_path)) output_file = os.path.splitext(input_file)[0] + ".uf2" @@ -329,27 +343,101 @@ def group_output(title): sys.stdout.flush() +def extract_dependencies(output): + print("Extracting libraries from output:", output) + print(f"{"############## Done #############":-^80}") + + IS_LIBS_FOUND = False + IS_BSP_FOUND = False + libraries = [] + platforms = [] + COLS = [] + for i,line in enumerate(output.split('\n')): + if line.strip() == '': + continue + if not IS_LIBS_FOUND: + if re.match(r'Used library', line): + IS_LIBS_FOUND = True + print("Found libraries token using regex") + print("find Version:", line.find('Version')) + print("find Path:", line.find('Path')) + COLS = [0,line.find('Version'), line.find('Path')] + continue + else: + if line.find("Used library") != -1: + print("Found libraries token using find") + IS_LIBS_FOUND = True + print("non regex find Version:", line.find('Version')) + print("find Path:", line.find('Path')) + COLS = [0,line.find('Version'), line.find('Path')] + else: + if not IS_BSP_FOUND: + if re.match(r'Used platform', line): + print("Found platform token using regex") + IS_BSP_FOUND = True + COLS = [0,line.find('Version'), line.find('Path')] + continue + elif line.find("Used platform") != -1: + print("Found platform token using find") + IS_BSP_FOUND = True + COLS = [0,line.find('Version'), line.find('Path')] + continue + else: + libraries.append([line[:COLS[1]].strip(),line[COLS[1]:COLS[2]].strip()]) + else: + platforms.append([line[:COLS[1]].strip(),line[COLS[1]:COLS[2]].strip()]) + + dependencies = { + 'libraries': libraries, + 'platforms': platforms + } + print("Extracted list of dependencies:", dependencies) + return dependencies + +def write_dependencies_to_header(dependencies, output_file): + # header file + with open(output_file, 'w') as f: + f.write('#ifndef PROJECT_DEPENDENCIES_H\n') + f.write('#define PROJECT_DEPENDENCIES_H\n\n') + f.write('#define PRINT_DEPENDENCIES 1\n') + f.write('extern const char* project_dependencies;\n\n') + f.write('#endif // PROJECT_DEPENDENCIES_H\n') + # cpp file + with open(re.sub(r'\.h$','.cpp', output_file), 'w') as f: + f.write('#include "print_dependencies.h"\n\n') + f.write('const char* project_dependencies = R"(\n') + + f.write('Libraries and Versions:\n') + for lib in dependencies['libraries']: + f.write(f'Library: {lib[0].strip()}, Version: {lib[1].strip()}\n') + + f.write('\nPlatforms and Versions:\n') + for plat in dependencies['platforms']: + f.write(f'Platform: {plat[0].strip()}, Version: {plat[1].strip()}\n') + + f.write(')";\n\n') + def test_examples_in_folder(platform, folderpath): - global success + global success, BUILD_TIMEOUT, popen_timeout, BUILD_WALL, BUILD_WARN, PRINT_DEPENDENCIES_AS_HEADER, INCLUDE_PRINT_DEPENDENCIES_HEADER, IS_LEARNING_SYS, BUILD_DIR fqbn = ALL_PLATFORMS[platform][0] for example in sorted(os.listdir(folderpath)): - examplepath = folderpath+"/"+example + examplepath = folderpath + "/" + example if os.path.isdir(examplepath): test_examples_in_folder(platform, examplepath) continue if not examplepath.endswith(".ino"): continue - print('\t'+example, end=' ') + print('\t' + example, end=' ') # check if we should SKIP - skipfilename = folderpath+"/."+platform+".test.skip" - onlyfilename = folderpath+"/."+platform+".test.only" + skipfilename = folderpath + "/." + platform + ".test.skip" + onlyfilename = folderpath + "/." + platform + ".test.only" # check if we should GENERATE UF2 - gen_file_name = folderpath+"/."+platform+".generate" + gen_file_name = folderpath + "/." + platform + ".generate" # .skip txt include all skipped platforms, one per line - skip_txt = folderpath+"/.skip.txt" + skip_txt = folderpath + "/.skip.txt" is_skip = False if os.path.exists(skipfilename): @@ -365,10 +453,10 @@ def test_examples_in_folder(platform, folderpath): ColorPrint.print_warn("skipping") continue - if glob.glob(folderpath+"/.*.test.only"): - platformname = glob.glob(folderpath+"/.*.test.only")[0].split('.')[1] - if platformname != "none" and not platformname in ALL_PLATFORMS: - # uh oh, this isnt a valid testonly! + if glob.glob(folderpath + "/.*.test.only"): + platformname = glob.glob(folderpath + "/.*.test.only")[0].split('.')[1] + if platformname != "none" and platformname not in ALL_PLATFORMS: + # uh oh, this isn't a valid testonly! ColorPrint.print_fail(CROSS) ColorPrint.print_fail("This example does not have a valid .platform.test.only file") success = 1 @@ -386,8 +474,16 @@ def test_examples_in_folder(platform, folderpath): cmd = ['arduino-cli', 'compile', '--warnings', 'all', '--fqbn', fqbn, folderpath] else: cmd = ['arduino-cli', 'compile', '--warnings', 'none', '--export-binaries', '--fqbn', fqbn, folderpath] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + + if PRINT_DEPENDENCIES_AS_HEADER: + cmd.append('--only-compilation-database') + cmd.append('--no-color') + elif INCLUDE_PRINT_DEPENDENCIES_HEADER: + cmd.append('--build-property') + cmd.append('"build.extra_flags=\'-DPRINT_DEPENDENCIES -I\"' + os.path.join(BUILD_DIR, "print_dependencies.cpp") + '\"\'"') + cmd.append('--verbose') + + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) try: if BUILD_TIMEOUT: out, err = proc.communicate(timeout=popen_timeout) @@ -405,7 +501,11 @@ def test_examples_in_folder(platform, folderpath): # also print out warning message with group_output(f"{example} {fqbn} build output"): ColorPrint.print_fail(err.decode("utf-8")) - if os.path.exists(gen_file_name): + if PRINT_DEPENDENCIES_AS_HEADER: + # Extract dependencies and write to header for the first successful example + dependencies = extract_dependencies(out.decode("utf-8") + err.decode("utf-8")) + write_dependencies_to_header(dependencies, PRINT_DEPENDENCIES_AS_HEADER_FILENAME) + elif os.path.exists(gen_file_name): if ALL_PLATFORMS[platform][1] is None: ColorPrint.print_info("Platform does not support UF2 files, skipping...") else: @@ -415,10 +515,10 @@ def test_examples_in_folder(platform, folderpath): success = 1 # failure if IS_LEARNING_SYS: fqbnpath, uf2file = filename.split("/")[-2:] - os.makedirs(BUILD_DIR+"/build", exist_ok=True) - os.makedirs(BUILD_DIR+"/build/"+fqbnpath, exist_ok=True) - shutil.copy(filename, BUILD_DIR+"/build/"+fqbnpath+"-"+uf2file) - os.system("ls -lR "+BUILD_DIR+"/build") + os.makedirs(BUILD_DIR + "/build", exist_ok=True) + os.makedirs(BUILD_DIR + "/build/" + fqbnpath, exist_ok=True) + shutil.copy(filename, BUILD_DIR + "/build/" + fqbnpath + "-" + uf2file) + subprocess.run("ls -lR " + BUILD_DIR + "/build", shell=True, check=True) else: ColorPrint.print_fail(CROSS) with group_output(f"{example} {fqbn} built output"): @@ -428,6 +528,7 @@ def test_examples_in_folder(platform, folderpath): def main(): + global INCLUDE_PRINT_DEPENDENCIES_HEADER, PRINT_DEPENDENCIES_AS_HEADER # Test platforms platforms = [] @@ -449,15 +550,22 @@ def main(): for platform in platforms: fqbn = ALL_PLATFORMS[platform][0] print('#'*80) - ColorPrint.print_info("SWITCHING TO "+fqbn) + ColorPrint.print_info("SWITCHING TO " + fqbn) install_platform(":".join(fqbn.split(':', 2)[0:2]), ALL_PLATFORMS[platform]) # take only first two elements print('#'*80) if not IS_LEARNING_SYS: - test_examples_in_folder(platform, BUILD_DIR+"/examples") + if INCLUDE_PRINT_DEPENDENCIES_HEADER: + PRINT_DEPENDENCIES_AS_HEADER = True + INCLUDE_PRINT_DEPENDENCIES_HEADER = False + test_examples_in_folder(platform, BUILD_DIR + "/examples") + PRINT_DEPENDENCIES_AS_HEADER = False + INCLUDE_PRINT_DEPENDENCIES_HEADER = True + test_examples_in_folder(platform, BUILD_DIR + "/examples") + else: + test_examples_in_folder(platform, BUILD_DIR + "/examples") else: test_examples_in_folder(platform, BUILD_DIR) - if __name__ == "__main__": main() exit(success) From 31257c4022e66a9ba262db0a2f7b46cac6c88b1f Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Oct 2024 19:45:52 +0100 Subject: [PATCH 2/9] Update all_platforms.py - add "wippersnapper_feather_esp32s3_reverse_tft_debug" --- all_platforms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/all_platforms.py b/all_platforms.py index 69108f1..01f72c9 100644 --- a/all_platforms.py +++ b/all_platforms.py @@ -46,6 +46,7 @@ "feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "wippersnapper_feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "matrixportal_s3" : ["esp32:esp32:adafruit_matrixportal_esp32s3", "0xc47e5767", None], "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "pycamera_s3" : ["esp32:esp32:adafruit_camera_esp32s3", "0xc47e5767", None], @@ -162,4 +163,4 @@ "cpb", "cpx_ada"), "wippersnapper_platforms" : ("metro_m4_airliftlite_tinyusb", "pyportal_tinyusb"), "rp2040_platforms" : ("pico_rp2040", "feather_rp2040") -} \ No newline at end of file +} From dca322b4544ca49e7f222a15664333e8075e3b34 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Mon, 21 Oct 2024 13:18:51 +0100 Subject: [PATCH 3/9] Update all_platforms.py - add Metro-S3 Debug target --- all_platforms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/all_platforms.py b/all_platforms.py index 01f72c9..56bf775 100644 --- a/all_platforms.py +++ b/all_platforms.py @@ -49,6 +49,7 @@ "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "matrixportal_s3" : ["esp32:esp32:adafruit_matrixportal_esp32s3", "0xc47e5767", None], "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metro_esp32s3_debug" : ["espressif:esp32:adafruit_metro_esp32s3:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "pycamera_s3" : ["esp32:esp32:adafruit_camera_esp32s3", "0xc47e5767", None], "qualia_s3_rgb666" : ["esp32:esp32:adafruit_qualia_s3_rgb666", "0xc47e5767", None], "qtpy_esp32s3" : ["espressif:esp32:adafruit_qtpy_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], From 5620d85da2fb9d83cb3107ae03f6d7928d455407 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Mon, 21 Oct 2024 13:19:57 +0100 Subject: [PATCH 4/9] Update all_platforms.py - add Metro-S2 Debug target --- all_platforms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/all_platforms.py b/all_platforms.py index 56bf775..b99ff05 100644 --- a/all_platforms.py +++ b/all_platforms.py @@ -27,6 +27,7 @@ "funhouse" : ["espressif:esp32:adafruit_funhouse_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "funhouse_noota" : ["espressif:esp32:adafruit_funhouse_esp32s2:PartitionScheme=tinyuf2_noota", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "metroesp32s2" : ["espressif:esp32:adafruit_metro_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metroesp32s2_debug" : ["espressif:esp32:adafruit_metro_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "qtpy_esp32s2" : ["espressif:esp32:adafruit_qtpy_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "feather_esp32s2" : ["espressif:esp32:adafruit_feather_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "feather_esp32s2_debug" : ["espressif:esp32:adafruit_feather_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], From 8d6b9d9bab2619612a4bac21ec7a70b9af5c8c51 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Mon, 21 Oct 2024 17:43:22 +0100 Subject: [PATCH 5/9] Update all_platforms.py - switch to 3.0.6 --- all_platforms.py | 78 ++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/all_platforms.py b/all_platforms.py index b99ff05..abe5316 100644 --- a/all_platforms.py +++ b/all_platforms.py @@ -9,52 +9,52 @@ "cpx" : ["arduino:samd:adafruit_circuitplayground_m0", "0x68ed2b88", None], # Espressif "esp8266" : ["esp8266:esp8266:huzzah:eesz=4M3M,xtal=80", None, None], - "esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "itsybitsy_esp32" : ["espressif:esp32:adafruit_itsybitsy_esp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "itsybitsy_esp32" : ["espressif:esp32:adafruit_itsybitsy_esp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], "feather_esp8266" : ["esp8266:esp8266:huzzah:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200", None, None], - "feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32_v2" : ["espressif:esp32:adafruit_feather_esp32_v2", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "qtpy_esp32" : ["espressif:esp32:adafruit_qtpy_esp32_pico", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32_v2" : ["espressif:esp32:adafruit_feather_esp32_v2", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "qtpy_esp32" : ["espressif:esp32:adafruit_qtpy_esp32_pico", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], ## ESP32-C3/C6 - "feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32c6_debug" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,DebugLevel=verbose,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32c6_debug" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,DebugLevel=verbose,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], ## ESP32-S2 - "magtag" : ["espressif:esp32:adafruit_magtag29_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "funhouse" : ["espressif:esp32:adafruit_funhouse_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "funhouse_noota" : ["espressif:esp32:adafruit_funhouse_esp32s2:PartitionScheme=tinyuf2_noota", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "metroesp32s2" : ["espressif:esp32:adafruit_metro_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "metroesp32s2_debug" : ["espressif:esp32:adafruit_metro_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "qtpy_esp32s2" : ["espressif:esp32:adafruit_qtpy_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s2" : ["espressif:esp32:adafruit_feather_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s2_debug" : ["espressif:esp32:adafruit_feather_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s2_tft" : ["espressif:esp32:adafruit_feather_esp32s2_tft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s2_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s2_tft:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s2_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s2_reversetft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "magtag" : ["espressif:esp32:adafruit_magtag29_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "funhouse" : ["espressif:esp32:adafruit_funhouse_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "funhouse_noota" : ["espressif:esp32:adafruit_funhouse_esp32s2:PartitionScheme=tinyuf2_noota", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "metroesp32s2" : ["espressif:esp32:adafruit_metro_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "metroesp32s2_debug" : ["espressif:esp32:adafruit_metro_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "qtpy_esp32s2" : ["espressif:esp32:adafruit_qtpy_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s2" : ["espressif:esp32:adafruit_feather_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s2_debug" : ["espressif:esp32:adafruit_feather_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s2_tft" : ["espressif:esp32:adafruit_feather_esp32s2_tft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s2_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s2_tft:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s2_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s2_reversetft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], ## ESP32-S3 - "feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_debug" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_4mbflash_2mbpsram_debug" : ["espressif:esp32:adafruit_feather_esp32s3:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_tft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_debug" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_4mbflash_2mbpsram_debug" : ["espressif:esp32:adafruit_feather_esp32s3:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_tft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], "matrixportal_s3" : ["esp32:esp32:adafruit_matrixportal_esp32s3", "0xc47e5767", None], - "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "metro_esp32s3_debug" : ["espressif:esp32:adafruit_metro_esp32s3:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "metro_esp32s3_debug" : ["espressif:esp32:adafruit_metro_esp32s3:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], "pycamera_s3" : ["esp32:esp32:adafruit_camera_esp32s3", "0xc47e5767", None], "qualia_s3_rgb666" : ["esp32:esp32:adafruit_qualia_s3_rgb666", "0xc47e5767", None], - "qtpy_esp32s3" : ["espressif:esp32:adafruit_qtpy_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], - "qtpy_esp32s3_n4r2" : ["espressif:esp32:adafruit_qtpy_esp32s3_n4r2", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "qtpy_esp32s3" : ["espressif:esp32:adafruit_qtpy_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "qtpy_esp32s3_n4r2" : ["espressif:esp32:adafruit_qtpy_esp32s3_n4r2", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], # Adafruit AVR "trinket_3v" : ["adafruit:avr:trinket3", None, None], "trinket_5v" : ["adafruit:avr:trinket5", None, None], From a2f17ea8eacbd86c4b85f932452be18a31b5d7ee Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 21 Oct 2024 19:54:23 +0100 Subject: [PATCH 6/9] Revert "Update all_platforms.py - switch to 3.0.6" This reverts commit 8d6b9d9bab2619612a4bac21ec7a70b9af5c8c51. --- all_platforms.py | 78 ++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/all_platforms.py b/all_platforms.py index abe5316..b99ff05 100644 --- a/all_platforms.py +++ b/all_platforms.py @@ -9,52 +9,52 @@ "cpx" : ["arduino:samd:adafruit_circuitplayground_m0", "0x68ed2b88", None], # Espressif "esp8266" : ["esp8266:esp8266:huzzah:eesz=4M3M,xtal=80", None, None], - "esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "itsybitsy_esp32" : ["espressif:esp32:adafruit_itsybitsy_esp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "itsybitsy_esp32" : ["espressif:esp32:adafruit_itsybitsy_esp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "feather_esp8266" : ["esp8266:esp8266:huzzah:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200", None, None], - "feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32_v2" : ["espressif:esp32:adafruit_feather_esp32_v2", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "qtpy_esp32" : ["espressif:esp32:adafruit_qtpy_esp32_pico", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32" : ["espressif:esp32:featheresp32:FlashFreq=80,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32_v2" : ["espressif:esp32:adafruit_feather_esp32_v2", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "qtpy_esp32" : ["espressif:esp32:adafruit_qtpy_esp32_pico", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], ## ESP32-C3/C6 - "feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32c6_debug" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,DebugLevel=verbose,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32c6" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32c6_debug" : ["espressif:esp32:adafruit_feather_esp32c6:CDCOnBoot=cdc,DebugLevel=verbose,CPUFreq=160,FlashFreq=80,FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_qtpy_esp32c3" : ["espressif:esp32:adafruit_qtpy_esp32c3:FlashMode=qio,PartitionScheme=min_spiffs", None, "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], ## ESP32-S2 - "magtag" : ["espressif:esp32:adafruit_magtag29_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "funhouse" : ["espressif:esp32:adafruit_funhouse_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "funhouse_noota" : ["espressif:esp32:adafruit_funhouse_esp32s2:PartitionScheme=tinyuf2_noota", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "metroesp32s2" : ["espressif:esp32:adafruit_metro_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "metroesp32s2_debug" : ["espressif:esp32:adafruit_metro_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "qtpy_esp32s2" : ["espressif:esp32:adafruit_qtpy_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s2" : ["espressif:esp32:adafruit_feather_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s2_debug" : ["espressif:esp32:adafruit_feather_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s2_tft" : ["espressif:esp32:adafruit_feather_esp32s2_tft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s2_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s2_tft:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s2_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s2_reversetft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "magtag" : ["espressif:esp32:adafruit_magtag29_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "funhouse" : ["espressif:esp32:adafruit_funhouse_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "funhouse_noota" : ["espressif:esp32:adafruit_funhouse_esp32s2:PartitionScheme=tinyuf2_noota", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metroesp32s2" : ["espressif:esp32:adafruit_metro_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metroesp32s2_debug" : ["espressif:esp32:adafruit_metro_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "qtpy_esp32s2" : ["espressif:esp32:adafruit_qtpy_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s2" : ["espressif:esp32:adafruit_feather_esp32s2", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s2_debug" : ["espressif:esp32:adafruit_feather_esp32s2:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s2_tft" : ["espressif:esp32:adafruit_feather_esp32s2_tft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s2_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s2_tft:DebugLevel=verbose", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s2_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s2_reversetft", "0xbfdd4eee", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], ## ESP32-S3 - "feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_debug" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_4mbflash_2mbpsram_debug" : ["espressif:esp32:adafruit_feather_esp32s3:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_tft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_debug" : ["espressif:esp32:adafruit_feather_esp32s3_nopsram:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_4mbflash_2mbpsram" : ["espressif:esp32:adafruit_feather_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_4mbflash_2mbpsram_debug" : ["espressif:esp32:adafruit_feather_esp32s3:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3_tft" : ["espressif:esp32:adafruit_feather_esp32s3_tft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_tft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3_reverse_tft" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "wippersnapper_feather_esp32s3_reverse_tft_debug" : ["espressif:esp32:adafruit_feather_esp32s3_reversetft:DebugLevel=verbose,PartitionScheme=tinyuf2_noota", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "matrixportal_s3" : ["esp32:esp32:adafruit_matrixportal_esp32s3", "0xc47e5767", None], - "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "metro_esp32s3_debug" : ["espressif:esp32:adafruit_metro_esp32s3:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "metro_esp32s3" : ["espressif:esp32:adafruit_metro_esp32s3", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "metro_esp32s3_debug" : ["espressif:esp32:adafruit_metro_esp32s3:DebugLevel=verbose", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], "pycamera_s3" : ["esp32:esp32:adafruit_camera_esp32s3", "0xc47e5767", None], "qualia_s3_rgb666" : ["esp32:esp32:adafruit_qualia_s3_rgb666", "0xc47e5767", None], - "qtpy_esp32s3" : ["espressif:esp32:adafruit_qtpy_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], - "qtpy_esp32s3_n4r2" : ["espressif:esp32:adafruit_qtpy_esp32s3_n4r2", "0xc47e5767", "adafruit/wipper-bsp-3.0.6-idf-5-1-4"], + "qtpy_esp32s3" : ["espressif:esp32:adafruit_qtpy_esp32s3_nopsram", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], + "qtpy_esp32s3_n4r2" : ["espressif:esp32:adafruit_qtpy_esp32s3_n4r2", "0xc47e5767", "adafruit/wipper-bsp-3.0.5-idf-5.1.4"], # Adafruit AVR "trinket_3v" : ["adafruit:avr:trinket3", None, None], "trinket_5v" : ["adafruit:avr:trinket5", None, None], From 86202a3916989ec5844570cc059318d92acca028 Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 21 Oct 2024 20:06:36 +0100 Subject: [PATCH 7/9] Raise ValueError if missing header file argument --- build_platform.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build_platform.py b/build_platform.py index 8f48201..2114bfc 100755 --- a/build_platform.py +++ b/build_platform.py @@ -35,11 +35,12 @@ PRINT_DEPENDENCIES_AS_HEADER_FILENAME = None if "--include_print_dependencies_header" in sys.argv: # check argument not null and folder path exists - PRINT_DEPENDENCIES_AS_HEADER_FILENAME = sys.argv[sys.argv.index("--include_print_dependencies_header") + 1] if len(sys.argv) > sys.argv.index("--include_print_dependencies_header") + 1 else None + header_index = sys.argv.index("--include_print_dependencies_header") + 1 + PRINT_DEPENDENCIES_AS_HEADER_FILENAME = sys.argv[header_index] if len(sys.argv) > header_index else None if PRINT_DEPENDENCIES_AS_HEADER_FILENAME is None or not os.path.exists(PRINT_DEPENDENCIES_AS_HEADER_FILENAME): - raise AttributeError("Header file path not found or not provided to --include_print_dependencies_header argument") + raise ValueError("Header file path not found or not provided to --include_print_dependencies_header argument") INCLUDE_PRINT_DEPENDENCIES_HEADER = True - sys.argv.pop(sys.argv.index("--include_print_dependencies_header") + 1) + sys.argv.pop(header_index) sys.argv.remove("--include_print_dependencies_header") # add user bin to path! From b8325e986ea2f39b96522d8e42b7efd728e65296 Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 21 Oct 2024 20:15:53 +0100 Subject: [PATCH 8/9] Check return code of mkdir and suggest reason if failure --- build_platform.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build_platform.py b/build_platform.py index 2114bfc..4dcfb56 100755 --- a/build_platform.py +++ b/build_platform.py @@ -115,7 +115,13 @@ def manually_install_esp32_bsp(repo_info): # Assemble git url repo_url = "git clone -b {0} https://github.com/{1}/arduino-esp32.git esp32".format(repo_info.split("/")[1], repo_info.split("/")[0]) # Locally clone repo (https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux) - subprocess.run("mkdir -p /home/runner/Arduino/hardware/espressif", shell=True, check=True) + subprocess_result = subprocess.run("mkdir -p /home/runner/Arduino/hardware/espressif", shell=True, check=True) + if subprocess_result.returncode != 0: + ColorPrint.print_fail("Failed to create ESP32 Arduino BSP directory!\n" + + "Maybe the runner work location changed?\n" + + "Tried to create /home/runner/Arduino/hardware/espressif but failed: {}".format(subprocess_result.returncode)) + ColorPrint.print_fail(subprocess_result.stderr) + exit(-1) print("Cloning %s"%repo_url) cmd = "cd /home/runner/Arduino/hardware/espressif && " + repo_url proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) From 254ab553f8b499eb5928c6b789ebfba37a791ce5 Mon Sep 17 00:00:00 2001 From: tyeth Date: Mon, 21 Oct 2024 21:28:36 +0100 Subject: [PATCH 9/9] stop check=True which throws a CaughtProcessException --- build_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_platform.py b/build_platform.py index 4dcfb56..ad06955 100755 --- a/build_platform.py +++ b/build_platform.py @@ -115,7 +115,7 @@ def manually_install_esp32_bsp(repo_info): # Assemble git url repo_url = "git clone -b {0} https://github.com/{1}/arduino-esp32.git esp32".format(repo_info.split("/")[1], repo_info.split("/")[0]) # Locally clone repo (https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux) - subprocess_result = subprocess.run("mkdir -p /home/runner/Arduino/hardware/espressif", shell=True, check=True) + subprocess_result = subprocess.run("mkdir -p /home/runner/Arduino/hardware/espressif", shell=True) if subprocess_result.returncode != 0: ColorPrint.print_fail("Failed to create ESP32 Arduino BSP directory!\n" + "Maybe the runner work location changed?\n" +