pulp-platform / ri5cy_gnu_toolchain

22 stars 23 forks source link

Using riscv64-unknown-elf- #26

Open samrd1994 opened 5 years ago

samrd1994 commented 5 years ago

Hi,

I built the toolching using make but used the latest subversion of the riscv/riscv-gnu-toolchain repo. This resulted in the riscv64-unknown-elf- being built but the option IMXpulpv2 is giving the following error: cc1: error: -march=IMXpulpv2: ISA string must begin with rv32 or rv64 cc1: error: requested ABI requires -march to subsume the 'D' extension cc1: error: ABI requires -march=rv64

If i use rv64IMXpulpv2 instead it still gives an error: cc1: error: -march=rv64IMXpulpv2: invalid ISA string cc1: error: requested ABI requires -march to subsume the 'D' extension

Is there any way to use the IMXpulpv2 with the riscv64-unknown-elf- ?

Thanks

haugoug commented 5 years ago

you need to use rv32 not rv64

samrd1994 commented 5 years ago

hi,

I tried with rv32 and it still gave the same error

cc1: error: -march=rv32IMXpulpv2: invalid ISA string cc1: error: requested ABI requires -march to subsume the 'D' extension cc1: error: ABI requires -march=rv64 make: *** [../../wlan/src/mem_mgmt/mem_mgmt.o] Error 1

I also tried using rv32pulpv2 but it again gave the same error cc1: error: -march=rv32pulpv2: invalid ISA string cc1: error: requested ABI requires -march to subsume the 'D' extension cc1: error: ABI requires -march=rv64 make: *** [../../wlan/src/mem_mgmt/mem_mgmt.o] Error 1

Thanks

haugoug commented 5 years ago

Try RV32IMXpulpv2

samrd1994 commented 5 years ago

Still giving an error: cc1: error: -march=RV32IMXpulpv2: ISA string must begin with rv32 or rv64 cc1: error: requested ABI requires -march to subsume the 'D' extension cc1: error: ABI requires -march=rv64 make: *** [../../wlan/src/mem_mgmt/mem_mgmt.o] Error 1

haugoug commented 5 years ago

what do you mean by "I built the toolching using make but used the latest subversion of the riscv/riscv-gnu-toolchain repo." ?

samrd1994 commented 5 years ago

in the makefile i edited this line : cd toolchain && git checkout d038d596dc1d8e47ace22ab742cd40c2f22d659e to cd toolchain && git submodule update --init --recursive

So it used the current subversion instead of the old one

Thanks

haugoug commented 5 years ago

ok that's why you get these errors, you cannot update the upstream toolchain. If you want a more recent toolchain, you can switch to this one: https://github.com/pulp-platform/pulp-riscv-gnu-toolchain

samrd1994 commented 5 years ago

I built the new one (https://github.com/pulp-platform/pulp-riscv-gnu-toolchain) while configuring i switched the following command to get riscv64-unknown-elf- changed: ./configure --prefix=/opt/riscv --with-arch=rv32g --with-abi=ilp32d

to: ./configure --prefix=/opt/riscv --with-arch=rv64g --with-abi=ilp32d

Then i used the option rv64imcxpulpv2 but i got the following error:

cc1: error: ABI requires -march=rv64 make: *** [../../wlan/src/mem_mgmt/mem_mgmt.o] Error 1

i tried using rv32imcxpulpv2 , imcxpulpv2, but both of them resulted in the same error as above

Thanks

haugoug commented 5 years ago

No idea what this could be we just use this toolchain for 32bits cores.

stefanct commented 5 years ago

@samrd1994 why do you want to use 64b arch? Telling the compiler to build with a 64b arch but 32b ABI does not make a lot of sense :)

Nagatejapallapu commented 2 years ago

uie24011@ozd1161u:~/Desktop/SDK/pulp-sdk/applications/MobileNetV1$ make clean all run platform=gvsoc CORE=2 RM /home/uie24011/Desktop/SDK/pulp-sdk/applications/MobileNetV1/BUILD/PULP/GCC_RISCV/ CC DORY_network/src/dory.c cc1: error: -march=rv32imcxgap9: ISA strings must begin with I, RV32I, or RV64I /home/uie24011/Desktop/SDK/pulp-sdk/rtos/pulpos/common/rules/pulpos/default_rules.mk:232: recipe for target '/home/uie24011/Desktop/SDK/pulp-sdk/applications/MobileNetV1/BUILD/PULP/GCC_RISCV//main/DORY_network/src/dory.o' failed make: *** [/home/uie24011/Desktop/SDK/pulp-sdk/applications/MobileNetV1/BUILD/PULP/GCC_RISCV//main/DORY_network/src/dory.o] Error 1