Update build_platform.py - uf2 not hex - fqbn to lowercase

This commit is contained in:
Tyeth Gundry 2025-07-04 18:20:06 +01:00 committed by GitHub
parent 7763926b2c
commit de0edb92f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,7 +284,7 @@ def generate_uf2(platform, fqbn, example_path):
return output_file
# Generate using a hex file for all platforms except for ESP32-S2, ESP32-S3 (exports as .bin files)
if not any (x in fqbn for x in ["esp32s2", "esp32s3"]):
if not any (x in fqbn.lower() for x in ["esp32s2", "esp32s3"]):
cli_build_hex_path = "build/*.*." + fqbn.split(':')[2] + "/*.hex"
hex_input_file = glob1(os.path.join(example_path, cli_build_hex_path))
output_file = os.path.splitext(hex_input_file)[0] + ".uf2"