diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-10-25 16:31:53 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-11-14 11:17:52 -0500 |
commit | 848124ac4df9a0ad80290bfd6410d276c62cf31c (patch) | |
tree | b6f49ce9d1364fa03312bc2ab19018d0b507aec2 | |
parent | 3cdb1793d4656717a679a73cae880589bb9267ad (diff) | |
download | kutter-848124ac4df9a0ad80290bfd6410d276c62cf31c.tar.gz kutter-848124ac4df9a0ad80290bfd6410d276c62cf31c.tar.xz kutter-848124ac4df9a0ad80290bfd6410d276c62cf31c.zip |
flash_usb: Initial support for flashing rp2350 chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rwxr-xr-x | scripts/flash_usb.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/flash_usb.py b/scripts/flash_usb.py index e5f5632a..e290f7f3 100755 --- a/scripts/flash_usb.py +++ b/scripts/flash_usb.py @@ -321,7 +321,7 @@ Failed to flash to %s: %s If the device is already in bootloader mode it can be flashed with the following command: - make flash FLASH_DEVICE=2e8a:0003 + make flash FLASH_DEVICE=%s Alternatively, one can flash rp2040 boards like the Pico by manually entering bootloader mode(hold bootsel button during powerup), mount the @@ -330,13 +330,16 @@ device as a usb drive, and copy klipper.uf2 to the device. """ def flash_rp2040(options, binfile): + rawdev = "2e8a:0003" + if options.mcutype == 'rp2350': + rawdev = "2e8a:000f" try: - if options.device.lower() == "2e8a:0003": + if options.device.lower() == rawdev: call_picoboot(None, None, binfile, options.sudo) else: flash_picoboot(options.device, binfile, options.sudo) except error as e: - sys.stderr.write(RP2040_HELP % (options.device, str(e))) + sys.stderr.write(RP2040_HELP % (options.device, str(e), rawdev)) sys.exit(-1) MCUTYPES = { @@ -347,7 +350,7 @@ MCUTYPES = { 'stm32f070': flash_stm32f4, 'stm32f072': flash_stm32f4, 'stm32g0b1': flash_stm32f4, 'stm32f7': flash_stm32f4, 'stm32h7': flash_stm32f4, 'stm32l4': flash_stm32f4, - 'stm32g4': flash_stm32f4, 'rp2040': flash_rp2040, + 'stm32g4': flash_stm32f4, 'rp2': flash_rp2040, } |