move component options to itself scons script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@119 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2009-10-21 23:51:32 +00:00
parent 9ba0621463
commit a8065da962
2 changed files with 40 additions and 5 deletions

View File

@ -0,0 +1,38 @@
Import('env')
Import('RTT_ROOT')
# The set of source files associated with this SConscript file.
src_local = Split("""
CMSIS/Core/CM3/core_cm3.c
CMSIS/Core/CM3/system_stm32f10x.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c
STM32F10x_StdPeriph_Driver/src/misc.c
""")
path = [RTT_ROOT + '/bsp/stm3210/Libraries/STM32F10x_StdPeriph_Driver/inc', RTT_ROOT + '/bsp/stm3210/Libraries/CMSIS/Core/CM3']
env.Append(CPPPATH = path)
obj = env.Object(src_local)
Return('obj')

View File

@ -23,7 +23,7 @@ elif rtconfig.CC == 'gcc':
aflags = device + ' -c -gdwarf-2 -mthumb -x assembler-with-cpp'
cc_path = ''
cc_cpath = ''
cc_exec_path = 'D:/SourceryGCC/bin'
cc_exec_path = 'd:/codesourcery/bin'
cc_cflags = device + ' -mthumb -gdwarf-2 -DUSE_STDPERIPH_DRIVER -DSTM32F10X_HD -D__thumb__ -Wall -nostdinc -fno-builtin'
cc_lflags = cc_cflags + ' -MMD -MP -MF -static -nostdlib -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,Reset_Handler -T stm32_rom.ld --output rtthread-stm32.elf'
cc_target = 'rtthread-stm32.elf'
@ -43,10 +43,7 @@ aflags = aflags
cflags = cc_cflags
# search path for C compiler
kernel_path = [RTT_ROOT + '/include', RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU]
bsp_path = [RTT_ROOT + '/bsp/stm3210', RTT_ROOT + '/bsp/stm3210/Libraries/STM32F10x_StdPeriph_Driver/inc', RTT_ROOT + '/bsp/stm3210/Libraries/CMSIS/Core/CM3']
cpath = kernel_path + bsp_path
cpath = [RTT_ROOT + '/bsp/stm3210']
# link flag
lflags = device + cc_lflags