sifive / freedom-e-sdk

Open Source Software for Developing on the Freedom E Platform - Deprecated
Other
582 stars 208 forks source link

Issue to debug qemu_sifive_e31_hello on Apple M1 #635

Open Merok opened 2 years ago

Merok commented 2 years ago

Hello,

I am having issue to run the debugger on the simple qemu_sifive_e31_hello on Freedom Studio. I use a target qemu_sifive_e31 and have selected the option "Use the metal library...". When running the debugger it results in error message : "QEMU failed with code (-1)"

When running in terminal the qemu-system-riscv32 bin it shows error message :

dyld[13185]: Library not loaded: /usr/local/opt/vde/lib/libvdeplug.3.dylib
  Referenced from: /Users/x/Documents/Sifive/FreedomStudio.app/Contents/Eclipse/SiFive/riscv-qemu-5.1.0-2020.08.1/bin/qemu-system-riscv32
  Reason: tried: '/usr/local/opt/vde/lib/libvdeplug.3.dylib' (no such file), '/usr/local/lib/libvdeplug.3.dylib' (no such file), '/usr/lib/libvdeplug.3.dylib' (no such file)
zsh: abort      

I can however run in terminal qemu-system-riscv32 downloaded from other sources (e.g. from brew install qemu). However, if I use as executable path the qemu binary from brew install it result in the error message:

Error in final launch sequence
  Failed to execute MI command:
-target-select remote localhost:1234
Error message from debugger back end:
localhost:1234: Operation timed out.
    Failed to execute MI command:
-target-select remote localhost:1234
Error message from debugger back end:
localhost:1234: Operation timed out.
    localhost:1234: Operation timed out.

This error happens on my new computer (macOS Monterey with M1 chip) hence I am wondering if the m1 core could be the reason of this error.

Any help would be greatly appreciated ! Thanks