Hi
I am trying to flash klipper to my Tevo Tornado (gold) with a mks genl v1.0 board.
I have klipper running on a raspberry pi and the pi is connected to the mks genl v1.0 directly (not via usb) and I can connect to the board this way via /dev/ttyS0.
I have pulled the latest klipper from GitHub
I did a make menuconfig and set mcu to atmega 2560
I then ran make which gave me a klipper.elf.hex firmware file
Then I would like to use the flash-sdcard.sh script to flash the firmware, so I ran:
./scripts/flash-sdcard.sh -f out/klipper.elf.hex /dev/ttyS0 mks-sgenl-v1
But I get this error:
SD Card Flash Error: MCU Type mismatch: Build MCU = lpc1768, Connected MCU = atmega2560
I tried to re-run menuconfig with the same result.
I tried to compile for several random mcu’s in menuconfig but I get the same error stating that it has been build for a lpc1768 mcu.
Every iteration of reconfig was done with:
make clean
make menuconfig
make
./scripts/flash-sdcard.sh -f out/klipper.elf.hex /dev/ttyS0 mks-sgenl-v1
It seems that no matter what mcu I build for, the script will see it as build for a lpc1768
Or am I missing the purpose of the flash-sdcard.sh script?
Best regards Jeppe
Here is the full error message:
SD Card Flash Error: MCU Type mismatch: Build MCU = lpc1768, Connected MCU = atmega2560
Traceback (most recent call last):
File "/home/jeppe/klipper/scripts/spi_flash/spi_flash.py", line 1647, in main
spiflash.run()
File "/home/jeppe/klipper/scripts/spi_flash/spi_flash.py", line 1584, in run
self.run_reactor_task(self.run_reset_upload)
File "/home/jeppe/klipper/scripts/spi_flash/spi_flash.py", line 1570, in run_reactor_task
k_reactor.run()
File "/home/jeppe/klipper/klippy/reactor.py", line 292, in run
g_next.switch()
File "/home/jeppe/klipper/klippy/reactor.py", line 340, in _dispatch_loop
timeout = self._check_timers(eventtime, busy)
File "/home/jeppe/klipper/klippy/reactor.py", line 158, in _check_timers
t.waketime = waketime = t.callback(eventtime)
File "/home/jeppe/klipper/klippy/reactor.py", line 48, in invoke
res = self.callback(eventtime)
File "/home/jeppe/klipper/scripts/spi_flash/spi_flash.py", line 1518, in run_reset_upload
self.mcu_conn.connect()
File "/home/jeppe/klipper/scripts/spi_flash/spi_flash.py", line 1210, in connect
% (build_mcu_type, mcu_type))
SPIFlashError: MCU Type mismatch: Build MCU = lpc1768, Connected MCU = atmega2560