[bsp]update SConstruct&Kconfig&rtconfig.py

This commit is contained in:
tangyuxin 2017-11-13 18:08:41 +08:00
parent f878c6a59f
commit 029feac5d0
5 changed files with 61 additions and 57 deletions

View File

@ -7,15 +7,18 @@
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=8
CONFIG_RT_ALIGN_SIZE=4
CONFIG_RT_ALIGN_SIZE=8
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32=y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
CONFIG_RT_THREAD_PRIORITY_MAX=32
CONFIG_RT_TICK_PER_SECOND=100
CONFIG_RT_TICK_PER_SECOND=1000
CONFIG_RT_DEBUG=y
CONFIG_RT_USING_OVERFLOW_CHECK=y
CONFIG_RT_DEBUG_INIT=0
CONFIG_RT_DEBUG_THREAD=0
CONFIG_RT_USING_HOOK=y
CONFIG_IDLE_THREAD_STACK_SIZE=256
CONFIG_IDLE_THREAD_STACK_SIZE=512
# CONFIG_RT_USING_TIMER_SOFT is not set
#
@ -33,9 +36,10 @@ CONFIG_RT_USING_MESSAGEQUEUE=y
#
CONFIG_RT_USING_MEMPOOL=y
# CONFIG_RT_USING_MEMHEAP is not set
CONFIG_RT_USING_HEAP=y
# CONFIG_RT_USING_NOHEAP is not set
CONFIG_RT_USING_SMALL_MEM=y
# CONFIG_RT_USING_SLAB is not set
CONFIG_RT_USING_HEAP=y
#
# Kernel Device Object
@ -44,7 +48,7 @@ CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="uart"
CONFIG_RT_CONSOLE_DEVICE_NAME="uart2"
# CONFIG_RT_USING_MODULE is not set
CONFIG_ARCH_MIPS=y
CONFIG_ARCH_MIPS_XBURST=y
@ -80,7 +84,7 @@ CONFIG_FINSH_USING_MSH_DEFAULT=y
#
CONFIG_RT_USING_DFS=y
CONFIG_DFS_USING_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX=2
CONFIG_DFS_FILESYSTEMS_MAX=4
CONFIG_DFS_FD_MAX=4
CONFIG_RT_USING_DFS_ELMFAT=y
@ -89,14 +93,14 @@ CONFIG_RT_USING_DFS_ELMFAT=y
#
CONFIG_RT_DFS_ELM_CODE_PAGE=437
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
CONFIG_RT_DFS_ELM_USE_LFN_0=y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_3 is not set
CONFIG_RT_DFS_ELM_USE_LFN=0
CONFIG_RT_DFS_ELM_USE_LFN_3=y
CONFIG_RT_DFS_ELM_USE_LFN=3
CONFIG_RT_DFS_ELM_MAX_LFN=255
CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
CONFIG_RT_DFS_ELM_DRIVES=4
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_USING_DFS_DEVFS=y
@ -114,7 +118,7 @@ CONFIG_RT_USING_SERIAL=y
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_MTD_NOR is not set
CONFIG_RT_USING_MTD_NOR=y
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
@ -194,12 +198,14 @@ CONFIG_RT_USING_POSIX=y
#
# multimedia packages
#
# CONFIG_PKG_USING_FASTLZ is not set
#
# tools packages
#
# CONFIG_PKG_USING_CMBACKTRACE is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW is not set
#
# miscellaneous packages

View File

@ -29,11 +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')
if GetDepend('RT_USING_HARD_FLOAT'):
env['CCFLAGS'] = env['CCFLAGS'].replace('-msoft-float', '-mhard-float')
env['ASFLAGS'] = env['ASFLAGS'].replace('-msoft-float', '-mhard-float')
env['CXXFLAGS'] = env['CXXFLAGS'].replace('-msoft-float', '-mhard-float')
env['LINKFLAGS'] = env['LINKFLAGS'].replace('-msoft-float', '-mhard-float')
# make a building
DoBuilding(TARGET, objs)

View File

@ -46,6 +46,20 @@ if RT_USING_SDIO
default 2048
endif
if RT_USING_I2C
config RT_USING_I2C0
bool "Using iic0 bus"
default y
config RT_USING_I2C1
bool "Using iic1 bus"
default n
config RT_USING_I2C2
bool "Using iic2 bus"
default n
endif
if RT_USING_GUIENGINE
config RT_USING_SLCD
bool "Using LCD display"
@ -70,9 +84,9 @@ if RT_USING_GUIENGINE
endchoice
endif
if RT_USING_I2C
if RT_USING_I2C0
config RT_USING_TOUCH
bool "Using touch"
bool "Using LCD touch"
default y
if RT_USING_TOUCH
@ -89,25 +103,13 @@ if RT_USING_GUIENGINE
config RT_TOUCH_THREAD_PRIORITY
int "Set touch thread priority"
range 2 32
range 2 30
default 10
endif
endif
endif
if RT_USING_I2C
config RT_USING_I2C0
bool "Using iic0 bus"
default y
config RT_USING_I2C1
bool "Using iic1 bus"
default n
config RT_USING_I2C2
bool "Using iic2 bus"
default n
endif
config RT_USING_ICODEC
default n

