Hi Nitish, The latest release of gem5 supports binaries compiled with this commit of riscv-tools <https://github.com/riscv/riscv-tools/tree/cd78e37f72cfc2a452a0c11744586084fbae1dcd>. There is a patch that adds support for the compressed ISA, #3860 <https://gem5-review.googlesource.com/c/3860/> (you will need to apply patch #3800 <https://gem5-review.googlesource.com/c/3800/> first, though), that adds support for a more recent commit <https://github.com/riscv/riscv-tools/tree/88dd92a8000aa408c047367e424b8829d0872740>. If nothing major has changed since then, the latest version should also work.
-Alec On Sat, Jul 8, 2017 at 10:37 AM, Nitish Srivastava <nk...@cornell.edu> wrote: > Hi Gem5 users, > > Can someone tell which commit point and branch in the riscv-tools repo ( > https://github.com/riscv/riscv-tools ) was used for the development of > RISCV in gem5? I was trying to run a simple hello world program compiled > with the latest version of the compiler ( commit point 7b1680 in > riscv-tools trepo ): > > 1 #include <iostream> > 2 > 3 int main( int argc, char* argv[] ) > 4 { > 5 std::cout << "Hello World, RISC-V!" << std::endl; > 6 return 0; > 7 } > > and compiling it and running it on gem5 gives error: > > % riscv64-unknown-elf-g++ hello.c -o hello > % spike pk hello > Hello World, RISC-V! > % cd gem5 > % ./build/RISCV/gem5.opt ./configs/example/se.py -c hello > > gives the following error: > > warn: DRAM device capacity (8192 Mbytes) does not match the address range > assigned (512 Mbytes) > warn: Unknown operating system; assuming Linux.0: system.remote_gdb.listener: > listening for remote gdb #0 on port 7000 > **** REAL SIMULATION **** > info: Entering event queue @ 0. Starting simulation...*panic: Unknown > instruction 0x41975985 at pc 0x000000000001036e* > Memory Usage: 757624 KBytes > Program aborted at tick 0 > > Seeing the object-dump for hello at pc 1036e shows: > > *000000000001036e <_start>:* > * 1036e: 000a4197 auipc gp,0xa4* > 10372: 73a18193 addi gp,gp,1850 # b4aa8 > <__global_pointer$> > 10376: 000a4517 auipc a0,0xa4 > 1037a: 19250513 addi a0,a0,402 # b4508 <_edata> > > Thanks, > > Nitish > > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users