bigmagic123 / d1-nezha-baremeta

riscv64 d1-nezha baremeta(Allwinner D1 riscv chip)
Apache License 2.0
74 stars 13 forks source link

Error when building src/3.uart #4

Open leanrdchen00918 opened 2 years ago

leanrdchen00918 commented 2 years ago

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
bigmagic123 commented 2 years ago

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