#Im building an voron 2.4 rev D kit from LDO. Leviathan 1.3 won't flash klipper

23 messages · Page 1 of 1 (latest)

kindred breach
#

This is my first voron and im not coding expert but I have made 100% sure the menuconfig values are correct. The Katapult bootloader flashed fine. and when I run "lsusb" I get "Bus 001 Device 007: ID 1d50:6177 OpenMoko, Inc. stm32h743xx" as I should.
when i run "ls /dev/serial/by-id/*" i get "/dev/serial/by-id/usb-katapult_stm32h743xx_450030000751333038333637-if00" as i should.

but when i go to run "~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/ttyACM0 -f out/klipper.bin"
i get the following error

"~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/ttyACM0 -f out/klipper.bin

Connecting to Serial Device /dev/ttyACM0, baud 250000
Detected USB device running Katapult
Detected Klipper binary version v0.13.0-296-g9e6430aa, MCU: stm32h743xx
Attempting to connect to bootloader
Katapult Connected
Software Version: v0.0.1-106-g399e50e
Protocol Version: 1.1.0
Block Size: 64 bytes
Application Start: 0x8020000
MCU type: stm32h743xx
Flashing '/home/chisel/klipper/out/klipper.bin'...

[ERROR:root:Flash Tool Error
Traceback (most recent call last):
  File "/home/chisel/katapult/scripts/flashtool.py", line 429, in send_file
    resp = await self.send_command(
  File "/home/chisel/katapult/scripts/flashtool.py", line 407, in send_command
    raise FlashError("Error sending command [%s] to Device" % (cmdname))
FlashError: Error sending command [SEND_BLOCK] to Device

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/chisel/katapult/scripts/flashtool.py", line 1104, in main
    await sock.run()
  File "/home/chisel/katapult/scripts/flashtool.py", line 1078, in run
    await flasher.send_file()
  File "/home/chisel/katapult/scripts/flashtool.py", line 433, in send_file
    raise FlashError(
FlashError: Flash write failed, flash address 0x8020000
chisel@VoronPi:~/klipper $

"

im completely stumped by this. Desperate for any help. Tyia

torpid torrent
#

Hi! Have you tried doing it according to Esoterical's USB guide? Especially the flash method using make flash FLASH_DEVICE=/dev/serial/by-id/usb-katapult_your_board_id instead of Katapult flasher.

kindred breach
# torpid torrent Hi! Have you tried doing it according to [Esoterical's USB guide](https://usb.es...

Yes, got to the section on installing klipper via katapult, now get this error

Attempting to connect to bootloader
CanBoot Connected
Protocol Version: 1.1.0
Block Size: 64 bytes
Application Start: 0x8020000
MCU type: stm32h743xxv0.0.1-106-g399e50e
Flashing '/home/chisel/klipper/out/klipper.bin'...

[ERROR:root:Can Flash Error
Traceback (most recent call last):
File "/home/chisel/klipper/lib/canboot/flash_can.py", line 610, in main
loop.run_until_complete(sock.run(args.device, args.baud, fpath))
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/chisel/klipper/lib/canboot/flash_can.py", line 537, in run
await flasher.send_file()
File "/home/chisel/klipper/lib/canboot/flash_can.py", line 207, in send_file
resp = await self.send_command('SEND_BLOCK', prefix + buf)
File "/home/chisel/klipper/lib/canboot/flash_can.py", line 186, in send_command
raise FlashCanError("Error sending command [%s] to Can Device"
FlashCanError: Error sending command [SEND_BLOCK] to Can Device
Error running flash_can.py
make: *** [src/stm32/Makefile:107: flash] Error 255

torpid torrent
#

Is that an output of
~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/ttyACM0 -f out/klipper.bin
or
make flash FLASH_DEVICE=/dev/serial/by-id/usb-katapult_stm32h743xx_450030000751333038333637-if00
?

#

Oh, I see in the traceback now - it's from Klipper. So both tools throw the same error.

kindred breach
#

Yeah. Im unsure whether it's a hardware issue now. But I find it strange that katapult flashes fine. Ive messaged LDO cos im lost

torpid torrent
kindred breach
# torpid torrent Try flashing Klipper directly through DFU mode. So: put the Leviathan in DFU mod...

chisel@VoronPi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
chisel@VoronPi:~ $ cd klipper
chisel@VoronPi:~/klipper $ make
make flash FLASH_DEVICE=0483:df11
make: Nothing to be done for 'all'.
Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8020000:leave -D out/klipper.bin

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 34948
Download [=========================] 100% 34948 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status

Failed to flash to 0483:df11: Error running dfu-util

If the device is already in bootloader mode it can be flashed with the
following command:
make flash FLASH_DEVICE=0483:df11
OR
make flash FLASH_DEVICE=1209:beba

If attempting to flash via 3.3V serial, then use:
make serialflash FLASH_DEVICE=0483:df11

make: *** [src/stm32/Makefile:107: flash] Error 255
chisel@VoronPi:~/klipper $

torpid torrent
#

That's a task failed successfully situation. What counts is: File downloaded successfully. Check the USB ID now.

kindred breach
#

What does that mean? Run lsusb?

torpid torrent
#

Yep!

royal fossil
kindred breach
torpid torrent
kindred breach
#

chisel@VoronPi:~ $ ls /dev/serial/by-id/*
/dev/serial/by-id/usb-Klipper_stm32h743xx_450030000751333038333637-if00

#

what does that mean for now? did it flash?

torpid torrent
#

Yup - it runs Klipper now. You can continue onwards with your build :)

kindred breach
torpid torrent
#

No worries! Good luck with your build!

royal fossil
#

@kindred breach, fyi

royal kindleBOT
#

When posting configs or logs, please surround with code fences (```) so that Discord formats them correctly. Example:
```ini
[mcu]
serial: /dev/serial/by-id/usb-klipper-12345-if00
```

[mcu]
serial: /dev/serial/by-id/usb-klipper-12345-if00
kindred breach