From 3815ece6d6f3da08fdc994e8e52f632389ccb203 Mon Sep 17 00:00:00 2001 From: bernard Date: Mon, 13 Nov 2017 16:00:52 +0800 Subject: [PATCH] [BSP] Update X1000 config & SConstruct files. --- bsp/x1000/.config | 4 ++++ bsp/x1000/Kconfig | 10 ++++++++++ bsp/x1000/SConstruct | 6 ++++++ bsp/x1000/rtconfig.h | 4 ++++ bsp/x1000/rtconfig.py | 5 ----- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/bsp/x1000/.config b/bsp/x1000/.config index 3bed14e4b5..92ef160bf9 100644 --- a/bsp/x1000/.config +++ b/bsp/x1000/.config @@ -46,6 +46,8 @@ CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart" # CONFIG_RT_USING_MODULE is not set +CONFIG_ARCH_MIPS=y +CONFIG_ARCH_MIPS_XBURST=y # # RT-Thread Components @@ -203,6 +205,8 @@ CONFIG_RT_USING_POSIX=y # miscellaneous packages # # CONFIG_PKG_USING_HELLO is not set +CONFIG_BOARD_X1000_REALBOARD=y +# CONFIG_RT_USING_HARD_FLOAT is not set # CONFIG_BOARD_PHOENIX is not set # CONFIG_BOARD_HALLEY2 is not set # CONFIG_BOARD_HALLEY2_FIR is not set diff --git a/bsp/x1000/Kconfig b/bsp/x1000/Kconfig index 3ab47dd30d..a7a82890df 100644 --- a/bsp/x1000/Kconfig +++ b/bsp/x1000/Kconfig @@ -20,4 +20,14 @@ config $PKGS_DIR source "$RTT_DIR/KConfig" source "$PKGS_DIR/KConfig" + +config BOARD_X1000_REALBOARD + bool + select ARCH_MIPS_XBURST + default y + +config RT_USING_HARD_FLOAT + bool "Enable Hardware Float Unit" + default y + source "$BSP_DIR/drivers/Kconfig" diff --git a/bsp/x1000/SConstruct b/bsp/x1000/SConstruct index 4c657d7bb8..28ec443854 100644 --- a/bsp/x1000/SConstruct +++ b/bsp/x1000/SConstruct @@ -29,5 +29,11 @@ Export('rtconfig') # prepare building environment objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) +if not GetDepend('RT_USING_HARD_FLOAT'): + env['CCFLAGS'] = env['CCFLAGS'].replace('-mhard-float', '-msoft-float') + env['ASFLAGS'] = env['ASFLAGS'].replace('-mhard-float', '-msoft-float') + env['CXXFLAGS'] = env['CXXFLAGS'].replace('-mhard-float', '-msoft-float') + env['LINKFLAGS'] = env['LINKFLAGS'].replace('-mhard-float', '-msoft-float') + # make a building DoBuilding(TARGET, objs) diff --git a/bsp/x1000/rtconfig.h b/bsp/x1000/rtconfig.h index 93d7bb89b3..276403ceb3 100644 --- a/bsp/x1000/rtconfig.h +++ b/bsp/x1000/rtconfig.h @@ -43,6 +43,8 @@ #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart" /* RT_USING_MODULE is not set */ +#define ARCH_MIPS +#define ARCH_MIPS_XBURST /* RT-Thread Components */ @@ -176,6 +178,8 @@ /* miscellaneous packages */ /* PKG_USING_HELLO is not set */ +#define BOARD_X1000_REALBOARD +/* RT_USING_HARD_FLOAT is not set */ /* BOARD_PHOENIX is not set */ /* BOARD_HALLEY2 is not set */ /* BOARD_HALLEY2_FIR is not set */ diff --git a/bsp/x1000/rtconfig.py b/bsp/x1000/rtconfig.py index 845de2bee5..9214d4ef12 100644 --- a/bsp/x1000/rtconfig.py +++ b/bsp/x1000/rtconfig.py @@ -5,11 +5,6 @@ ARCH ='mips' CPU ='x1000' CROSS_TOOL ='gcc' -if os.getenv('RTT_ROOT'): - RTT_ROOT = os.getenv('RTT_ROOT') -else: - RTT_ROOT = r'E:\rt-thread' - if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC')