add feather c6, update tinyuf2 to 0.20.1
This commit is contained in:
parent
d00e4ff549
commit
da92cb64f3
2 changed files with 508 additions and 249 deletions
708
makeboards.py
708
makeboards.py
|
|
@ -1,64 +1,75 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
mcu_dict = {
|
mcu_dict = {
|
||||||
'esp32': {
|
"esp32": {
|
||||||
'maximum_data_size': 327680,
|
"maximum_data_size": 327680,
|
||||||
'tarch': 'xtensa',
|
"tarch": "xtensa",
|
||||||
'target': 'esp32',
|
"target": "esp32",
|
||||||
'dual_core': 1,
|
"dual_core": 1,
|
||||||
'bootloader_addr': '0x1000',
|
"bootloader_addr": "0x1000",
|
||||||
'f_cpu': 240000000,
|
"f_cpu": 240000000,
|
||||||
'touch1200': '',
|
"touch1200": "",
|
||||||
'usb_mode': 0,
|
"usb_mode": 0,
|
||||||
'native_usb': 0,
|
"native_usb": 0,
|
||||||
'cdc_on_boot': -1,
|
"cdc_on_boot": -1,
|
||||||
'spi_mode': 'dio',
|
"spi_mode": "dio",
|
||||||
'psram_opi': 0,
|
"psram_opi": 0,
|
||||||
},
|
},
|
||||||
|
"esp32s2": {
|
||||||
'esp32s2': {
|
"maximum_data_size": 327680,
|
||||||
'maximum_data_size': 327680,
|
"tarch": "xtensa",
|
||||||
'tarch': 'xtensa',
|
"target": "esp32s2",
|
||||||
'target': 'esp32s2',
|
"dual_core": 0,
|
||||||
'dual_core': 0,
|
"bootloader_addr": "0x1000",
|
||||||
'bootloader_addr': '0x1000',
|
"f_cpu": 240000000,
|
||||||
'f_cpu': 240000000,
|
"touch1200": "true",
|
||||||
'touch1200': 'true',
|
"usb_mode": 0,
|
||||||
'usb_mode': 0,
|
"native_usb": 1,
|
||||||
'native_usb': 1,
|
"cdc_on_boot": 1,
|
||||||
'cdc_on_boot': 1,
|
"spi_mode": "qio",
|
||||||
'spi_mode': 'qio',
|
"psram_opi": 0,
|
||||||
'psram_opi': 0,
|
|
||||||
},
|
},
|
||||||
|
"esp32s3": {
|
||||||
'esp32s3': {
|
"maximum_data_size": 327680,
|
||||||
'maximum_data_size': 327680,
|
"tarch": "xtensa",
|
||||||
'tarch': 'xtensa',
|
"target": "esp32s3",
|
||||||
'target': 'esp32s3',
|
"dual_core": 1,
|
||||||
'dual_core': 1,
|
"bootloader_addr": "0x0",
|
||||||
'bootloader_addr': '0x0',
|
"f_cpu": 240000000,
|
||||||
'f_cpu': 240000000,
|
"touch1200": "true",
|
||||||
'touch1200': 'true',
|
"usb_mode": 1,
|
||||||
'usb_mode': 1,
|
"native_usb": 1,
|
||||||
'native_usb': 1,
|
"cdc_on_boot": 1,
|
||||||
'cdc_on_boot': 1,
|
"spi_mode": "qio",
|
||||||
'spi_mode': 'qio',
|
"psram_opi": 1,
|
||||||
'psram_opi': 1,
|
|
||||||
},
|
},
|
||||||
|
"esp32c3": {
|
||||||
'esp32c3': {
|
"maximum_data_size": 327680,
|
||||||
'maximum_data_size': 327680,
|
"tarch": "riscv32",
|
||||||
'tarch': 'riscv32',
|
"target": "esp",
|
||||||
'target': 'esp',
|
"dual_core": 0,
|
||||||
'dual_core': 0,
|
"bootloader_addr": "0x0",
|
||||||
'bootloader_addr': '0x0',
|
"f_cpu": 160000000,
|
||||||
'f_cpu': 160000000,
|
"touch1200": "false",
|
||||||
'touch1200': 'false',
|
"usb_mode": 0,
|
||||||
'usb_mode': 0,
|
"native_usb": 0,
|
||||||
'native_usb': 0,
|
"cdc_on_boot": 1,
|
||||||
'cdc_on_boot': 1,
|
"spi_mode": "qio",
|
||||||
'spi_mode': 'qio',
|
"psram_opi": 0,
|
||||||
'psram_opi': 0,
|
},
|
||||||
|
"esp32c6": {
|
||||||
|
"maximum_data_size": 327680,
|
||||||
|
"tarch": "riscv32",
|
||||||
|
"target": "esp",
|
||||||
|
"dual_core": 0,
|
||||||
|
"bootloader_addr": "0x0",
|
||||||
|
"f_cpu": 160000000,
|
||||||
|
"touch1200": "false",
|
||||||
|
"usb_mode": 0,
|
||||||
|
"native_usb": 0,
|
||||||
|
"cdc_on_boot": 0,
|
||||||
|
"spi_mode": "qio",
|
||||||
|
"psram_opi": 0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,7 +108,7 @@ def build_upload(mcu, name, flash_size):
|
||||||
print(f"{name}.upload.flags=")
|
print(f"{name}.upload.flags=")
|
||||||
print(f"{name}.upload.extra_flags=")
|
print(f"{name}.upload.extra_flags=")
|
||||||
|
|
||||||
if info['touch1200']:
|
if info["touch1200"]:
|
||||||
print(f"{name}.upload.use_1200bps_touch={info['touch1200']}")
|
print(f"{name}.upload.use_1200bps_touch={info['touch1200']}")
|
||||||
print(f"{name}.upload.wait_for_upload_port={info['touch1200']}")
|
print(f"{name}.upload.wait_for_upload_port={info['touch1200']}")
|
||||||
print()
|
print()
|
||||||
|
|
@ -122,78 +133,81 @@ def build_build(mcu, name, variant, flash_size, boarddefine, psram_type):
|
||||||
print(f"{name}.build.board={boarddefine}")
|
print(f"{name}.build.board={boarddefine}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if info['usb_mode']:
|
if info["usb_mode"]:
|
||||||
print(f'{name}.build.usb_mode=0')
|
print(f"{name}.build.usb_mode=0")
|
||||||
if info['cdc_on_boot'] >= 0:
|
if info["cdc_on_boot"] >= 0:
|
||||||
print(f"{name}.build.cdc_on_boot={info['cdc_on_boot']}")
|
print(f"{name}.build.cdc_on_boot={info['cdc_on_boot']}")
|
||||||
if info['native_usb']:
|
if info["native_usb"]:
|
||||||
print(f"{name}.build.msc_on_boot=0")
|
print(f"{name}.build.msc_on_boot=0")
|
||||||
print(f"{name}.build.dfu_on_boot=0")
|
print(f"{name}.build.dfu_on_boot=0")
|
||||||
print(f"{name}.build.f_cpu={info['f_cpu']}L")
|
print(f"{name}.build.f_cpu={info['f_cpu']}L")
|
||||||
print(f"{name}.build.flash_size={flash_size}MB")
|
print(f"{name}.build.flash_size={flash_size}MB")
|
||||||
print(f"{name}.build.flash_freq=80m")
|
print(f"{name}.build.flash_freq=80m")
|
||||||
print(f"{name}.build.flash_mode=dio")
|
if mcu == "esp32c6":
|
||||||
|
print(f"{name}.build.flash_mode=qio")
|
||||||
|
else:
|
||||||
|
print(f"{name}.build.flash_mode=dio")
|
||||||
print(f"{name}.build.boot={info['spi_mode']}")
|
print(f"{name}.build.boot={info['spi_mode']}")
|
||||||
print(f"{name}.build.partitions=default")
|
print(f"{name}.build.partitions=default")
|
||||||
print(f"{name}.build.defines=")
|
print(f"{name}.build.defines=")
|
||||||
|
|
||||||
if info['dual_core']:
|
if info["dual_core"]:
|
||||||
print(f'{name}.build.loop_core=')
|
print(f"{name}.build.loop_core=")
|
||||||
print(f'{name}.build.event_core=')
|
print(f"{name}.build.event_core=")
|
||||||
|
|
||||||
if info['psram_opi']:
|
if info["psram_opi"]:
|
||||||
print(f'{name}.build.flash_type=qio')
|
print(f"{name}.build.flash_type=qio")
|
||||||
if psram_type == 'opi':
|
if psram_type == "opi":
|
||||||
print(f'{name}.build.psram_type=opi')
|
print(f"{name}.build.psram_type=opi")
|
||||||
else:
|
else:
|
||||||
print(f'{name}.build.psram_type=qspi')
|
print(f"{name}.build.psram_type=qspi")
|
||||||
print(f'{name}.build.memory_type={{build.flash_type}}_{{build.psram_type}}')
|
print(f"{name}.build.memory_type={{build.flash_type}}_{{build.psram_type}}")
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def build_loop(mcu, name):
|
def build_loop(mcu, name):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
if info['dual_core']:
|
if info["dual_core"]:
|
||||||
print(f'{name}.menu.LoopCore.1=Core 1')
|
print(f"{name}.menu.LoopCore.1=Core 1")
|
||||||
print(f'{name}.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1')
|
print(f"{name}.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1")
|
||||||
print(f'{name}.menu.LoopCore.0=Core 0')
|
print(f"{name}.menu.LoopCore.0=Core 0")
|
||||||
print(f'{name}.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0')
|
print(f"{name}.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
print(f'{name}.menu.EventsCore.1=Core 1')
|
print(f"{name}.menu.EventsCore.1=Core 1")
|
||||||
print(f'{name}.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1')
|
print(f"{name}.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1")
|
||||||
print(f'{name}.menu.EventsCore.0=Core 0')
|
print(f"{name}.menu.EventsCore.0=Core 0")
|
||||||
print(f'{name}.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0')
|
print(f"{name}.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def build_menu_usb(mcu, name):
|
def build_menu_usb(mcu, name):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
|
|
||||||
require_otg = ''
|
require_otg = ""
|
||||||
upload_cdc = 'Internal USB'
|
upload_cdc = "Internal USB"
|
||||||
upload_uart = 'UART0'
|
upload_uart = "UART0"
|
||||||
|
|
||||||
# ESP32-S3
|
# ESP32-S3
|
||||||
if info['usb_mode']:
|
if info["usb_mode"]:
|
||||||
require_otg = ' (Requires USB-OTG Mode)'
|
require_otg = " (Requires USB-OTG Mode)"
|
||||||
upload_cdc = 'USB-OTG CDC (TinyUSB)'
|
upload_cdc = "USB-OTG CDC (TinyUSB)"
|
||||||
upload_uart = 'UART0 / Hardware CDC'
|
upload_uart = "UART0 / Hardware CDC"
|
||||||
print(f"{name}.menu.USBMode.default=USB-OTG (TinyUSB)")
|
print(f"{name}.menu.USBMode.default=USB-OTG (TinyUSB)")
|
||||||
print(f"{name}.menu.USBMode.default.build.usb_mode=0")
|
print(f"{name}.menu.USBMode.default.build.usb_mode=0")
|
||||||
print(f"{name}.menu.USBMode.hwcdc=Hardware CDC and JTAG")
|
print(f"{name}.menu.USBMode.hwcdc=Hardware CDC and JTAG")
|
||||||
print(f"{name}.menu.USBMode.hwcdc.build.usb_mode=1")
|
print(f"{name}.menu.USBMode.hwcdc.build.usb_mode=1")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if info['cdc_on_boot'] >= 0:
|
if info["cdc_on_boot"] >= 0:
|
||||||
print(f"{name}.menu.CDCOnBoot.cdc=Enabled")
|
print(f"{name}.menu.CDCOnBoot.cdc=Enabled")
|
||||||
print(f"{name}.menu.CDCOnBoot.cdc.build.cdc_on_boot=1")
|
print(f"{name}.menu.CDCOnBoot.cdc.build.cdc_on_boot=1")
|
||||||
print(f"{name}.menu.CDCOnBoot.default=Disabled")
|
print(f"{name}.menu.CDCOnBoot.default=Disabled")
|
||||||
print(f"{name}.menu.CDCOnBoot.default.build.cdc_on_boot=0")
|
print(f"{name}.menu.CDCOnBoot.default.build.cdc_on_boot=0")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if info['native_usb']:
|
if info["native_usb"]:
|
||||||
print(f"{name}.menu.MSCOnBoot.default=Disabled")
|
print(f"{name}.menu.MSCOnBoot.default=Disabled")
|
||||||
print(f"{name}.menu.MSCOnBoot.default.build.msc_on_boot=0")
|
print(f"{name}.menu.MSCOnBoot.default.build.msc_on_boot=0")
|
||||||
print(f"{name}.menu.MSCOnBoot.msc=Enabled" + require_otg)
|
print(f"{name}.menu.MSCOnBoot.msc=Enabled" + require_otg)
|
||||||
|
|
@ -219,12 +233,12 @@ def build_menu_psram(mcu, name, psram_size, psram_type):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
|
|
||||||
enabled_defines = f"{name}.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM"
|
enabled_defines = f"{name}.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM"
|
||||||
if mcu == 'esp32':
|
if mcu == "esp32":
|
||||||
enabled_defines += ' -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw'
|
enabled_defines += " -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw"
|
||||||
|
|
||||||
if psram_size > 0:
|
if psram_size > 0:
|
||||||
if info['psram_opi']:
|
if info["psram_opi"]:
|
||||||
if psram_type == 'opi':
|
if psram_type == "opi":
|
||||||
print(f"{name}.menu.PSRAM.opi=OPI PSRAM")
|
print(f"{name}.menu.PSRAM.opi=OPI PSRAM")
|
||||||
print(f"{name}.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM")
|
print(f"{name}.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM")
|
||||||
print(f"{name}.menu.PSRAM.opi.build.psram_type=opi")
|
print(f"{name}.menu.PSRAM.opi.build.psram_type=opi")
|
||||||
|
|
@ -252,16 +266,17 @@ def build_menu_psram(mcu, name, psram_size, psram_type):
|
||||||
|
|
||||||
def build_menu_partition(mcu, name, flash_size, noota_first):
|
def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
|
tuf2_bin = '"{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"'
|
||||||
|
|
||||||
if flash_size == 4:
|
if flash_size == 4:
|
||||||
if info['native_usb']:
|
if info["native_usb"]:
|
||||||
# TinyUF2 with ota
|
# TinyUF2 with ota
|
||||||
tinyuf2_partition = (
|
tinyuf2_partition = (
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FATFS)\n"
|
f"{name}.menu.PartitionScheme.tinyuf2=TinyUF2 4MB (1.3MB APP/960KB FATFS)\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-4MB\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-4MB\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=1441792\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x2d0000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
# TinyUF2 without ota
|
# TinyUF2 without ota
|
||||||
tinyuf2_noota_partition = (
|
tinyuf2_noota_partition = (
|
||||||
|
|
@ -269,7 +284,7 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-4MB-noota\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-4MB-noota\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=2883584\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=2883584\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x2d0000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x2d0000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
# TinyUF2 4MB with 3MB OTA
|
# TinyUF2 4MB with 3MB OTA
|
||||||
# tinyuf2_ota3mb_partition = (
|
# tinyuf2_ota3mb_partition = (
|
||||||
|
|
@ -277,7 +292,7 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.build.custom_bootloader=bootloader-tinyuf2\n"
|
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.build.partitions=tinyuf2-partitions-4MB-app3M5\n"
|
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.build.partitions=tinyuf2-partitions-4MB-app3M5\n"
|
||||||
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.upload.maximum_size=3604480\n"
|
# f"{name}.menu.PartitionScheme.tinyuf2_app3m5.upload.maximum_size=3604480\n"
|
||||||
# f'{name}.menu.PartitionScheme.tinyuf2_app3m5.upload.extra_flags=0x380000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
# f'{name}.menu.PartitionScheme.tinyuf2_app3m5.upload.extra_flags=0x380000 {tuf2_bin}'
|
||||||
# )
|
# )
|
||||||
if noota_first:
|
if noota_first:
|
||||||
print(tinyuf2_noota_partition)
|
print(tinyuf2_noota_partition)
|
||||||
|
|
@ -312,14 +327,14 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
print(f"{name}.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs")
|
print(f"{name}.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs")
|
||||||
print(f"{name}.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080")
|
print(f"{name}.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080")
|
||||||
elif flash_size == 8:
|
elif flash_size == 8:
|
||||||
if info['native_usb']:
|
if info["native_usb"]:
|
||||||
# TinyUF2 with ota
|
# TinyUF2 with ota
|
||||||
tinyuf2_partition = (
|
tinyuf2_partition = (
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.7MB FATFS)\n"
|
f"{name}.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.7MB FATFS)\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-8MB\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-8MB\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152\n"
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
# TinyUF2 without ota
|
# TinyUF2 without ota
|
||||||
tinyuf2_noota_partition = (
|
tinyuf2_noota_partition = (
|
||||||
|
|
@ -327,7 +342,7 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-8MB-noota\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-8MB-noota\n"
|
||||||
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=4194304\n"
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=4194304\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x410000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x410000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
if noota_first:
|
if noota_first:
|
||||||
print(tinyuf2_noota_partition)
|
print(tinyuf2_noota_partition)
|
||||||
|
|
@ -340,22 +355,22 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
print(f"{name}.menu.PartitionScheme.default_8MB.build.partitions=default_8MB")
|
print(f"{name}.menu.PartitionScheme.default_8MB.build.partitions=default_8MB")
|
||||||
print(f"{name}.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336")
|
print(f"{name}.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336")
|
||||||
elif flash_size == 16:
|
elif flash_size == 16:
|
||||||
if info['native_usb']:
|
if info["native_usb"]:
|
||||||
# TinyUF2 with ota
|
# TinyUF2 with ota
|
||||||
tinyuf2_partition = (
|
tinyuf2_partition = (
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2=TinyUF2 16MB (2MB APP/11.6MB FATFS)\n'
|
f"{name}.menu.PartitionScheme.tinyuf2=TinyUF2 16MB (2MB APP/11.6MB FATFS)\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n'
|
f"{name}.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-16MB\n'
|
f"{name}.menu.PartitionScheme.tinyuf2.build.partitions=tinyuf2-partitions-16MB\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152\n'
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
# TinyUF2 without ota
|
# TinyUF2 without ota
|
||||||
tinyuf2_noota_partition = (
|
tinyuf2_noota_partition = (
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota=TinyUF2 16MB No OTA(4MB APP/11.6MB FATFS)\n'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota=TinyUF2 16MB No OTA(4MB APP/11.6MB FATFS)\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.custom_bootloader=bootloader-tinyuf2\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-16MB-noota\n'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.build.partitions=tinyuf2-partitions-16MB-noota\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=4194304\n'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.maximum_size=4194304\n"
|
||||||
f'{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x410000 "{{runtime.platform.path}}/variants/{{build.variant}}/tinyuf2.bin"'
|
f"{name}.menu.PartitionScheme.tinyuf2_noota.upload.extra_flags=0x410000 {tuf2_bin}"
|
||||||
)
|
)
|
||||||
if noota_first:
|
if noota_first:
|
||||||
print(tinyuf2_noota_partition)
|
print(tinyuf2_noota_partition)
|
||||||
|
|
@ -364,26 +379,26 @@ def build_menu_partition(mcu, name, flash_size, noota_first):
|
||||||
print(tinyuf2_partition)
|
print(tinyuf2_partition)
|
||||||
print(tinyuf2_noota_partition)
|
print(tinyuf2_noota_partition)
|
||||||
|
|
||||||
print(f'{name}.menu.PartitionScheme.default_16MB=Default (6.25MB APP/3.43MB SPIFFS)')
|
print(f"{name}.menu.PartitionScheme.default_16MB=Default (6.25MB APP/3.43MB SPIFFS)")
|
||||||
print(f'{name}.menu.PartitionScheme.default_16MB.build.partitions=default_16MB')
|
print(f"{name}.menu.PartitionScheme.default_16MB.build.partitions=default_16MB")
|
||||||
print(f'{name}.menu.PartitionScheme.default_16MB.upload.maximum_size=6553600')
|
print(f"{name}.menu.PartitionScheme.default_16MB.upload.maximum_size=6553600")
|
||||||
print(f'{name}.menu.PartitionScheme.large_spiffs=Large SPIFFS (4.5MB APP/6.93MB SPIFFS)')
|
print(f"{name}.menu.PartitionScheme.large_spiffs=Large SPIFFS (4.5MB APP/6.93MB SPIFFS)")
|
||||||
print(f'{name}.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB')
|
print(f"{name}.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB")
|
||||||
print(f'{name}.menu.PartitionScheme.large_spiffs.upload.maximum_size=4718592')
|
print(f"{name}.menu.PartitionScheme.large_spiffs.upload.maximum_size=4718592")
|
||||||
print(f'{name}.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)')
|
print(f"{name}.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)")
|
||||||
print(f'{name}.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB')
|
print(f"{name}.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB")
|
||||||
print(f'{name}.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728')
|
print(f"{name}.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728")
|
||||||
print(f'{name}.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)')
|
print(f"{name}.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)")
|
||||||
print(f'{name}.menu.PartitionScheme.fatflash.build.partitions=ffat')
|
print(f"{name}.menu.PartitionScheme.fatflash.build.partitions=ffat")
|
||||||
print(f'{name}.menu.PartitionScheme.fatflash.upload.maximum_size=2097152')
|
print(f"{name}.menu.PartitionScheme.fatflash.upload.maximum_size=2097152")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def build_menu_freq(mcu, name):
|
def build_menu_freq(mcu, name):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
wf_bt = '(WiFi/BT)' if mcu == 'esp32' else '(WiFi)'
|
wf_bt = "(WiFi/BT)" if mcu == "esp32" else "(WiFi)"
|
||||||
|
|
||||||
if info['f_cpu'] == 240000000:
|
if info["f_cpu"] == 240000000:
|
||||||
print(f"{name}.menu.CPUFreq.240=240MHz {wf_bt}")
|
print(f"{name}.menu.CPUFreq.240=240MHz {wf_bt}")
|
||||||
print(f"{name}.menu.CPUFreq.240.build.f_cpu=240000000L")
|
print(f"{name}.menu.CPUFreq.240.build.f_cpu=240000000L")
|
||||||
print(f"{name}.menu.CPUFreq.160=160MHz {wf_bt}")
|
print(f"{name}.menu.CPUFreq.160=160MHz {wf_bt}")
|
||||||
|
|
@ -402,29 +417,29 @@ def build_menu_freq(mcu, name):
|
||||||
def build_menu_flash(mcu, name, flash_size):
|
def build_menu_flash(mcu, name, flash_size):
|
||||||
info = mcu_dict[mcu]
|
info = mcu_dict[mcu]
|
||||||
|
|
||||||
if mcu == 'esp32s3':
|
if mcu == "esp32s3":
|
||||||
print(f'{name}.menu.FlashMode.qio=QIO 80MHz')
|
print(f"{name}.menu.FlashMode.qio=QIO 80MHz")
|
||||||
print(f'{name}.menu.FlashMode.qio.build.flash_mode=dio')
|
print(f"{name}.menu.FlashMode.qio.build.flash_mode=dio")
|
||||||
print(f'{name}.menu.FlashMode.qio.build.boot=qio')
|
print(f"{name}.menu.FlashMode.qio.build.boot=qio")
|
||||||
print(f'{name}.menu.FlashMode.qio.build.boot_freq=80m')
|
print(f"{name}.menu.FlashMode.qio.build.boot_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.qio.build.flash_freq=80m')
|
print(f"{name}.menu.FlashMode.qio.build.flash_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.qio120=QIO 120MHz')
|
print(f"{name}.menu.FlashMode.qio120=QIO 120MHz")
|
||||||
print(f'{name}.menu.FlashMode.qio120.build.flash_mode=dio')
|
print(f"{name}.menu.FlashMode.qio120.build.flash_mode=dio")
|
||||||
print(f'{name}.menu.FlashMode.qio120.build.boot=qio')
|
print(f"{name}.menu.FlashMode.qio120.build.boot=qio")
|
||||||
print(f'{name}.menu.FlashMode.qio120.build.boot_freq=120m')
|
print(f"{name}.menu.FlashMode.qio120.build.boot_freq=120m")
|
||||||
print(f'{name}.menu.FlashMode.qio120.build.flash_freq=80m')
|
print(f"{name}.menu.FlashMode.qio120.build.flash_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.dio=DIO 80MHz')
|
print(f"{name}.menu.FlashMode.dio=DIO 80MHz")
|
||||||
print(f'{name}.menu.FlashMode.dio.build.flash_mode=dio')
|
print(f"{name}.menu.FlashMode.dio.build.flash_mode=dio")
|
||||||
print(f'{name}.menu.FlashMode.dio.build.boot=dio')
|
print(f"{name}.menu.FlashMode.dio.build.boot=dio")
|
||||||
print(f'{name}.menu.FlashMode.dio.build.boot_freq=80m')
|
print(f"{name}.menu.FlashMode.dio.build.boot_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.dio.build.flash_freq=80m')
|
print(f"{name}.menu.FlashMode.dio.build.flash_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.opi=OPI 80MHz')
|
print(f"{name}.menu.FlashMode.opi=OPI 80MHz")
|
||||||
print(f'{name}.menu.FlashMode.opi.build.flash_mode=dout')
|
print(f"{name}.menu.FlashMode.opi.build.flash_mode=dout")
|
||||||
print(f'{name}.menu.FlashMode.opi.build.boot=opi')
|
print(f"{name}.menu.FlashMode.opi.build.boot=opi")
|
||||||
print(f'{name}.menu.FlashMode.opi.build.boot_freq=80m')
|
print(f"{name}.menu.FlashMode.opi.build.boot_freq=80m")
|
||||||
print(f'{name}.menu.FlashMode.opi.build.flash_freq=80m')
|
print(f"{name}.menu.FlashMode.opi.build.flash_freq=80m")
|
||||||
else:
|
else:
|
||||||
if (info['spi_mode'] == 'qio'):
|
if info["spi_mode"] == "qio":
|
||||||
print(f"{name}.menu.FlashMode.qio=QIO")
|
print(f"{name}.menu.FlashMode.qio=QIO")
|
||||||
print(f"{name}.menu.FlashMode.qio.build.flash_mode=dio")
|
print(f"{name}.menu.FlashMode.qio.build.flash_mode=dio")
|
||||||
print(f"{name}.menu.FlashMode.qio.build.boot=qio")
|
print(f"{name}.menu.FlashMode.qio.build.boot=qio")
|
||||||
|
|
@ -439,13 +454,13 @@ def build_menu_flash(mcu, name, flash_size):
|
||||||
print(f"{name}.menu.FlashFreq.40.build.flash_freq=40m")
|
print(f"{name}.menu.FlashFreq.40.build.flash_freq=40m")
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print(f"{name}.menu.FlashSize.{flash_size}M={flash_size}MB ({flash_size*8}Mb)")
|
print(f"{name}.menu.FlashSize.{flash_size}M={flash_size}MB ({flash_size * 8}Mb)")
|
||||||
print(f"{name}.menu.FlashSize.{flash_size}M.build.flash_size={flash_size}MB")
|
print(f"{name}.menu.FlashSize.{flash_size}M.build.flash_size={flash_size}MB")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def build_menu_uploadspeed(mcu, name):
|
def build_menu_uploadspeed(mcu, name):
|
||||||
info = mcu_dict[mcu]
|
# info = mcu_dict[mcu]
|
||||||
print(f"{name}.menu.UploadSpeed.921600=921600")
|
print(f"{name}.menu.UploadSpeed.921600=921600")
|
||||||
print(f"{name}.menu.UploadSpeed.921600.upload.speed=921600")
|
print(f"{name}.menu.UploadSpeed.921600.upload.speed=921600")
|
||||||
print(f"{name}.menu.UploadSpeed.115200=115200")
|
print(f"{name}.menu.UploadSpeed.115200=115200")
|
||||||
|
|
@ -464,7 +479,7 @@ def build_menu_uploadspeed(mcu, name):
|
||||||
|
|
||||||
|
|
||||||
def build_menu_debug(mcu, name):
|
def build_menu_debug(mcu, name):
|
||||||
info = mcu_dict[mcu]
|
# info = mcu_dict[mcu]
|
||||||
print(f"{name}.menu.DebugLevel.none=None")
|
print(f"{name}.menu.DebugLevel.none=None")
|
||||||
print(f"{name}.menu.DebugLevel.none.build.code_debug=0")
|
print(f"{name}.menu.DebugLevel.none.build.code_debug=0")
|
||||||
print(f"{name}.menu.DebugLevel.error=Error")
|
print(f"{name}.menu.DebugLevel.error=Error")
|
||||||
|
|
@ -489,16 +504,19 @@ def build_menu_erase(mcu, name):
|
||||||
|
|
||||||
|
|
||||||
def build_menu_zigbee(mcu, name):
|
def build_menu_zigbee(mcu, name):
|
||||||
print(f"{name}.menu.ZigbeeMode.default=Disabled")
|
menu = f"{name}.menu.ZigbeeMode"
|
||||||
print(f"{name}.menu.ZigbeeMode.default.build.zigbee_mode=")
|
print(f"{menu}.default=Disabled")
|
||||||
print(f"{name}.menu.ZigbeeMode.default.build.zigbee_libs=")
|
print(f"{menu}.default.build.zigbee_mode=")
|
||||||
print(f"{name}.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator)")
|
print(f"{menu}.default.build.zigbee_libs=")
|
||||||
print(f"{name}.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR")
|
print(f"{menu}.zczr=Zigbee ZCZR (coordinator)")
|
||||||
print(f"{name}.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api_zczr -lesp_zb_cli_command -lzboss_stack.zczr -lzboss_port")
|
print(f"{menu}.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR")
|
||||||
|
print(f"{menu}.zczr.build.zigbee_libs=-lesp_zb_api_zczr -lesp_zb_cli_command -lzboss_stack.zczr -lzboss_port")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def make_board(mcu, name, variant, boarddefine, flash_size, psram_size, psram_type, noota_first, vendor, product, vid, pid_list):
|
def make_board(
|
||||||
|
mcu, name, variant, boarddefine, flash_size, psram_size, psram_type, noota_first, vendor, product, vid, pid_list
|
||||||
|
):
|
||||||
if variant == "":
|
if variant == "":
|
||||||
variant = name
|
variant = name
|
||||||
build_header(name, vendor, product, vid, pid_list)
|
build_header(name, vendor, product, vid, pid_list)
|
||||||
|
|
@ -520,102 +538,348 @@ def make_board(mcu, name, variant, boarddefine, flash_size, psram_size, psram_ty
|
||||||
# Metro
|
# Metro
|
||||||
# ---------------------
|
# ---------------------
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_metro_esp32s2", "", "METRO_ESP32S2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", "Metro ESP32-S2", "0x239A", ["0x80DF", "0x00DF", "0x80E0"])
|
"adafruit_metro_esp32s2",
|
||||||
|
"",
|
||||||
|
"METRO_ESP32S2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Metro ESP32-S2",
|
||||||
|
"0x239A",
|
||||||
|
["0x80DF", "0x00DF", "0x80E0"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_metro_esp32s3", "", "METRO_ESP32S3",
|
make_board(
|
||||||
16, 8, 'opi', False,
|
"esp32s3",
|
||||||
"Adafruit", "Metro ESP32-S3", "0x239A", ["0x8145", "0x0145", "0x8146"])
|
"adafruit_metro_esp32s3",
|
||||||
|
"",
|
||||||
|
"METRO_ESP32S3",
|
||||||
|
16,
|
||||||
|
8,
|
||||||
|
"opi",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Metro ESP32-S3",
|
||||||
|
"0x239A",
|
||||||
|
["0x8145", "0x0145", "0x8146"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_magtag29_esp32s2", "", "MAGTAG29_ESP32S2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'MagTag 2.9"', "0x239A", ["0x80E5", "0x00E5", "0x80E6"])
|
"adafruit_magtag29_esp32s2",
|
||||||
|
"",
|
||||||
|
"MAGTAG29_ESP32S2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
'MagTag 2.9"',
|
||||||
|
"0x239A",
|
||||||
|
["0x80E5", "0x00E5", "0x80E6"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_funhouse_esp32s2", "", "FUNHOUSE_ESP32S2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'FunHouse', "0x239A", ["0x80F9", "0x00F9", "0x80FA"])
|
"adafruit_funhouse_esp32s2",
|
||||||
|
"",
|
||||||
|
"FUNHOUSE_ESP32S2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"FunHouse",
|
||||||
|
"0x239A",
|
||||||
|
["0x80F9", "0x00F9", "0x80FA"],
|
||||||
|
)
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# Feather
|
# Feather
|
||||||
# ---------------------
|
# ---------------------
|
||||||
|
|
||||||
# ESP32
|
# ESP32
|
||||||
make_board("esp32", "featheresp32", "feather_esp32", "FEATHER_ESP32",
|
make_board(
|
||||||
4, 0, '', False,
|
"esp32", "featheresp32", "feather_esp32", "FEATHER_ESP32", 4, 0, "", False, "Adafruit", "ESP32 Feather", "", []
|
||||||
"Adafruit", "ESP32 Feather", "", [])
|
)
|
||||||
|
|
||||||
make_board("esp32", "adafruit_feather_esp32_v2", "adafruit_feather_esp32_v2", "ADAFRUIT_FEATHER_ESP32_V2",
|
make_board(
|
||||||
8, 2, '', False,
|
"esp32",
|
||||||
"Adafruit", "Feather ESP32 V2", "", [])
|
"adafruit_feather_esp32_v2",
|
||||||
|
"adafruit_feather_esp32_v2",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32_V2",
|
||||||
|
8,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32 V2",
|
||||||
|
"",
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
# S2
|
# S2
|
||||||
make_board("esp32s2", "adafruit_feather_esp32s2", "", "ADAFRUIT_FEATHER_ESP32S2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'Feather ESP32-S2', "0x239A", ["0x80EB", "0x00EB", "0x80EC"])
|
"adafruit_feather_esp32s2",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S2",
|
||||||
|
"0x239A",
|
||||||
|
["0x80EB", "0x00EB", "0x80EC"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_feather_esp32s2_tft", "", "ADAFRUIT_FEATHER_ESP32S2_TFT",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'Feather ESP32-S2 TFT', "0x239A", ["0x810F", "0x010F", "0x8110"])
|
"adafruit_feather_esp32s2_tft",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S2_TFT",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S2 TFT",
|
||||||
|
"0x239A",
|
||||||
|
["0x810F", "0x010F", "0x8110"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_feather_esp32s2_reversetft", "", "ADAFRUIT_FEATHER_ESP32S2_REVTFT",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'Feather ESP32-S2 Reverse TFT', "0x239A", ["0x80ED", "0x00ED", "0x80EE"])
|
"adafruit_feather_esp32s2_reversetft",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S2_REVTFT",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S2 Reverse TFT",
|
||||||
|
"0x239A",
|
||||||
|
["0x80ED", "0x00ED", "0x80EE"],
|
||||||
|
)
|
||||||
|
|
||||||
# S3
|
# S3
|
||||||
make_board("esp32s3", "adafruit_feather_esp32s3", "", "ADAFRUIT_FEATHER_ESP32S3",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'Feather ESP32-S3 2MB PSRAM', "0x239A", ["0x811B", "0x011B", "0x811C"])
|
"adafruit_feather_esp32s3",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S3",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S3 2MB PSRAM",
|
||||||
|
"0x239A",
|
||||||
|
["0x811B", "0x011B", "0x811C"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_feather_esp32s3_nopsram", "", "ADAFRUIT_FEATHER_ESP32S3_NOPSRAM",
|
make_board(
|
||||||
8, 0, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'Feather ESP32-S3 No PSRAM', "0x239A", ["0x8113", "0x0113", "0x8114"])
|
"adafruit_feather_esp32s3_nopsram",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S3_NOPSRAM",
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S3 No PSRAM",
|
||||||
|
"0x239A",
|
||||||
|
["0x8113", "0x0113", "0x8114"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_feather_esp32s3_tft", "", "ADAFRUIT_FEATHER_ESP32S3_TFT",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'Feather ESP32-S3 TFT', "0x239A", ["0x811D", "0x011D", "0x811E"])
|
"adafruit_feather_esp32s3_tft",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S3_TFT",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S3 TFT",
|
||||||
|
"0x239A",
|
||||||
|
["0x811D", "0x011D", "0x811E"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_feather_esp32s3_reversetft", "", "ADAFRUIT_FEATHER_ESP32S3_REVTFT",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'Feather ESP32-S3 Reverse TFT', "0x239A", ["0x8123", "0x0123", "0x8124"])
|
"adafruit_feather_esp32s3_reversetft",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32S3_REVTFT",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-S3 Reverse TFT",
|
||||||
|
"0x239A",
|
||||||
|
["0x8123", "0x0123", "0x8124"],
|
||||||
|
)
|
||||||
|
|
||||||
|
make_board(
|
||||||
|
"esp32c6",
|
||||||
|
"adafruit_feather_esp32c6",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_FEATHER_ESP32C6",
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Feather ESP32-C6",
|
||||||
|
"",
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
# QT Py
|
# QT Py
|
||||||
# ---------------------
|
# ---------------------
|
||||||
|
|
||||||
make_board("esp32", "adafruit_qtpy_esp32_pico", "adafruit_qtpy_esp32", "ADAFRUIT_QTPY_ESP32_PICO",
|
make_board(
|
||||||
8, 2, '', False,
|
"esp32",
|
||||||
"Adafruit", "QT Py ESP32", "", [])
|
"adafruit_qtpy_esp32_pico",
|
||||||
|
"adafruit_qtpy_esp32",
|
||||||
|
"ADAFRUIT_QTPY_ESP32_PICO",
|
||||||
|
8,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"QT Py ESP32",
|
||||||
|
"",
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32c3", "adafruit_qtpy_esp32c3", "", "ADAFRUIT_QTPY_ESP32C3",
|
make_board(
|
||||||
4, 0, '', False,
|
"esp32c3",
|
||||||
"Adafruit", "QT Py ESP32-C3", "", [])
|
"adafruit_qtpy_esp32c3",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_QTPY_ESP32C3",
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"QT Py ESP32-C3",
|
||||||
|
"",
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s2", "adafruit_qtpy_esp32s2", "", "ADAFRUIT_QTPY_ESP32S2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s2",
|
||||||
"Adafruit", 'QT Py ESP32-S2', "0x239A", ["0x8111", "0x0111", "0x8112"])
|
"adafruit_qtpy_esp32s2",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_QTPY_ESP32S2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"QT Py ESP32-S2",
|
||||||
|
"0x239A",
|
||||||
|
["0x8111", "0x0111", "0x8112"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_qtpy_esp32s3_nopsram", "", "ADAFRUIT_QTPY_ESP32S3_NOPSRAM",
|
make_board(
|
||||||
8, 0, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'QT Py ESP32-S3 No PSRAM', "0x239A", ["0x8119", "0x0119", "0x811A"])
|
"adafruit_qtpy_esp32s3_nopsram",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_QTPY_ESP32S3_NOPSRAM",
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"QT Py ESP32-S3 No PSRAM",
|
||||||
|
"0x239A",
|
||||||
|
["0x8119", "0x0119", "0x811A"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_qtpy_esp32s3_n4r2", "", "ADAFRUIT_QTPY_ESP32S3_N4R2",
|
make_board(
|
||||||
4, 2, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'QT Py ESP32-S3 (4M Flash 2M PSRAM)', "0x239A", ["0x8143", "0x0143", "0x8144"])
|
"adafruit_qtpy_esp32s3_n4r2",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_QTPY_ESP32S3_N4R2",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"QT Py ESP32-S3 (4M Flash 2M PSRAM)",
|
||||||
|
"0x239A",
|
||||||
|
["0x8143", "0x0143", "0x8144"],
|
||||||
|
)
|
||||||
|
|
||||||
# --
|
# --
|
||||||
make_board("esp32", "adafruit_itsybitsy_esp32", "", "ADAFRUIT_ITSYBITSY_ESP32",
|
make_board(
|
||||||
8, 2, '', False,
|
"esp32",
|
||||||
"Adafruit", "ItsyBitsy ESP32", "", [])
|
"adafruit_itsybitsy_esp32",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_ITSYBITSY_ESP32",
|
||||||
|
8,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"ItsyBitsy ESP32",
|
||||||
|
"",
|
||||||
|
[],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_matrixportal_esp32s3", "", "ADAFRUIT_MATRIXPORTAL_ESP32S3",
|
make_board(
|
||||||
8, 2, '', False,
|
"esp32s3",
|
||||||
"Adafruit", 'MatrixPortal ESP32-S3', "0x239A", ["0x8125", "0x0125", "0x8126"])
|
"adafruit_matrixportal_esp32s3",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_MATRIXPORTAL_ESP32S3",
|
||||||
|
8,
|
||||||
|
2,
|
||||||
|
"",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"MatrixPortal ESP32-S3",
|
||||||
|
"0x239A",
|
||||||
|
["0x8125", "0x0125", "0x8126"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_camera_esp32s3", "", "ADAFRUIT_CAMERA_ESP32S3",
|
make_board(
|
||||||
4, 2, 'qspi', True,
|
"esp32s3",
|
||||||
"Adafruit", 'pyCamera S3', "0x239A", ["0x0117", "0x8117", "0x8118"])
|
"adafruit_camera_esp32s3",
|
||||||
|
"",
|
||||||
|
"ADAFRUIT_CAMERA_ESP32S3",
|
||||||
|
4,
|
||||||
|
2,
|
||||||
|
"qspi",
|
||||||
|
True,
|
||||||
|
"Adafruit",
|
||||||
|
"pyCamera S3",
|
||||||
|
"0x239A",
|
||||||
|
["0x0117", "0x8117", "0x8118"],
|
||||||
|
)
|
||||||
|
|
||||||
make_board("esp32s3", "adafruit_qualia_s3_rgb666", "", "QUALIA_S3_RGB666",
|
make_board(
|
||||||
16, 8, 'opi', False,
|
"esp32s3",
|
||||||
"Adafruit", 'Qualia ESP32-S3 RGB666', "0x239A", ["0x8147", "0x0147", "0x8148"])
|
"adafruit_qualia_s3_rgb666",
|
||||||
|
"",
|
||||||
|
"QUALIA_S3_RGB666",
|
||||||
|
16,
|
||||||
|
8,
|
||||||
|
"opi",
|
||||||
|
False,
|
||||||
|
"Adafruit",
|
||||||
|
"Qualia ESP32-S3 RGB666",
|
||||||
|
"0x239A",
|
||||||
|
["0x8147", "0x0147", "0x8148"],
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
import os
|
import os
|
||||||
import shutil
|
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import zipfile
|
import zipfile
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
|
|
||||||
version = '0.18.1'
|
version = "0.20.1"
|
||||||
print('version {}'.format(version))
|
print("version {}".format(version))
|
||||||
|
|
||||||
# variant name, tinyuf2 bootloader name
|
# variant name, tinyuf2 bootloader name
|
||||||
|
|
||||||
|
|
@ -16,23 +15,23 @@ print('version {}'.format(version))
|
||||||
# [variant name, download name]
|
# [variant name, download name]
|
||||||
# Alphabetical order
|
# Alphabetical order
|
||||||
all_variant = [
|
all_variant = [
|
||||||
['adafruit_camera_esp32s3', ''],
|
["adafruit_camera_esp32s3", ""],
|
||||||
['adafruit_feather_esp32s2', ''],
|
["adafruit_feather_esp32s2", ""],
|
||||||
['adafruit_feather_esp32s2_reversetft', 'adafruit_feather_esp32s2_reverse_tft'],
|
["adafruit_feather_esp32s2_reversetft", "adafruit_feather_esp32s2_reverse_tft"],
|
||||||
['adafruit_feather_esp32s2_tft', ''],
|
["adafruit_feather_esp32s2_tft", ""],
|
||||||
['adafruit_feather_esp32s3', ''],
|
["adafruit_feather_esp32s3", ""],
|
||||||
['adafruit_feather_esp32s3_nopsram', ''],
|
["adafruit_feather_esp32s3_nopsram", ""],
|
||||||
['adafruit_feather_esp32s3_reversetft', 'adafruit_feather_esp32s3_reverse_tft'],
|
["adafruit_feather_esp32s3_reversetft", "adafruit_feather_esp32s3_reverse_tft"],
|
||||||
['adafruit_feather_esp32s3_tft', ''],
|
["adafruit_feather_esp32s3_tft", ""],
|
||||||
['adafruit_funhouse_esp32s2', ''],
|
["adafruit_funhouse_esp32s2", ""],
|
||||||
['adafruit_magtag29_esp32s2', 'adafruit_magtag_29gray'],
|
["adafruit_magtag29_esp32s2", "adafruit_magtag_29gray"],
|
||||||
['adafruit_matrixportal_esp32s3', 'adafruit_matrixportal_s3'],
|
["adafruit_matrixportal_esp32s3", "adafruit_matrixportal_s3"],
|
||||||
['adafruit_metro_esp32s2', ''],
|
["adafruit_metro_esp32s2", ""],
|
||||||
['adafruit_metro_esp32s3', ''],
|
["adafruit_metro_esp32s3", ""],
|
||||||
['adafruit_qtpy_esp32s2', ''],
|
["adafruit_qtpy_esp32s2", ""],
|
||||||
['adafruit_qtpy_esp32s3_n4r2', ''],
|
["adafruit_qtpy_esp32s3_n4r2", ""],
|
||||||
['adafruit_qtpy_esp32s3_nopsram', 'adafruit_qtpy_esp32s3'],
|
["adafruit_qtpy_esp32s3_nopsram", "adafruit_qtpy_esp32s3"],
|
||||||
['adafruit_qualia_s3_rgb666', ''],
|
["adafruit_qualia_s3_rgb666", ""],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,19 +40,15 @@ def update_variant(v):
|
||||||
dl_name = v[1] if v[1] else v[0]
|
dl_name = v[1] if v[1] else v[0]
|
||||||
|
|
||||||
# Download from bootloader release
|
# Download from bootloader release
|
||||||
name = 'tinyuf2-{}-{}.zip'.format(dl_name, version)
|
url = f"https://github.com/adafruit/tinyuf2/releases/download/{version}/tinyuf2-{dl_name}-{version}.zip"
|
||||||
url = 'https://github.com/adafruit/tinyuf2/releases/download/{}/tinyuf2-{}-{}.zip'.format(
|
|
||||||
version, dl_name, version)
|
|
||||||
print("Downloading TinyUF2 for", variant)
|
print("Downloading TinyUF2 for", variant)
|
||||||
urllib.request.urlretrieve(url, variant)
|
urllib.request.urlretrieve(url, variant)
|
||||||
|
|
||||||
variant_path = 'variants/{}'.format(variant)
|
|
||||||
|
|
||||||
# unzip (will overwrite old files)
|
# unzip (will overwrite old files)
|
||||||
|
variant_path = f"variants/{variant}"
|
||||||
with zipfile.ZipFile(variant, "r") as zf:
|
with zipfile.ZipFile(variant, "r") as zf:
|
||||||
zf.extract("bootloader.bin", variant_path)
|
zf.extract("bootloader.bin", variant_path)
|
||||||
os.renames(os.path.join(variant_path, "bootloader.bin"),
|
os.renames(os.path.join(variant_path, "bootloader.bin"), os.path.join(variant_path, "bootloader-tinyuf2.bin"))
|
||||||
os.path.join(variant_path, "bootloader-tinyuf2.bin"))
|
|
||||||
zf.extract("tinyuf2.bin", variant_path)
|
zf.extract("tinyuf2.bin", variant_path)
|
||||||
|
|
||||||
# remove zip file
|
# remove zip file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue