Giter Site home page Giter Site logo

spike pk hello about riscv-pk HOT 7 OPEN

riscv-software-src avatar riscv-software-src commented on July 26, 2024
spike pk hello

from riscv-pk.

Comments (7)

chyhsueh avatar chyhsueh commented on July 26, 2024 1

same problem. also cannot build riscv-pk with errors:
gcc: error: unrecognized argument in option ‘-mcmodel=medany’

when changed to 'medium' or 'kernel' getting an error:
../pk/file.c: Assembler messages:
../pk/file.c:28: Error: no such instruction: `fence'

Hi, buddies:

It seems the symptoms found in case the expected toolchain with prefix "riscv64-unknown-elf-" cannot be found in the host system. Currently the riscv-gnu-toolchain must be built/ready before the riscv-tools could be built. Please grab the source code of riscv-gnu-toolchain from the following repo:

https://github.com/riscv/riscv-gnu-toolchain

The expected toolchain will be built by:

./configure --prefix=$RISCV
make

Please following the section "Installation (Newlib)" in Readme.md. Once the riscv-gnu-toolchain was successfully setup in $RISCV and the directory $RISCV\bin was set in $PATH, the riscv-tools can be successfully built then.

from riscv-pk.

 avatar commented on July 26, 2024

same problem. also cannot build riscv-pk with errors:
gcc: error: unrecognized argument in option ‘-mcmodel=medany’

when changed to 'medium' or 'kernel' getting an error:
../pk/file.c: Assembler messages:
../pk/file.c:28: Error: no such instruction: `fence'

from riscv-pk.

palmer-dabbelt avatar palmer-dabbelt commented on July 26, 2024

This sounds very much like

riscv-collab/riscv-gnu-toolchain#174

Can you check and see if my commit screwed it up? It certainly smells like I screwed something up, because I actually have another open pull request that claims to do exactly the same thing, but didn't get merged. Maybe whatever bumps Andrew claims were necessary in that PR just landed on priv-1.9 and didn't end up on master?

riscv-software-src/riscv-tools#36

from riscv-pk.

palmer-dabbelt avatar palmer-dabbelt commented on July 26, 2024

@susi655 If you look at the PR I mentioned, it has a few commits that were necessary to make the 32-bit stuff actually work, but those commits were only on the priv-1.9 branches. I've gone ahead and backported them to master, so everything should build now. You can see everything on this branch

https://github.com/riscv/riscv-tools/tree/tests-xlen

Unfortunately, my "Hello, World" test case doesn't print anything, so something else seems to be wrong somewhere with the 32-bit stuff. Since it's so out of date as compared to the priv-1.9 stuff (which is where all the real work is going), I'm probably not going to have time to look at it for a while.

from riscv-pk.

Qiyamah avatar Qiyamah commented on July 26, 2024

is anybody looking into this?
Thanks

from riscv-pk.

Qiyamah avatar Qiyamah commented on July 26, 2024
 -fno-PIE -mabi=lp64d -march=rv64imafdc   -DBBL_PAYLOAD=\"bbl_payload\" -DBBL_LOGO_FILE=\"bbl_logo_file\" -I. -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/bbl -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/softfloat -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/dummy_payload -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/machine -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/util -c /home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk/elf.c
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc -MMD -MP -Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE -mabi=lp64d -march=rv64imafdc   -DBBL_PAYLOAD=\"bbl_payload\" -DBBL_LOGO_FILE=\"bbl_logo_file\" -I. -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/bbl -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/softfloat -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/dummy_payload -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/machine -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/util -c /home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk/console.c
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc -MMD -MP -Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE -mabi=lp64d -march=rv64imafdc   -DBBL_PAYLOAD=\"bbl_payload\" -DBBL_LOGO_FILE=\"bbl_logo_file\" -I. -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/bbl -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/softfloat -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/dummy_payload -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/machine -I/home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/util -c /home/rra/Projects/RISCV/freedom/freedom-u-sdk/riscv-pk/pk/mmap.c
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
Makefile:319: recipe for target 'file.o' failed
make[1]: *** [file.o] Error 1
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
make[1]: *** Waiting for unfinished jobs....
Makefile:319: recipe for target 'syscall.o' failed
make[1]: *** [syscall.o] Error 1
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
Makefile:319: recipe for target 'handlers.o' failed
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
make[1]: *** [handlers.o] Error 1
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
Makefile:319: recipe for target 'frontend.o' failed
make[1]: *** [frontend.o] Error 1
gcc: error: unrecognized argument in option ‘-mcmodel=medany’
Makefile:319: recipe for target 'elf.o' failed
gcc: note: valid arguments to ‘-mcmodel=’ are: 32 kernel large medium small; did you mean ‘medium’?
make[1]: *** [elf.o] Error 1
gcc: error: unrecognized argument in option ‘-mabi=lp64d’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
Makefile:319: recipe for target 'console.o' failed
make[1]: *** [console.o] Error 1
Makefile:319: recipe for target 'mmap.o' failed
make[1]: *** [mmap.o] Error 1
make[1]: Leaving directory '/home/rra/Projects/RISCV/freedom/freedom-u-sdk/work/riscv-pk'
Makefile:175: recipe for target '/home/rra/Projects/RISCV/freedom/freedom-u-sdk/work/riscv-pk/bbl' failed
make: *** [/home/rra/Projects/RISCV/freedom/freedom-u-sdk/work/riscv-pk/bbl] Error 2

from riscv-pk.

volglizolic avatar volglizolic commented on July 26, 2024

in fedora install development tools and development libraries
sudo dnf groupinstall "Development Tools" "Development Libraries"

Debian based and ect have something similar

from riscv-pk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.