SimulAVR on ARM64 with latest Klipper

I am trying to run SimulAVR on RaspberryPi with recent/latest Klipper. However, I can’t get Klipper to connect. It complains that the serial connection was closed:

Build file /home/pi/klipper/klippy/../out/klipper.dict(7238): Mon Mar 25 16:18:24 2024
Last MCU build version: v0.12.0-102-g9f41f53c
Last MCU build tools: gcc: (GCC) 5.4.0 binutils: (GNU Binutils) 2.26.20160125
Last MCU build config: ADC_MAX=1023 BUS_PINS_spi=PB6,PB5,PB7 BUS_PINS_twi=PC0,PC1 CLOCK_FREQ=20000000 MCU=atmega644p PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_serial=PD0,PD1 SERIAL_BAUD=250000 STATS_SUMSQ_BASE=256
Build file /home/pi/klipper/klippy/../out/klipper.elf(286752): Mon Mar 25 16:18:35 2024
mcu 'mcu': Wait for identify_response
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _get_identify_data
    params = self.send_with_response(msg, 'identify_response')
  File "/home/pi/klipper/klippy/serialhdl.py", line 261, in send_with_response
    return src.get_response([cmd], self.default_cmd_queue)
  File "/home/pi/klipper/klippy/serialhdl.py", line 318, in get_response
    self.serial.raw_send_wait_ack(cmds[-1], minclock, reqclock,
  File "/home/pi/klipper/klippy/serialhdl.py", line 253, in raw_send_wait_ack
    self._error("Serial connection closed")
  File "/home/pi/klipper/klippy/serialhdl.py", line 61, in _error
    raise error(self.warn_prefix + (msg % params))
serialhdl.error: mcu 'mcu': Serial connection closed

I am also getting some warning from SimulAVR about registers not being simulated:

Starting AVR simulation: machine=atmega644 speed=20000000
Serial: port=/tmp/pseudoserial baud=250000
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register MCUSR not simulated (write 0x00 to register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 246: MCU register WDTCSR not simulated (read from register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register WDTCSR not simulated (write 0x18 to register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register WDTCSR not simulated (write 0x00 to register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register WDTCSR not simulated (write 0x18 to register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register WDTCSR not simulated (write 0x0d to register)
WARNING: file /home/pi/git/simulavr/libsim/rwmem.cpp: line 252: MCU register WDTCSR not simulated (write 0x40 to register)

Is this an issue with the fact that I am trying to run on an ARM64 architecture? How can I debug this and get it to work? Thanks.

@voidtrance did you solve this issue? I have the same problem.
Thanks

Hello @rollduck !

What can you provide to help to find a solution?

For my purposes, I could just use kinematics: none, which allowed Klipper to start without needed a simulator. However, it would be nice to figure out how to get it working, if anyone can help.