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
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 0x0001036e*
Memory Usage: 757624 KBytes
Program aborted at tick 0
Seeing the object-dump for hello at pc 1036e shows:
*0001036e <_start>:*
* 1036e: 000a4197auipc gp,0xa4*
10372: 73a18193addigp,gp,1850 # b4aa8
<__global_pointer$>
10376: 000a4517auipc a0,0xa4
1037a: 19250513addia0,a0,402 # b4508 <_edata>
Thanks,
Nitish
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users