mirror of https://github.com/RT-Thread/rt-thread
[BSP][K230] Add soft-fpu option for k230
This commit is contained in:
parent
ad2de6e477
commit
9a8dec35c1
|
@ -10,14 +10,14 @@ source "$RTT_DIR/Kconfig"
|
|||
source "$PKGS_DIR/Kconfig"
|
||||
rsource "board/Kconfig"
|
||||
|
||||
config BOARD_fpgac908
|
||||
config BOARD_C908
|
||||
bool
|
||||
select ARCH_RISCV64
|
||||
select RT_USING_COMPONENTS_INIT
|
||||
select RT_USING_USER_MAIN
|
||||
select RT_USING_CACHE
|
||||
select ARCH_MM_MMU
|
||||
select ARCH_RISCV_FPU_D
|
||||
select ARCH_RISCV_FPU
|
||||
select ARCH_REMAP_KERNEL if RT_USING_SMART
|
||||
default y
|
||||
|
||||
|
@ -38,3 +38,17 @@ choice BSP_ROOTFS_TYPE
|
|||
select RT_USING_DFS_CROMFS
|
||||
select PKG_USING_ZLIB
|
||||
endchoice
|
||||
|
||||
choice BSP_RISCV_USING_FPU
|
||||
prompt "FPU precision"
|
||||
default BSP_RISCV_FPU_D
|
||||
|
||||
config BSP_RISCV_FPU_SOFT
|
||||
bool "Software floating-point"
|
||||
select ARCH_RISCV_FPU
|
||||
|
||||
config BSP_RISCV_FPU_D
|
||||
bool "Double-precision floating-point with Vector"
|
||||
select ARCH_RISCV_FPU_D
|
||||
select ARCH_RISCV_VECTOR
|
||||
endchoice
|
||||
|
|
|
@ -8,7 +8,6 @@ from rtconfig import RTT_ROOT
|
|||
import sys
|
||||
|
||||
def generate_ldscript(input, output):
|
||||
|
||||
if not os.path.exists(input):
|
||||
print('Error: file', input, 'not found')
|
||||
return
|
||||
|
@ -30,12 +29,20 @@ def generate_ldscript(input, output):
|
|||
|
||||
print(output, 'is generated from', input)
|
||||
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
|
||||
|
||||
# apply soft-FPU config
|
||||
options = LocalOptions("rtconfig.h")
|
||||
soft_fpu = GetLocalDepend(options, 'BSP_RISCV_FPU_SOFT')
|
||||
if soft_fpu:
|
||||
rtconfig.DEVICE = rtconfig.DEVICE.replace('-march=rv64imafdcv -mabi=lp64d', '-march=rv64imafdc -mabi=lp64')
|
||||
rtconfig.CFLAGS = rtconfig.CFLAGS.replace('-march=rv64imafdcv -mabi=lp64d', '-march=rv64imafdc -mabi=lp64')
|
||||
rtconfig.LFLAGS = rtconfig.LFLAGS.replace('-march=rv64imafdcv -mabi=lp64d', '-march=rv64imafdc -mabi=lp64')
|
||||
rtconfig.AFLAGS = rtconfig.AFLAGS.replace('-march=rv64imafdcv -mabi=lp64d', '-march=rv64imafdc -mabi=lp64')
|
||||
|
||||
DefaultEnvironment(tools=[])
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
|
|
Loading…
Reference in New Issue