You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried this nice project in a unix environment.
It compiles but I had to use additional compilation flags:
-std=c++11
-D_GLIBCXX_USE_CXX11_ABI=0
Now the link error:
g++ -O2 -L*** -L./lib -L../../isa_sim obj/riscv_tcm_top_rtl.o obj/main.o -o build/test.x -lsystemc -lisa_sim -lsyscverilated -lelf -lbfd
obj/main.o: In function testbench::process()': main.cpp:(.text._ZN9testbench7processEv[_ZN9testbench7processEv]+0x41): undefined reference to cosim::attach_cpu(std::string, cosim_cpu_api*)'
main.cpp:(.text._ZN9testbench7processEv[_ZN9testbench7processEv]+0x8a): undefined reference to cosim::attach_mem(std::string, cosim_mem_api*, unsigned int, unsigned int)' ld: build/test.x: hidden symbol bfd_check_format_matches' in /usr/lib64/libbfd.a(format.o) is referenced by DSO
ld: final link failed: Bad value
Looking inside the content of isa_sim library, it seems to be there though:
0000000000009e60 T cosim::attach_cpu(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, cosim_cpu_api*)
0000000000009f30 T cosim::attach_mem(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, cosim_mem_api*, unsigned int, unsigned int)
The text was updated successfully, but these errors were encountered:
Hi,
i have met the same proplem. you can try this :
cd ../../isa_sim
make clean // --- to clear the *.o file under the obj/riscv-sim path
make
cd ../top_tcm_axi/tb
make
Hi,
I tried this nice project in a unix environment.
It compiles but I had to use additional compilation flags:
-std=c++11
-D_GLIBCXX_USE_CXX11_ABI=0
Now the link error:
g++ -O2 -L*** -L./lib -L../../isa_sim obj/riscv_tcm_top_rtl.o obj/main.o -o build/test.x -lsystemc -lisa_sim -lsyscverilated -lelf -lbfd
obj/main.o: In function
testbench::process()': main.cpp:(.text._ZN9testbench7processEv[_ZN9testbench7processEv]+0x41): undefined reference to
cosim::attach_cpu(std::string, cosim_cpu_api*)'main.cpp:(.text._ZN9testbench7processEv[_ZN9testbench7processEv]+0x8a): undefined reference to
cosim::attach_mem(std::string, cosim_mem_api*, unsigned int, unsigned int)' ld: build/test.x: hidden symbol
bfd_check_format_matches' in /usr/lib64/libbfd.a(format.o) is referenced by DSOld: final link failed: Bad value
Looking inside the content of isa_sim library, it seems to be there though:
0000000000009e60 T cosim::attach_cpu(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, cosim_cpu_api*)
0000000000009f30 T cosim::attach_mem(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, cosim_mem_api*, unsigned int, unsigned int)
The text was updated successfully, but these errors were encountered: