From 732382c676622c1d026fd8adcf09012f739f6814 Mon Sep 17 00:00:00 2001 From: tangweikang Date: Sat, 21 Nov 2020 13:47:58 +0800 Subject: [PATCH] [K210] update compile parameters and startup_gcc.S --- bsp/k210/rtconfig.py | 2 +- libcpu/risc-v/k210/startup_gcc.S | 64 ++++++++++++++++---------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/bsp/k210/rtconfig.py b/bsp/k210/rtconfig.py index b9258cd374..0f336d545e 100755 --- a/bsp/k210/rtconfig.py +++ b/bsp/k210/rtconfig.py @@ -38,7 +38,7 @@ if PLATFORM == 'gcc': OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' - DEVICE = ' -mcmodel=medany -march=rv64imafdc -mabi=lp64d' + DEVICE = ' -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant' CFLAGS = DEVICE + ' -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' diff --git a/libcpu/risc-v/k210/startup_gcc.S b/libcpu/risc-v/k210/startup_gcc.S index f5c0d8fa94..cc7126e8ab 100644 --- a/libcpu/risc-v/k210/startup_gcc.S +++ b/libcpu/risc-v/k210/startup_gcc.S @@ -67,38 +67,38 @@ _start: csrs mstatus, t0 fssr x0 - fmv.d.x f0, x0 - fmv.d.x f1, x0 - fmv.d.x f2, x0 - fmv.d.x f3, x0 - fmv.d.x f4, x0 - fmv.d.x f5, x0 - fmv.d.x f6, x0 - fmv.d.x f7, x0 - fmv.d.x f8, x0 - fmv.d.x f9, x0 - fmv.d.x f10,x0 - fmv.d.x f11,x0 - fmv.d.x f12,x0 - fmv.d.x f13,x0 - fmv.d.x f14,x0 - fmv.d.x f15,x0 - fmv.d.x f16,x0 - fmv.d.x f17,x0 - fmv.d.x f18,x0 - fmv.d.x f19,x0 - fmv.d.x f20,x0 - fmv.d.x f21,x0 - fmv.d.x f22,x0 - fmv.d.x f23,x0 - fmv.d.x f24,x0 - fmv.d.x f25,x0 - fmv.d.x f26,x0 - fmv.d.x f27,x0 - fmv.d.x f28,x0 - fmv.d.x f29,x0 - fmv.d.x f30,x0 - fmv.d.x f31,x0 + fmv.w.x f0, x0 + fmv.w.x f1, x0 + fmv.w.x f2, x0 + fmv.w.x f3, x0 + fmv.w.x f4, x0 + fmv.w.x f5, x0 + fmv.w.x f6, x0 + fmv.w.x f7, x0 + fmv.w.x f8, x0 + fmv.w.x f9, x0 + fmv.w.x f10,x0 + fmv.w.x f11,x0 + fmv.w.x f12,x0 + fmv.w.x f13,x0 + fmv.w.x f14,x0 + fmv.w.x f15,x0 + fmv.w.x f16,x0 + fmv.w.x f17,x0 + fmv.w.x f18,x0 + fmv.w.x f19,x0 + fmv.w.x f20,x0 + fmv.w.x f21,x0 + fmv.w.x f22,x0 + fmv.w.x f23,x0 + fmv.w.x f24,x0 + fmv.w.x f25,x0 + fmv.w.x f26,x0 + fmv.w.x f27,x0 + fmv.w.x f28,x0 + fmv.w.x f29,x0 + fmv.w.x f30,x0 + fmv.w.x f31,x0 .option push .option norelax