d1-nezha-baremeta
d1-nezha-baremeta copied to clipboard
Error when building src/3.uart
I've successfully built src/1.startup and run the Image on D1-nezha board. However, there is a problem when building 3.uart.
~/d1-nezha-baremeta/src/3.uart$ make all TOOLPREFIX=riscv64-unknown-elf-
riscv64-unknown-elf-gcc -Wall -O2 -fno-omit-frame-pointer -ggdb -march=rv64gcvxtheadc -mabi=lp64d -mtune=c906 -MD -mcmodel=medany -ffreestanding -fno-common -nostdlib -mno-relax -I. -I printf -fno-stack-protector -fno-pie -no-pie -c -o printf.o printf.c
cc1: error: unknown cpu 'c906' for '-mtune'
make: *** [<builtin>: printf.o] Error 1
I've successfully built src/1.startup and run the Image on D1-nezha board. However, there is a problem when building 3.uart.
~/d1-nezha-baremeta/src/3.uart$ make all TOOLPREFIX=riscv64-unknown-elf- riscv64-unknown-elf-gcc -Wall -O2 -fno-omit-frame-pointer -ggdb -march=rv64gcvxtheadc -mabi=lp64d -mtune=c906 -MD -mcmodel=medany -ffreestanding -fno-common -nostdlib -mno-relax -I. -I printf -fno-stack-protector -fno-pie -no-pie -c -o printf.o printf.c cc1: error: unknown cpu 'c906' for '-mtune' make: *** [<builtin>: printf.o] Error 1
you can download Xuantie-900-gcc-elf-newlib from https://occ.t-head.cn/community/download