VexRiscv
VexRiscv copied to clipboard
FPU Plugin - GDB can't find FPU Register
Hi, I generated the Briey SoC with FPU Plugin with the following configuration:
new FpuPlugin(
externalFpu = false,
p = new FpuParameter(
withDouble = false
)
),
For a compiled program with mabi = ilp32f
and march = rv32iafc
i get the following error trying to connect with gdb via jtag:
(gdb) target extended-remote :3333
Remote debugging using :3333
bfd requires flen 4, but target has flen 0
I'm using the riscv32-unknown-elf-gdb with version 10.1 from the risc-v gnu toolchain.
Can you help here with this issue? Thanks in advance!
Hi, yes, this i a known issue, there is a note on that in the VexRiscv/readme.md :
Note that if you want to debug FPU code via the openocd_riscv.vexriscv target, you need to use the GDB from :
https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6.tar.gz
More recent versions of gdb will not detect the FPU. Also, the openocd_riscv.vexriscv can't read CSR/FPU registers, so to have visibility on the floating points values, you need to compile your code in -O0, which will force values to be stored in memory (and so, be visible)