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

How to Compile C code for Hwacha Compiler #1470

Open
2 tasks done
ashu-bitspilani opened this issue May 10, 2023 · 0 comments
Open
2 tasks done

How to Compile C code for Hwacha Compiler #1470

ashu-bitspilani opened this issue May 10, 2023 · 0 comments

Comments

@ashu-bitspilani
Copy link

Background Work

Feature Description

I tried to run C code on hawacha compiler.
First I installed chipyard repo from: https://chipyard.readthedocs.io/en/stable/Chipyard-Basics/Initial-Repo-Setup.html
and also ran ./build-setup.sh esp-tools from the script.

I compiled my C code by giving -march=rv64gcxhwacha to riscv64-unknown-linux-gcc. and my code got compiled . But when I am trying to execute the file it is showing me illegeal instruction.

The command I gave to compile my C code is riscv64-unknown-linux-gcc -march=rv64gcxhwacha example.c.
After this the a.out executable is generated. But couldnot execute this.

What should I do to compile my C code on Hawacha and then execute on RISC V.

Motivating Example

What should I do to compile my C code on Hawacha and then execute on RISC V.

I am trying to compile the accum.c file from https://github.com/ucb-bar/chipyard/blob/main/tests/accum.c
to test of hwacha compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant