mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-08 07:10:15 +00:00
Added console image flashing to rnodeconf
This commit is contained in:
parent
32922868b9
commit
63d54dbecb
@ -898,7 +898,7 @@ def ensure_firmware_file(fw_filename):
|
|||||||
RNS.log("No release hash found for "+fw_filename+". The firmware integrity could not be verified.")
|
RNS.log("No release hash found for "+fw_filename+". The firmware integrity could not be verified.")
|
||||||
exit(97)
|
exit(97)
|
||||||
|
|
||||||
RNS.log("Veryfying firmware integrity...")
|
RNS.log("Verifying firmware integrity...")
|
||||||
fw_file = open(UPD_DIR+"/"+selected_version+"/"+fw_filename, "rb")
|
fw_file = open(UPD_DIR+"/"+selected_version+"/"+fw_filename, "rb")
|
||||||
expected_hash = bytes.fromhex(selected_hash)
|
expected_hash = bytes.fromhex(selected_hash)
|
||||||
file_hash = hashlib.sha256(fw_file.read()).hexdigest()
|
file_hash = hashlib.sha256(fw_file.read()).hexdigest()
|
||||||
@ -1670,144 +1670,297 @@ def main():
|
|||||||
RNS.log("Please install \""+flasher+"\" and try again.")
|
RNS.log("Please install \""+flasher+"\" and try again.")
|
||||||
exit()
|
exit()
|
||||||
elif platform == ROM.PLATFORM_ESP32:
|
elif platform == ROM.PLATFORM_ESP32:
|
||||||
|
numeric_version = float(selected_version)
|
||||||
flasher = UPD_DIR+"/"+selected_version+"/esptool.py"
|
flasher = UPD_DIR+"/"+selected_version+"/esptool.py"
|
||||||
if which(flasher) is not None:
|
if which(flasher) is not None:
|
||||||
if fw_filename == "rnode_firmware_tbeam.zip":
|
if fw_filename == "rnode_firmware_tbeam.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_tbeam.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_lora32v20.zip":
|
elif fw_filename == "rnode_firmware_lora32v20.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v20.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_lora32v21.zip":
|
elif fw_filename == "rnode_firmware_lora32v21.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_lora32v21.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_heltec32v2.zip":
|
elif fw_filename == "rnode_firmware_heltec32v2.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "8MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.boot_app0",
|
"--flash_size", "8MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "8MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_heltec32v2.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_featheresp32.zip":
|
elif fw_filename == "rnode_firmware_featheresp32.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_featheresp32.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_esp32_generic.zip":
|
elif fw_filename == "rnode_firmware_esp32_generic.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_esp32_generic.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_ng20.zip":
|
elif fw_filename == "rnode_firmware_ng20.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng20.partitions",
|
||||||
|
]
|
||||||
elif fw_filename == "rnode_firmware_ng21.zip":
|
elif fw_filename == "rnode_firmware_ng21.zip":
|
||||||
return [
|
if numeric_version >= 1.55:
|
||||||
flasher,
|
return [
|
||||||
"--chip", "esp32",
|
flasher,
|
||||||
"--port", args.port,
|
"--chip", "esp32",
|
||||||
"--baud", "921600",
|
"--port", args.port,
|
||||||
"--before", "default_reset",
|
"--baud", "921600",
|
||||||
"--after", "hard_reset",
|
"--before", "default_reset",
|
||||||
"write_flash", "-z",
|
"--after", "hard_reset",
|
||||||
"--flash_mode", "dio",
|
"write_flash", "-z",
|
||||||
"--flash_freq", "80m",
|
"--flash_mode", "dio",
|
||||||
"--flash_size", "4MB",
|
"--flash_freq", "80m",
|
||||||
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.boot_app0",
|
"--flash_size", "4MB",
|
||||||
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bootloader",
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.boot_app0",
|
||||||
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bin",
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bootloader",
|
||||||
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.partitions",
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bin",
|
||||||
]
|
"0x210000",UPD_DIR+"/"+selected_version+"/spiffs.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.partitions",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return [
|
||||||
|
flasher,
|
||||||
|
"--chip", "esp32",
|
||||||
|
"--port", args.port,
|
||||||
|
"--baud", "921600",
|
||||||
|
"--before", "default_reset",
|
||||||
|
"--after", "hard_reset",
|
||||||
|
"write_flash", "-z",
|
||||||
|
"--flash_mode", "dio",
|
||||||
|
"--flash_freq", "80m",
|
||||||
|
"--flash_size", "4MB",
|
||||||
|
"0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.boot_app0",
|
||||||
|
"0x1000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bootloader",
|
||||||
|
"0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.bin",
|
||||||
|
"0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_ng21.partitions",
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
RNS.log("No flasher available for this board, cannot install firmware.")
|
RNS.log("No flasher available for this board, cannot install firmware.")
|
||||||
else:
|
else:
|
||||||
@ -1932,8 +2085,10 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
RNS.log("Checking firmware file availability...")
|
RNS.log("Checking firmware file availability...")
|
||||||
|
fw_file_ensured = False
|
||||||
if selected_version == None:
|
if selected_version == None:
|
||||||
ensure_firmware_file(fw_filename)
|
ensure_firmware_file(fw_filename)
|
||||||
|
fw_file_ensured = True
|
||||||
|
|
||||||
if not force_update:
|
if not force_update:
|
||||||
if rnode.version == selected_version:
|
if rnode.version == selected_version:
|
||||||
@ -1956,7 +2111,7 @@ def main():
|
|||||||
RNS.log("Override with -U option to install anyway")
|
RNS.log("Override with -U option to install anyway")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if selected_version != None:
|
if not fw_file_ensured and selected_version != None:
|
||||||
ensure_firmware_file(fw_filename)
|
ensure_firmware_file(fw_filename)
|
||||||
|
|
||||||
if fw_filename.endswith(".zip"):
|
if fw_filename.endswith(".zip"):
|
||||||
|
Loading…
Reference in New Issue
Block a user