View File

@ -7,15 +7,18 @@
/* RT-Thread Kernel */
#define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 4
#define RT_ALIGN_SIZE 8
/* RT_THREAD_PRIORITY_8 is not set */
#define RT_THREAD_PRIORITY_32
/* RT_THREAD_PRIORITY_256 is not set */
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 100
#define RT_TICK_PER_SECOND 1000
#define RT_DEBUG
#define RT_USING_OVERFLOW_CHECK
#define RT_DEBUG_INIT 0
#define RT_DEBUG_THREAD 0
#define RT_USING_HOOK
#define IDLE_THREAD_STACK_SIZE 256
#define IDLE_THREAD_STACK_SIZE 512
/* RT_USING_TIMER_SOFT is not set */
/* Inter-Thread communication */
@ -31,9 +34,10 @@
#define RT_USING_MEMPOOL
/* RT_USING_MEMHEAP is not set */
#define RT_USING_HEAP
/* RT_USING_NOHEAP is not set */
#define RT_USING_SMALL_MEM
/* RT_USING_SLAB is not set */
#define RT_USING_HEAP
/* Kernel Device Object */
@ -41,7 +45,7 @@
/* RT_USING_INTERRUPT_INFO is not set */
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart"
#define RT_CONSOLE_DEVICE_NAME "uart2"
/* RT_USING_MODULE is not set */
#define ARCH_MIPS
#define ARCH_MIPS_XBURST
@ -73,7 +77,7 @@
#define RT_USING_DFS
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX 2
#define DFS_FILESYSTEMS_MAX 4
#define DFS_FD_MAX 4
#define RT_USING_DFS_ELMFAT
@ -81,14 +85,14 @@
#define RT_DFS_ELM_CODE_PAGE 437
#define RT_DFS_ELM_WORD_ACCESS
#define RT_DFS_ELM_USE_LFN_0
/* RT_DFS_ELM_USE_LFN_0 is not set */
/* RT_DFS_ELM_USE_LFN_1 is not set */
/* RT_DFS_ELM_USE_LFN_2 is not set */
/* RT_DFS_ELM_USE_LFN_3 is not set */
#define RT_DFS_ELM_USE_LFN 0
#define RT_DFS_ELM_USE_LFN_3
#define RT_DFS_ELM_USE_LFN 3
#define RT_DFS_ELM_MAX_LFN 255
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
#define RT_DFS_ELM_DRIVES 4
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
/* RT_DFS_ELM_USE_ERASE is not set */
#define RT_DFS_ELM_REENTRANT
#define RT_USING_DFS_DEVFS
@ -105,7 +109,7 @@
/* RT_USING_HWTIMER is not set */
/* RT_USING_I2C is not set */
#define RT_USING_PIN
/* RT_USING_MTD_NOR is not set */
#define RT_USING_MTD_NOR
/* RT_USING_MTD_NAND is not set */
/* RT_USING_RTC is not set */
/* RT_USING_SDIO is not set */
@ -170,10 +174,13 @@
/* multimedia packages */
/* PKG_USING_FASTLZ is not set */
/* tools packages */
/* PKG_USING_CMBACKTRACE is not set */
/* PKG_USING_EASYLOGGER is not set */
/* PKG_USING_SYSTEMVIEW is not set */
/* miscellaneous packages */

View File

@ -18,13 +18,8 @@ else:
if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
# BUILD = 'debug'
# BUILD = 'release'
BUILD = 'release_O3'
# FLOAT = 'soft'
FLOAT = 'hard'
BUILD = 'release'
if PLATFORM == 'gcc':
# toolchains
@ -40,11 +35,7 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
STRIP = PREFIX + 'strip'
if FLOAT == 'soft':
DEVICE = ' -mips32r2 -msoft-float -mfp32'
else:
DEVICE = ' -mips32r2 -mhard-float -mfp32'
DEVICE = ' -mips32r2 -msoft-float -mfp32'
CFLAGS = DEVICE + ' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fno-omit-frame-pointer'
AFLAGS = ' -c' + DEVICE + ' -EL -x assembler-with-cpp'
LFLAGS = DEVICE + ' -EL -Wl,--gc-sections,-Map=rtthread_x1000.map,-cref,-u,Reset_Handler -T x1000_ram.lds'
@ -54,8 +45,6 @@ if PLATFORM == 'gcc':
if BUILD == 'debug':
CFLAGS += ' -O0 -gdwarf-2'
AFLAGS += ' -gdwarf-2'
elif BUILD == 'release_O3':
CFLAGS += ' -O3'
else:
CFLAGS += ' -O2'