Nuclei-Software / nuclei-sdk

Nuclei RISC-V Software Development Kit
https://doc.nucleisys.com/nuclei_sdk
Apache License 2.0
117 stars 50 forks source link

How to use Clang/llvm compile the SDK? #49

Closed sunch20 closed 10 months ago

sunch20 commented 1 year ago

The SDK uses riscv-nuclei-elf-gcc to compile by default. If I want to compile with Clang, what needs to be modified for the Makefile?

fanghuaqi commented 1 year ago

Hi @sunch20 , currently only gcc is supported, if you need to support other toolchain, you need to modify Build folder, and SoC/xxx/build.mk, and maybe linker script file for each soc is also need to be updated.

sunch20 commented 1 year ago

Okay, thanks for your advice. I have one more question though.Besides using riscv-nuclei-elf-gcc to compile the SDK, can I use riscv-none-embed-gcc to compile?

fanghuaqi commented 1 year ago

You can take a try, but you might need to change Makefile.core to remove all the tune options, which is included only in riscv nuclei gcc.

fanghuaqi commented 1 year ago

Our toolchain source code is released in https://github.com/riscv-mcu/riscv-gnu-toolchain

fanghuaqi commented 11 months ago

If you want to take a try with llvm toolchain now, you can try this #53