add scons --target=mdk option for STM3210 porting.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@643 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong 2010-04-18 23:48:59 +00:00
parent 99bfaf72d9
commit 85946a3c0d
4 changed files with 12 additions and 4 deletions

View File

@ -9,6 +9,14 @@ import mdk
target = 'rtthread-stm32' target = 'rtthread-stm32'
projects = [] projects = []
AddOption('--target',
dest='target',
type='string',
help='set target project: mdk')
if GetOption('target'):
SetOption('no_exec', 1)
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
@ -39,4 +47,5 @@ TARGET = target + '.' + rtconfig.TARGET_EXT
env.Program(TARGET, objs) env.Program(TARGET, objs)
env.AddPostAction(TARGET, rtconfig.POST_ACTION) env.AddPostAction(TARGET, rtconfig.POST_ACTION)
mdk.MDKProject('project_2.uV2', projects) if GetOption('target') == 'mdk':
mdk.MDKProject('project_2.uV2', projects)

View File

@ -31,7 +31,7 @@ Options 1,0,0 // Target 'RT-Thread STM32'
EnvReg (ÿST\STM32F10x\) EnvReg (ÿST\STM32F10x\)
OrgReg (ÿST\STM32F10x\) OrgReg (ÿST\STM32F10x\)
TgStat=16 TgStat=16
OutDir (.\) OutDir (.\obj\)
OutName (rtthread-stm32) OutName (rtthread-stm32)
GenApp=1 GenApp=1
GenLib=0 GenLib=0

View File

@ -69,7 +69,6 @@ path = [RTT_ROOT + '/components/net/lwip/src',
RTT_ROOT + '/components/net/lwip/src/netif/ppp'] RTT_ROOT + '/components/net/lwip/src/netif/ppp']
# group definitions # group definitions
print 'LwIP group=='
group = {} group = {}
group['name'] = 'LwIP' group['name'] = 'LwIP'
group['src'] = File(src_local) group['src'] = File(src_local)

View File

@ -107,7 +107,7 @@ def MDKProject(target, script):
# number of groups # number of groups
group_index = 1 group_index = 1
for group in script: for group in script:
print group['name'] # print group['name']
# get each include path # get each include path
if group.has_key('CPPPATH') and group['CPPPATH']: if group.has_key('CPPPATH') and group['CPPPATH']: