seldridge / rocket-rocc-examples

Tests for example Rocket Custom Coprocessors
Other
69 stars 27 forks source link

Assertion `buf != MAP_FAILED' failed. #12

Closed femsub closed 6 years ago

femsub commented 6 years ago

After building a rocket-chip emulator with the RoCC examples baked in,i can't run the test"time emulator-freechips.rocketchip.system-RoccExampleConfig -c pk ./build/test-accumulator" and "emulator-freechips.rocketchip.system-RoccExampleConfig pk pk/examples-pk-accumulator"

the error show:

This emulator compiled with JTAG Remote Bitbang client. To enable, use +jtag_rbb_enable=1.
Listening on port 37782
emulator-freechips.rocketchip.system-RoccExampleConfig: ../fesvr/elfloader.cc:27: std::map<std::__cxx11::basic_string<char>, long unsigned int> load_elf(const char*, memif_t*, reg_t*): Assertion `buf != MAP_FAILED' failed.

real    0m0.983s
user    0m0.928s
sys 0m0.048s

but i can run "emulator-freechips.rocketchip.system-RoccExampleConfig bareMetal/examples-bareMetal-p-accumulator" and "emulator-freechips.rocketchip.system-RoccExampleConfig pk hello".The first show nothing,and the second show the right output

femsub commented 6 years ago

sorry,and i find the solution. Because i install the official pk in --prefix=$RISCV,and the install the rocc-pk in --prefix=$RISCV/riscv64-unknown-elf. I think when i run "emulator-freechips.rocketchip.system-RoccExampleConfig pk"it will find the official pk instal of the rocc-pk

According to

7

I run the command "emulator-freechips.rocketchip.system-RoccExampleConfig $RISCV/riscv64-unknown-elf/bin/pk" and it works well.