riscv-pk icon indicating copy to clipboard operation
riscv-pk copied to clipboard

Spike pk doesn't work

Open hasver opened this issue 3 years ago • 4 comments

Hi all I installed pk and spike both in my RISCV_TOOLCHAIN path and according to the instructions provided. I tried to run spike pk hello on an arbitrary c file but it just stops and doesn't show anything for a while Is there any solution for that? Thanks

hasver avatar Feb 21 '22 14:02 hasver

Hi, @hasver I have the same problem like this(https://github.com/riscv-software-src/riscv-isa-sim/issues/1152). How did you resolve it?

tak-ka3 avatar Nov 27 '22 14:11 tak-ka3

It seems pk falls in bad_trap! running into the same problem

mhamdanx avatar Feb 23 '23 23:02 mhamdanx

I have the same question,that's terrible:(

adamsir32 avatar Apr 07 '23 08:04 adamsir32

I've run into the problem, the situation is weird. I compile and install pk like

../configure --prefix=$RISCV --host=riscv64-unknown-elf --with-arch=rv64gc_zifencei
make
make install

And I write a simple hello world program

#include <stdio.h>
int main(){
    printf("hello riscv!\n");
    return 0;
}

Compile the hello.c program with the following command and run

riscv64-unknown-elf-gcc -g -march=rv64gc_zifencei hello.c -o hello
spike --isa=rv64gc pk hello

The terminal show the following and then stuck

bbl loader

If I run debug mode with spike -d --isa=rv64gc pk hello and let it run The terminal eventually shows exception and stuck.

core   0: exception trap_instruction_page_fault, epc 0x00000000800019d0
core   0:           tval 0x00000000800019d0

However, if I remove the newline \n in printf() function. Recompile and run.

bbl loader
hello riscv!{my user name}:/tmp$

I have no idea why newline matters.

kaichsu avatar Jul 08 '24 04:07 kaichsu