RISC-V Compiler


(Blueburn) #1

@jimw

Since you already built the cross compiler, you should be using it to try to compile your firmware code.

Okay…so can you tell me what steps I have to follow to use the cross-compiler in place of default gcc to compile my firmware code…(say my C code is in test.c)
Bcz I just can’t use the command “gcc test.c”…When I tried that, I was under the impression that it would automatically use the cross-compiler …But it turned out that it was using the default built-in GCC.So can u help me how to use the cross-compiler?


#2

Hi,

I have limit knowledge on this but you could try the following:
Instead of using “gcc test.c” try using the “riscv**-unknown-elf-gcc test.c” where ** is either 64 or 32 depending on which you’ve built.