Errors encountered when compiling the toolchain
#1
hello,

When I compiled the toolchain according to the steps in https://github.com/pulp-platform/pulp-ri...-toolchain, I encountered the following error:
/tmp/ccIifWI0.s: Assembler messages:
/tmp/ccIifWI0.s:4963: Error: unrecognized opcode `lwu a1,.LANCHOR0 2'
/tmp/ccIifWI0.s:5179: Error: unrecognized opcode `lwu a5,.LANCHOR0'
/tmp/ccIifWI0.s:5258: Error: unrecognized opcode `lwu a4,.LANCHOR0 2'
/tmp/ccIifWI0.s:5905: Error: unrecognized opcode `lwu a2,.LANCHOR0 2'
/tmp/ccIifWI0.s:5997: Error: unrecognized opcode `lwu a3,.LANCHOR0 2'
/home/lee/Downloads/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
Make[2]: *** [unwind-dw2.o] Error 1
Make[2]: Leaving directory '/home/lee/Downloads/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1/riscv32-unknown-linux-gnu/libgcc'
Makefile:11207: recipe for target 'all-target-libgcc' failed
Make[1]: *** [all-target-libgcc] Error 2
Make[1]: Leaving directory '/home/lee/Downloads/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1'
Makefile:150: recipe for target 'stamps/build-gcc-linux-stage1' failed
Make: *** [stamps/build-gcc-linux-stage1] Error 2

Since I am going to install the cross complier to /home/lee/Downloads/complier, so I run the commands below :
1./configure --prefix=/home/lee/Downloads/complier --with-arch=rv32g --with-abi=ilp32d
2.make linux


 Is the install path chosen like this? Why is there such an error? How can I resolve these errors?
Reply
#2
I don't think your meant to use the linux target with rv32g. We don't run linux on platforms using RI5CY but rather a custom operating system. This means you need to compile it like this
Code:
./configure --prefix=/opt/riscv --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
make


I will talk with our software guy to update the documentation.
Reply
#3
(04-17-2019, 03:08 PM)bluewww Wrote: I don't think your meant to use the linux target with rv32g. We don't run linux on platforms using RI5CY but rather a custom operating system. This means you need to compile it like this
Code:
./configure --prefix=/opt/riscv --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
make


I will talk with our software guy to update the documentation.

hello bluewww,

Thank you very much for your reply. I think I understand what you mean.  I understood it wrong before. Also want to ask, is there any difference between "Installation (Pulp)" and "Installation (Newlib)" in https://github.com/pulp-platform/pulp-ri...-toolchain? According to the description in the readme, "Installation (Pulp)" should be the multilib support to build the libraries for the various cores (riscy, zeroriscy and so on).
So which core does Installation (Newlib) support?

"
Installation (Pulp)
To build the Newlib cross-compiler for all pulp variants, pick an install path. If you choose, say, /opt/riscv, then add /opt/riscv/bin to your PATH now. Then, simply run the following command:

./configure --prefix=/opt/riscv --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
Make
This will use the multilib support to build the libraries for the various cores (riscy, zeroriscy and so on). The right libraries will be selected depending on which compiler options you use.

Installation (Newlib)
To build the Newlib cross-compiler, pick an install path. If you choose, say, /opt/riscv, then add /opt/riscv/bin to your PATH now. Then, simply run the following command:

./configure --prefix=/opt/riscv
Make
You should now be able to use riscv-gcc and its cousins.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)