Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RiscV rv-sys rv8 potential bug ( TRAP :breakpoint pc:0x112c badaddr:0x112c) #45

Open
apoorvagnihotri opened this issue Apr 2, 2018 · 0 comments

Comments

@apoorvagnihotri
Copy link

I am working on instruction profile (frequency of instruction) of typical programs and required your program to simulate and make histograms of dynamic instructions that are run on a processor using RiscV executable file. I successfully installed rv8 and riscv-tools but was not able to run a typical hello world program and got the following error,

TRAP :breakpoint pc:0x112c badaddr:0x112c

when I tried running using the command, rv-sys --instruction-usage-histogram helloworld.
I tried to remove printf and scanf in the possibility of rv-sys not supporting system calls but got the same error. I also tried to include -static option to the cross-compiler but with no success.
I tried to get the total instruction count of helloworld using spike pk -s and was able to run the program and get the total dynamic instruction counts. (helloworld seems to be cross-compiled correctly).
I compiled using the tool, riscv64-unknown-elf-gcc

Contents of the file:

#include <stdio.h>

int main(void)
{
printf("Hello Riscv Word!");
return 0;
}

Details:
Ubuntu 16.04 LTS 64-bit
i7-6700 HQ
16 GB DDR4 RAM
UEFI System
GPT Partitioning
Asus ROG GL552VW-CN230T

PS.

I even tried to use the tool rv-sim --instruction-usage-histogram but was not able to get the required histograms. I got only the output specified in the program hello.c.
I tried to run the testing program provided bbl by using the tool rv-sys, but was not able to run it (Terminal gave no output and seemed to be stuck (not frozen)).
I tried on a virtual and a native host machine both, getting the same result.

@apoorvagnihotri apoorvagnihotri changed the title RiscV rv-sys rv8 potential bug RiscV rv-sys rv8 potential bug ( TRAP :breakpoint pc:0x112c badaddr:0x112c) Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant