sergeykhbr/riscv_vhdl

Error compiling debugger

Closed this issue · 1 comments

First of all, thanks for all your work and for sharing it!

I have the following error relate to _cpu_sysc_plugin when I try compiling the debugger:

#####################################################################
#####################################################################
../src/cpu_sysc_plugin/rtl_wrapper.cpp: In member function ‘void debugger::RtlWrapper::comb()’:
../src/cpu_sysc_plugin/rtl_wrapper.cpp:154:27: error: switch condition has type bool [-Werror=switch-bool]
switch (r.state.read()) {
^
cc1plus: all warnings being treated as errors
make_cpu_sysc_plugin:110: recipe for target '../linuxbuild/obj/plugins/cpu_sysc/rtl_wrapper.o' failed
make[1]: *** [../linuxbuild/obj/plugins/cpu_sysc/rtl_wrapper.o] Error 1
mkdir: created directory './../linuxbuild/obj/plugins/gui'
####################################################################
####################################################################

I can skip this error removing '-Werror' in the Makefile 'make_cpu_sysc_plugin' but when I run './_run_functional_sim.sh', I can't see in console 'Hello world' when I load the program helloworld(compiled using with your elf2raw) as show here:

error_debbuger_riscv

I'd like to add that I can load helloworld.hex in the ML605, changing CFG_SIM_FWIMAGE_HEX in config_v6.vhd and everything works perfectly, I can see 'Hello world' in the serial console on my pc. The problem is with the simulator/debugger.

Regards,
Frank.

Dear Frank,

thank you for such detailed description. Problems were fixed but take into account that BootROM image bootrom_tests.hex cannot be used with the user application (helloworld or whatever) because it doesn't jump into application entry point defined as SRAM base address (0x10000000). It should be used only to check CPU running directly from ROM.

I've changed the configuration functional_sim_gui.json and defined boot/bootimage.hex as the default image capable to properly execute 'loadelf helloworld' command.