提交 85946a3c 编写于 作者: B bernard.xiong

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

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@643 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 99bfaf72
...@@ -9,6 +9,14 @@ import mdk ...@@ -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 ...@@ -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)
...@@ -31,7 +31,7 @@ Options 1,0,0 // Target 'RT-Thread STM32' ...@@ -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
......
...@@ -69,7 +69,6 @@ path = [RTT_ROOT + '/components/net/lwip/src', ...@@ -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)
......
...@@ -107,7 +107,7 @@ def MDKProject(target, script): ...@@ -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']:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册