summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-11-20 12:31:00 +0000
committer[email protected] <[email protected]>2010-11-20 12:31:00 +0000
commit10732a76e9a3bf1ead47cf9848c6838236e4e343 (patch)
tree7475b1f6ff77e80bd357fc551de80565c9486080 /bsp
parent2fce1a91e2577f06b68151dffa15558750346d02 (diff)
cleanup scons building script
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1065 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
-rw-r--r--bsp/dev3210/SConscript33
-rw-r--r--bsp/dev3210/SConstruct28
-rw-r--r--bsp/dev3210/rtconfig.py64
-rw-r--r--bsp/lpc176x/SConscript33
-rw-r--r--bsp/lpc176x/SConstruct40
-rw-r--r--bsp/lpc176x/project.Uv2217
-rw-r--r--bsp/lpc176x/rtconfig.py46
-rw-r--r--bsp/mini2440/SConscript47
-rw-r--r--bsp/mini2440/SConstruct75
-rw-r--r--bsp/mini2440/rtconfig.py80
-rw-r--r--bsp/stm3210/Libraries/SConscript25
-rw-r--r--bsp/stm3210/SConscript34
-rw-r--r--bsp/stm3210/SConstruct38
-rw-r--r--bsp/stm3210/project.Uv2166
-rw-r--r--bsp/stm3210/rtconfig.py47
15 files changed, 281 insertions, 692 deletions
diff --git a/bsp/dev3210/SConscript b/bsp/dev3210/SConscript
index 350f0e71a7..fb50794533 100644
--- a/bsp/dev3210/SConscript
+++ b/bsp/dev3210/SConscript
@@ -1,29 +1,10 @@
-Import('env')
-Import('projects')
Import('RTT_ROOT')
-Import('rtconfig')
+from building import *
-# group definitions
-group = {}
-group['name'] = 'Startup'
-group['CCFLAGS'] = ''
-group['CPPPATH'] = [RTT_ROOT + '/bsp/dev3210']
-group['CPPDEFINES'] = []
-group['LINKFLAGS'] = ''
+src_bsp = ['application.c', 'startup.c', 'board.c']
+src_drv = ['uart.c', 'lnn800x480.c']
+src = File(src_bsp + src_drv)
+CPPPATH = [RTT_ROOT + '/bsp/dev3210']
+group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
-src_bsp = ['application.c', 'startup.c', 'board.c']
-src_drv = ['uart.c', 'lnn800x480.c']
-
-group['src'] = File(src_bsp + src_drv)
-
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-obj = env.Object(group['src'])
-
-Return('obj')
+Return('group')
diff --git a/bsp/dev3210/SConstruct b/bsp/dev3210/SConstruct
index daef695079..061f726069 100644
--- a/bsp/dev3210/SConstruct
+++ b/bsp/dev3210/SConstruct
@@ -4,9 +4,9 @@ import rtconfig
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
+from building import *
-target = 'rtthread'
-projects = []
+TARGET = 'rtthread.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -15,26 +15,14 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
-Export('env')
Export('RTT_ROOT')
Export('rtconfig')
-Export('projects')
-# kernel building script
-objs = SConscript(RTT_ROOT + '/src/SConscript', variant_dir='build/src', duplicate=0)
-# arch building script
-objs = objs + SConscript(RTT_ROOT + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)
+# prepare building environment
+objs = PrepareBuilding(env, RTT_ROOT)
-# component script
-Repository(RTT_ROOT)
-objs = objs + SConscript('components/SConscript')
-
-# board build script
-objs = objs + SConscript('SConscript', variant_dir='build/bsp', duplicate=0)
-
-if rtconfig.RT_USING_RTGUI:
- objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
-
-TARGET = target + '.' + rtconfig.TARGET_EXT
+# build program
env.Program(TARGET, objs)
-env.AddPostAction(TARGET, rtconfig.POST_ACTION)
+
+# end building
+EndBuilding(TARGET)
diff --git a/bsp/dev3210/rtconfig.py b/bsp/dev3210/rtconfig.py
index 2f7b09c52f..0a582912d1 100644
--- a/bsp/dev3210/rtconfig.py
+++ b/bsp/dev3210/rtconfig.py
@@ -1,61 +1,12 @@
-import SCons.cpp
-
-# component options
-
-# make all component false
-RT_USING_FINSH = False
-RT_USING_DFS = False
-RT_USING_DFS_ELMFAT = False
-RT_USING_DFS_YAFFS2 = False
-RT_USING_LWIP = False
-RT_USING_WEBSERVER = False
-RT_USING_RTGUI = False
-RT_USING_MODULE = False
-
-# parse rtconfig.h to get used component
-PreProcessor = SCons.cpp.PreProcessor()
-f = file('rtconfig.h', 'r')
-contents = f.read()
-f.close()
-PreProcessor.process_contents(contents)
-rtconfig_ns = PreProcessor.cpp_namespace
-
-# finsh shell options
-if rtconfig_ns.has_key('RT_USING_FINSH'):
- RT_USING_FINSH = True
-
-# device virtual filesystem options
-if rtconfig_ns.has_key('RT_USING_DFS'):
- RT_USING_DFS = True
-
- if rtconfig_ns.has_key('RT_USING_DFS_ELMFAT'):
- RT_USING_DFS_ELMFAT = True
- if rtconfig_ns.has_key('RT_USING_DFS_YAFFS2'):
- RT_USING_DFS_YAFFS2 = True
-
-# lwip options
-if rtconfig_ns.has_key('RT_USING_LWIP'):
- RT_USING_LWIP = True
- if rtconfig_ns.has_key('RT_USING_WEBSERVER'):
- RT_USING_WEBSERVER = True
-
-# rtgui options
-if rtconfig_ns.has_key('RT_USING_RTGUI'):
- RT_USING_RTGUI = True
-
-# module options
-if rtconfig_ns.has_key('RT_USING_MODULE'):
- RT_USING_MODULE = True
-
# CPU options
ARCH='mips'
CPU ='loongson'
# toolchains options
CROSS_TOOL = 'gcc'
-PLATFORM = 'gcc'
-EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
-BUILD = 'debug'
+PLATFORM = 'gcc'
+EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
+BUILD = 'debug'
PREFIX = 'mips-sde-elf-'
CC = PREFIX + 'gcc'
@@ -77,12 +28,11 @@ CPATH = ''
LPATH = ''
if BUILD == 'debug':
- CFLAGS += ' -O0 -gdwarf-2'
- AFLAGS += ' -gdwarf-2'
+ CFLAGS += ' -O0 -gdwarf-2'
+ AFLAGS += ' -gdwarf-2'
else:
- CFLAGS += ' -O2'
+ CFLAGS += ' -O2'
-RT_USING_MINILIBC = True
DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n'
READELF_ACTION = READELF + ' -a $TARGET > rtt.map\n'
-POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + READELF_ACTION
+POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
diff --git a/bsp/lpc176x/SConscript b/bsp/lpc176x/SConscript
index 12284e970b..c4866729f3 100644
--- a/bsp/lpc176x/SConscript
+++ b/bsp/lpc176x/SConscript
@@ -1,36 +1,19 @@
-Import('env')
-Import('projects')
+import rtconfig
Import('RTT_ROOT')
-Import('rtconfig')
-
-# group definitions
-group = {}
-group['name'] = 'Startup'
-group['CCFLAGS'] = ''
-group['CPPPATH'] = [ RTT_ROOT + '/bsp/lpc176x/CMSIS/CM3/CoreSupport', RTT_ROOT + '/bsp/lpc176x/CMSIS/CM3/DeviceSupport/NXP/LPC17xx',RTT_ROOT + '/bsp/lpc176x']
-group['CPPDEFINES'] = []
-group['LINKFLAGS'] = ''
+from building import *
src_bsp = ['application.c', 'startup.c', 'board.c']
src_drv = ['uart.c', 'led.c']
src_cmsis = ['CMSIS/CM3/CoreSupport/core_cm3.c', 'CMSIS/CM3/DeviceSupport/NXP/LPC17xx/system_LPC17xx.c']
-if rtconfig.RT_USING_DFS:
+if GetDepend('RT_USING_DFS'):
src_drv += ['sd.c', 'spi.c']
-if rtconfig.RT_USING_LWIP:
+if GetDepend('RT_USING_LWIP'):
src_drv += ['emac.c']
-group['src'] = File(src_bsp + src_drv + src_cmsis)
-
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-obj = env.Object(group['src'])
+src = File(src_bsp + src_drv + src_cmsis)
+CPPPATH = [ RTT_ROOT + '/bsp/lpc176x/CMSIS/CM3/CoreSupport', RTT_ROOT + '/bsp/lpc176x/CMSIS/CM3/DeviceSupport/NXP/LPC17xx',RTT_ROOT + '/bsp/lpc176x']
+group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
-Return('obj')
+Return('group')
diff --git a/bsp/lpc176x/SConstruct b/bsp/lpc176x/SConstruct
index e3e8593216..4eb3bef0da 100644
--- a/bsp/lpc176x/SConstruct
+++ b/bsp/lpc176x/SConstruct
@@ -4,18 +4,9 @@ import rtconfig
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
-import mdk
+from building import *
-target = 'rtthread-lpc176x'
-projects = []
-
-AddOption('--target',
- dest='target',
- type='string',
- help='set target project: mdk')
-
-if GetOption('target'):
- SetOption('no_exec', 1)
+TARGET = 'rtthread-lpc176x.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -24,26 +15,23 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
-Export('env')
Export('RTT_ROOT')
Export('rtconfig')
-Export('projects')
-# kernel building script
-objs = SConscript(RTT_ROOT + '/src/SConscript', variant_dir='build/src', duplicate=0)
-# arch building script
-objs = objs + SConscript(RTT_ROOT + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)
+# prepare building environment
+objs = PrepareBuilding(env, RTT_ROOT)
+
+if GetDepend('RT_USING_WEBSERVER'):
+ objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
-# component script
-Repository(RTT_ROOT)
-objs = objs + SConscript('components/SConscript')
+if GetDepend('RT_USING_RTGUI'):
+ objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
-# board build script
-objs = objs + SConscript('SConscript', variant_dir='build/bsp', duplicate=0)
+# libc testsuite
+# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
-TARGET = target + '.' + rtconfig.TARGET_EXT
+# build program
env.Program(TARGET, objs)
-env.AddPostAction(TARGET, rtconfig.POST_ACTION)
-if GetOption('target') == 'mdk':
- mdk.MDKProject('project.uV2', projects)
+# end building
+EndBuilding(TARGET)
diff --git a/bsp/lpc176x/project.Uv2 b/bsp/lpc176x/project.Uv2
index a5a120d62e..357b1f99e0 100644
--- a/bsp/lpc176x/project.Uv2
+++ b/bsp/lpc176x/project.Uv2
@@ -3,124 +3,121 @@
Target (RT-Thread LPC17xx), 0x0004 // Tools: 'ARM-ADS'
+Group (Startup)
Group (Kernel)
Group (LPC17XX)
-Group (finsh)
Group (Filesystem)
+Group (finsh)
Group (LwIP)
-Group (Startup)
-File 1,1,<..\..\src\clock.c><clock.c>
-File 1,1,<..\..\src\device.c><device.c>
-File 1,1,<..\..\src\idle.c><idle.c>
-File 1,1,<..\..\src\ipc.c><ipc.c>
-File 1,1,<..\..\src\irq.c><irq.c>
-File 1,1,<..\..\src\kservice.c><kservice.c>
-File 1,1,<..\..\src\mem.c><mem.c>
-File 1,1,<..\..\src\mempool.c><mempool.c>
-File 1,1,<..\..\src\module.c><module.c>
-File 1,1,<..\..\src\object.c><object.c>
-File 1,1,<..\..\src\rtm.c><rtm.c>
-File 1,1,<..\..\src\scheduler.c><scheduler.c>
-File 1,1,<..\..\src\slab.c><slab.c>
-File 1,1,<..\..\src\thread.c><thread.c>
-File 1,1,<..\..\src\timer.c><timer.c>
-File 2,1,<..\..\libcpu\arm\lpc17xx\cpu.c><cpu.c>
-File 2,1,<..\..\libcpu\arm\lpc17xx\fault.c><fault.c>
-File 2,1,<..\..\libcpu\arm\lpc17xx\interrupt.c><interrupt.c>
-File 2,1,<..\..\libcpu\arm\lpc17xx\stack.c><stack.c>
-File 2,2,<..\..\libcpu\arm\lpc17xx\context_rvds.S><context_rvds.S>
-File 2,2,<..\..\libcpu\arm\lpc17xx\fault_rvds.S><fault_rvds.S>
-File 2,2,<..\..\libcpu\arm\lpc17xx\start_rvds.S><start_rvds.S>
-File 2,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
-File 2,1,<..\..\libcpu\arm\common\div0.c><div0.c>
-File 2,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
-File 3,1,<..\..\components\finsh\cmd.c><cmd.c>
-File 3,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
-File 3,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
-File 3,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
-File 3,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
-File 3,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
-File 3,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
-File 3,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
-File 3,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
-File 3,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
-File 3,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
-File 3,1,<..\..\components\finsh\shell.c><shell.c>
-File 3,1,<..\..\components\finsh\symbol.c><symbol.c>
+File 1,1,<.\application.c><application.c>
+File 1,1,<.\startup.c><startup.c>
+File 1,1,<.\board.c><board.c>
+File 1,1,<.\uart.c><uart.c>
+File 1,1,<.\led.c><led.c>
+File 1,1,<.\sd.c><sd.c>
+File 1,1,<.\spi.c><spi.c>
+File 1,1,<.\emac.c><emac.c>
+File 1,1,<CMSIS\CM3\CoreSupport\core_cm3.c><core_cm3.c>
+File 1,1,<CMSIS\CM3\DeviceSupport\NXP\LPC17xx\system_LPC17xx.c><system_LPC17xx.c>
+File 2,1,<..\..\src\clock.c><clock.c>
+File 2,1,<..\..\src\device.c><device.c>
+File 2,1,<..\..\src\idle.c><idle.c>
+File 2,1,<..\..\src\ipc.c><ipc.c>
+File 2,1,<..\..\src\irq.c><irq.c>
+File 2,1,<..\..\src\kservice.c><kservice.c>
+File 2,1,<..\..\src\mem.c><mem.c>
+File 2,1,<..\..\src\mempool.c><mempool.c>
+File 2,1,<..\..\src\module.c><module.c>
+File 2,1,<..\..\src\object.c><object.c>
+File 2,1,<..\..\src\rtm.c><rtm.c>
+File 2,1,<..\..\src\scheduler.c><scheduler.c>
+File 2,1,<..\..\src\slab.c><slab.c>
+File 2,1,<..\..\src\thread.c><thread.c>
+File 2,1,<..\..\src\timer.c><timer.c>
+File 3,1,<..\..\libcpu\arm\lpc17xx\cpu.c><cpu.c>
+File 3,1,<..\..\libcpu\arm\lpc17xx\fault.c><fault.c>
+File 3,1,<..\..\libcpu\arm\lpc17xx\interrupt.c><interrupt.c>
+File 3,1,<..\..\libcpu\arm\lpc17xx\stack.c><stack.c>
+File 3,2,<..\..\libcpu\arm\lpc17xx\context_rvds.S><context_rvds.S>
+File 3,2,<..\..\libcpu\arm\lpc17xx\fault_rvds.S><fault_rvds.S>
+File 3,2,<..\..\libcpu\arm\lpc17xx\start_rvds.S><start_rvds.S>
+File 3,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
+File 3,1,<..\..\libcpu\arm\common\div0.c><div0.c>
+File 3,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
+File 4,1,<..\..\components\dfs\src\dfs.c><dfs.c>
File 4,1,<..\..\components\dfs\src\dfs_fs.c><dfs_fs.c>
-File 4,1,<..\..\components\dfs\src\dfs_init.c><dfs_init.c>
+File 4,1,<..\..\components\dfs\src\dfs_file.c><dfs_file.c>
File 4,1,<..\..\components\dfs\src\dfs_posix.c><dfs_posix.c>
-File 4,1,<..\..\components\dfs\src\dfs_raw.c><dfs_raw.c>
-File 4,1,<..\..\components\dfs\src\dfs_util.c><dfs_util.c>
File 4,1,<..\..\components\dfs\filesystems\elmfat\dfs_elm.c><dfs_elm.c>
File 4,1,<..\..\components\dfs\filesystems\elmfat\ff.c><ff.c>
-File 5,1,<..\..\components\net\lwip\src\api\api_lib.c><api_lib.c>
-File 5,1,<..\..\components\net\lwip\src\api\api_msg.c><api_msg.c>
-File 5,1,<..\..\components\net\lwip\src\api\err.c><err.c>
-File 5,1,<..\..\components\net\lwip\src\api\netbuf.c><netbuf.c>
-File 5,1,<..\..\components\net\lwip\src\api\netdb.c><netdb.c>
-File 5,1,<..\..\components\net\lwip\src\api\netifapi.c><netifapi.c>
-File 5,1,<..\..\components\net\lwip\src\api\sockets.c><sockets.c>
-File 5,1,<..\..\components\net\lwip\src\api\tcpip.c><tcpip.c>
-File 5,1,<..\..\components\net\lwip\src\arch\sys_arch.c><sys_arch.c>
-File 5,1,<..\..\components\net\lwip\src\arch\sys_arch_init.c><sys_arch_init.c>
-File 5,1,<..\..\components\net\lwip\src\core\dhcp.c><dhcp.c>
-File 5,1,<..\..\components\net\lwip\src\core\dns.c><dns.c>
-File 5,1,<..\..\components\net\lwip\src\core\init.c><init.c>
-File 5,1,<..\..\components\net\lwip\src\core\memp.c><memp.c>
-File 5,1,<..\..\components\net\lwip\src\core\netif.c><netif.c>
-File 5,1,<..\..\components\net\lwip\src\core\pbuf.c><pbuf.c>
-File 5,1,<..\..\components\net\lwip\src\core\raw.c><raw.c>
-File 5,1,<..\..\components\net\lwip\src\core\stats.c><stats.c>
-File 5,1,<..\..\components\net\lwip\src\core\sys.c><sys.c>
-File 5,1,<..\..\components\net\lwip\src\core\tcp.c><tcp.c>
-File 5,1,<..\..\components\net\lwip\src\core\tcp_in.c><tcp_in.c>
-File 5,1,<..\..\components\net\lwip\src\core\tcp_out.c><tcp_out.c>
-File 5,1,<..\..\components\net\lwip\src\core\udp.c><udp.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\autoip.c><autoip.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\icmp.c><icmp.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\igmp.c><igmp.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\inet.c><inet.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\inet_chksum.c><inet_chksum.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\ip.c><ip.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\ip_addr.c><ip_addr.c>
-File 5,1,<..\..\components\net\lwip\src\core\ipv4\ip_frag.c><ip_frag.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\asn1_dec.c><asn1_dec.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\asn1_enc.c><asn1_enc.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\mib2.c><mib2.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\mib_structs.c><mib_structs.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\msg_in.c><msg_in.c>
-File 5,1,<..\..\components\net\lwip\src\core\snmp\msg_out.c><msg_out.c>
-File 5,1,<..\..\components\net\lwip\src\netif\etharp.c><etharp.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ethernetif.c><ethernetif.c>
-File 5,1,<..\..\components\net\lwip\src\netif\loopif.c><loopif.c>
-File 5,1,<..\..\components\net\lwip\src\netif\slipif.c><slipif.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\auth.c><auth.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\chap.c><chap.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\chpms.c><chpms.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\fsm.c><fsm.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\ipcp.c><ipcp.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\lcp.c><lcp.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\magic.c><magic.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\md5.c><md5.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\pap.c><pap.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\ppp.c><ppp.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\ppp_oe.c><ppp_oe.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\randm.c><randm.c>
-File 5,1,<..\..\components\net\lwip\src\netif\ppp\vj.c><vj.c>
-File 6,1,<.\application.c><application.c>
-File 6,1,<.\startup.c><startup.c>
-File 6,1,<.\board.c><board.c>
-File 6,1,<.\uart.c><uart.c>
-File 6,1,<.\led.c><led.c>
-File 6,1,<.\sd.c><sd.c>
-File 6,1,<.\spi.c><spi.c>
-File 6,1,<.\emac.c><emac.c>
-File 6,1,<CMSIS\CM3\CoreSupport\core_cm3.c><core_cm3.c>
-File 6,1,<CMSIS\CM3\DeviceSupport\NXP\LPC17xx\system_LPC17xx.c><system_LPC17xx.c>
-
-
+File 5,1,<..\..\components\finsh\cmd.c><cmd.c>
+File 5,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
+File 5,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
+File 5,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
+File 5,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
+File 5,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
+File 5,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
+File 5,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
+File 5,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
+File 5,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
+File 5,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
+File 5,1,<..\..\components\finsh\shell.c><shell.c>
+File 5,1,<..\..\components\finsh\symbol.c><symbol.c>
+File 6,1,<..\..\components\net\lwip\src\api\api_lib.c><api_lib.c>
+File 6,1,<..\..\components\net\lwip\src\api\api_msg.c><api_msg.c>
+File 6,1,<..\..\components\net\lwip\src\api\err.c><err.c>
+File 6,1,<..\..\components\net\lwip\src\api\netbuf.c><netbuf.c>
+File 6,1,<..\..\components\net\lwip\src\api\netdb.c><netdb.c>
+File 6,1,<..\..\components\net\lwip\src\api\netifapi.c><netifapi.c>
+File 6,1,<..\..\components\net\lwip\src\api\sockets.c><sockets.c>
+File 6,1,<..\..\components\net\lwip\src\api\tcpip.c><tcpip.c>
+File 6,1,<..\..\components\net\lwip\src\arch\sys_arch.c><sys_arch.c>
+File 6,1,<..\..\components\net\lwip\src\arch\sys_arch_init.c><sys_arch_init.c>
+File 6,1,<..\..\components\net\lwip\src\core\dhcp.c><dhcp.c>
+File 6,1,<..\..\components\net\lwip\src\core\dns.c><dns.c>
+File 6,1,<..\..\components\net\lwip\src\core\init.c><init.c>
+File 6,1,<..\..\components\net\lwip\src\core\memp.c><memp.c>
+File 6,1,<..\..\components\net\lwip\src\core\netif.c><netif.c>
+File 6,1,<..\..\components\net\lwip\src\core\pbuf.c><pbuf.c>
+File 6,1,<..\..\components\net\lwip\src\core\raw.c><raw.c>
+File 6,1,<..\..\components\net\lwip\src\core\stats.c><stats.c>
+File 6,1,<..\..\components\net\lwip\src\core\sys.c><sys.c>
+File 6,1,<..\..\components\net\lwip\src\core\tcp.c><tcp.c>
+File 6,1,<..\..\components\net\lwip\src\core\tcp_in.c><tcp_in.c>
+File 6,1,<..\..\components\net\lwip\src\core\tcp_out.c><tcp_out.c>
+File 6,1,<..\..\components\net\lwip\src\core\udp.c><udp.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\autoip.c><autoip.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\icmp.c><icmp.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\igmp.c><igmp.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\inet.c><inet.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\inet_chksum.c><inet_chksum.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip.c><ip.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip_addr.c><ip_addr.c>
+File 6,1,<..\..\components\net\lwip\src\core\ipv4\ip_frag.c><ip_frag.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\asn1_dec.c><asn1_dec.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\asn1_enc.c><asn1_enc.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\mib2.c><mib2.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\mib_structs.c><mib_structs.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\msg_in.c><msg_in.c>
+File 6,1,<..\..\components\net\lwip\src\core\snmp\msg_out.c><msg_out.c>
+File 6,1,<..\..\components\net\lwip\src\netif\etharp.c><etharp.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ethernetif.c><ethernetif.c>
+File 6,1,<..\..\components\net\lwip\src\netif\loopif.c><loopif.c>
+File 6,1,<..\..\components\net\lwip\src\netif\slipif.c><slipif.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\auth.c><auth.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\chap.c><chap.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\chpms.c><chpms.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\fsm.c><fsm.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\ipcp.c><ipcp.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\lcp.c><lcp.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\magic.c><magic.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\md5.c><md5.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\pap.c><pap.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\ppp.c><ppp.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\ppp_oe.c><ppp_oe.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\randm.c><randm.c>
+File 6,1,<..\..\components\net\lwip\src\netif\ppp\vj.c><vj.c>
Options 1,0,0 // Target 'RT-Thread LPC17xx'
@@ -181,7 +178,7 @@ Options 1,0,0 // Target 'RT-Thread LPC17xx'
ADSCMISC ()
ADSCDEFN ()
ADSCUDEF ()
- ADSCINCD (..\..\components\net\lwip\src\include\ipv4;..\..\components\dfs;CMSIS\CM3\DeviceSupport\NXP\LPC17xx;..\..\components\net\lwip\src\include;.;..\..\libcpu\arm\lpc17xx;..\..\include;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\components\net\lwip\src\netif\ppp;CMSIS\CM3\CoreSupport;..\..\components\finsh;..\..\components\net\lwip\src\include\netif)
+ ADSCINCD (..\..\components\net\lwip\src\include\ipv4;..\..\components\dfs;CMSIS\CM3\DeviceSupport\NXP\LPC17xx;..\..\components\net\lwip\src\include;.;..\..\libcpu\arm\lpc17xx;..\..\include;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\libcpu\arm\common;..\..\components\net\lwip\src\netif\ppp;CMSIS\CM3\CoreSupport;..\..\components\finsh;..\..\components\net\lwip\src\include\netif)
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
diff --git a/bsp/lpc176x/rtconfig.py b/bsp/lpc176x/rtconfig.py
index 1f0f0cea16..c99291f7a4 100644
--- a/bsp/lpc176x/rtconfig.py
+++ b/bsp/lpc176x/rtconfig.py
@@ -1,47 +1,3 @@
-import SCons.cpp
-
-# component options
-
-# make all component false
-RT_USING_FINSH = False
-RT_USING_DFS = False
-RT_USING_DFS_ELMFAT = False
-RT_USING_DFS_YAFFS2 = False
-RT_USING_LWIP = False
-RT_USING_WEBSERVER = False
-RT_USING_RTGUI = False
-
-# parse rtconfig.h to get used component
-PreProcessor = SCons.cpp.PreProcessor()
-f = file('rtconfig.h', 'r')
-contents = f.read()
-f.close()
-PreProcessor.process_contents(contents)
-rtconfig_ns = PreProcessor.cpp_namespace
-
-# finsh shell options
-if rtconfig_ns.has_key('RT_USING_FINSH'):
- RT_USING_FINSH = True
-
-# device virtual filesystem options
-if rtconfig_ns.has_key('RT_USING_DFS'):
- RT_USING_DFS = True
-
- if rtconfig_ns.has_key('RT_USING_DFS_ELMFAT'):
- RT_USING_DFS_ELMFAT = True
- if rtconfig_ns.has_key('RT_USING_DFS_YAFFS2'):
- RT_USING_DFS_YAFFS2 = True
-
-# lwip options
-if rtconfig_ns.has_key('RT_USING_LWIP'):
- RT_USING_LWIP = True
- if rtconfig_ns.has_key('RT_USING_WEBSERVER'):
- RT_USING_WEBSERVER = True
-
-# rtgui options
-if rtconfig_ns.has_key('RT_USING_RTGUI'):
- RT_USING_RTGUI = True
-
# toolchains options
ARCH='arm'
CPU='lpc17xx'
@@ -82,7 +38,6 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
- RT_USING_MINILIBC = True
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'armcc':
@@ -109,7 +64,6 @@ elif PLATFORM == 'armcc':
else:
CFLAGS += ' -O2'
- RT_USING_MINILIBC = False
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
elif PLATFORM == 'iar':
diff --git a/bsp/mini2440/SConscript b/bsp/mini2440/SConscript
index bf611ca4cc..85e56d1fc0 100644
--- a/bsp/mini2440/SConscript
+++ b/bsp/mini2440/SConscript
@@ -1,32 +1,23 @@
-Import('env')
-Import('projects')
+import rtconfig
Import('RTT_ROOT')
-Import('rtconfig')
-
-# group definitions
-group = {}
-group['name'] = 'Startup'
-group['CCFLAGS'] = ''
-group['CPPPATH'] = [RTT_ROOT + '/bsp/mini2440']
-group['CPPDEFINES'] = []
-group['LINKFLAGS'] = ''
+from building import *
src_bsp = ['application.c', 'startup.c', 'board.c', 'calendar.c']
src_drv = ['console.c', 'led.c']
-if rtconfig.RT_USING_DFS:
+if GetDepend('RT_USING_DFS'):
src_drv += ['sdcard.c']
-if rtconfig.RT_USING_LWIP:
+if GetDepend('RT_USING_LWIP'):
src_drv += ['dm9000.c']
-if rtconfig.RT_USING_RTGUI:
+if GetDepend('RT_USING_RTGUI'):
src_drv += ['touch.c', 'key.c', 'calibration.c']
-if rtconfig.RT_USING_FTK:
+if GetDepend('RT_USING_FTK'):
src_drv += ['touch.c', 'key.c']
-if rtconfig.RT_USING_RTGUI:
+if GetDepend('RT_USING_RTGUI') or GetDepend('RT_USING_FTK'):
if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
src_drv += ['lcd_a70.c']
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':
@@ -34,24 +25,8 @@ if rtconfig.RT_USING_RTGUI:
elif rtconfig.RT_USING_LCD_TYPE == 'PNL_T35':
src_drv += ['lcd_t35.c']
-if rtconfig.RT_USING_FTK:
- if rtconfig.RT_USING_LCD_TYPE == 'PNL_A70':
- src_drv += ['lcd_a70.c']
- elif rtconfig.RT_USING_LCD_TYPE == 'PNL_N35':
- src_drv += ['lcd_n35.c']
- elif rtconfig.RT_USING_LCD_TYPE == 'PNL_T35':
- src_drv += ['lcd_t35.c']
-
-group['src'] = File(src_bsp + src_drv)
-
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-obj = env.Object(group['src'])
+src = File(src_bsp + src_drv)
+CPPPATH = [RTT_ROOT + '/bsp/mini2440']
+group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
-Return('obj')
+Return('group')
diff --git a/bsp/mini2440/SConstruct b/bsp/mini2440/SConstruct
index 462e20a79e..75a0429dde 100644
--- a/bsp/mini2440/SConstruct
+++ b/bsp/mini2440/SConstruct
@@ -4,20 +4,9 @@ import rtconfig
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
-import mdk
+from building import *
-target = 'rtthread-mini2440'
-projects = []
-
-AddOption('--target',
- dest='target',
- type='string',
- help='set target project: mdk')
-
-if GetOption('target'):
- SetOption('no_exec', 1)
-
-TARGET = target + '.' + rtconfig.TARGET_EXT
+TARGET = 'rtthread-mini2440.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -26,61 +15,23 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
-Export('env')
Export('RTT_ROOT')
Export('rtconfig')
-Export('projects')
-Export('TARGET')
-
-if env['PLATFORM'] == 'win32' and rtconfig.PLATFORM == 'gcc':
- import win32file
- import win32event
- import win32process
- import win32security
-
- def my_spawn(sh, escape, cmd, args, spawnenv):
- for var in spawnenv:
- spawnenv[var] = spawnenv[var].encode('ascii', 'replace')
-
- sAttrs = win32security.SECURITY_ATTRIBUTES()
- StartupInfo = win32process.STARTUPINFO()
- newargs = ' '.join(map(escape, args[1:]))
- cmdline = cmd + " " + newargs
-
- # check for any special operating system commands
- if cmd == 'del':
- for arg in args[1:]:
- win32file.DeleteFile(arg)
- exit_code = 0
- else:
- # otherwise execute the command.
- hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo)
- win32event.WaitForSingleObject(hProcess, win32event.INFINITE)
- exit_code = win32process.GetExitCodeProcess(hProcess)
- win32file.CloseHandle(hProcess);
- win32file.CloseHandle(hThread);
- return exit_code
-
- env['SPAWN'] = my_spawn
-
-objs = SConscript(RTT_ROOT + '/src/SConscript', variant_dir='build/src', duplicate=0)
-objs = objs + SConscript(RTT_ROOT + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)
-if rtconfig.RT_USING_WEBSERVER:
- objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
+# prepare building environment
+objs = PrepareBuilding(env, RTT_ROOT)
-if rtconfig.RT_USING_RTGUI:
- objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
+if GetDepend('RT_USING_WEBSERVER'):
+ objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
-# board build script
-objs = objs + SConscript('SConscript', variant_dir='build/bsp', duplicate=0)
+if GetDepend('RT_USING_RTGUI'):
+ objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
-# component script
-Repository(RTT_ROOT)
-objs = objs + SConscript('components/SConscript')
+# libc testsuite
+# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
+# build program
env.Program(TARGET, objs)
-env.AddPostAction(TARGET, rtconfig.POST_ACTION)
-if GetOption('target') == 'mdk':
- mdk.MDKProject('project.uV2', projects)
+# end building
+EndBuilding(TARGET)
diff --git a/bsp/mini2440/rtconfig.py b/bsp/mini2440/rtconfig.py
index 90b8c8f6db..dce03130e1 100644
--- a/bsp/mini2440/rtconfig.py
+++ b/bsp/mini2440/rtconfig.py
@@ -1,77 +1,3 @@
-import SCons.cpp
-
-# component options
-
-# make all component false
-RT_USING_FINSH = False
-RT_USING_DFS = False
-RT_USING_DFS_ELMFAT = False
-RT_USING_DFS_YAFFS2 = False
-RT_USING_DFS_NFS = False
-RT_USING_DFS_ROMFS = False
-RT_USING_DFS_DEVFS = False
-RT_USING_LWIP = False
-RT_USING_WEBSERVER = False
-RT_USING_RTGUI = False
-RT_USING_MODBUS = False
-RT_USING_MODULE = False
-RT_USING_FTK = False
-RT_USING_NEWLIB = False
-RT_USING_PTHREAD = False
-
-# parse rtconfig.h to get used component
-PreProcessor = SCons.cpp.PreProcessor()
-f = file('rtconfig.h', 'r')
-contents = f.read()
-f.close()
-PreProcessor.process_contents(contents)
-rtconfig_ns = PreProcessor.cpp_namespace
-
-# libc options
-if rtconfig_ns.has_key('RT_USING_NEWLIB'):
- RT_USING_NEWLIB = True
-
-if rtconfig_ns.has_key('RT_USING_PTHREAD'):
- RT_USING_PTHREAD = True
-
-# finsh shell options
-if rtconfig_ns.has_key('RT_USING_FINSH'):
- RT_USING_FINSH = True
-
-# device virtual filesystem options
-if rtconfig_ns.has_key('RT_USING_DFS'):
- RT_USING_DFS = True
-
- if rtconfig_ns.has_key('RT_USING_DFS_ELMFAT'):
- RT_USING_DFS_ELMFAT = True
- if rtconfig_ns.has_key('RT_DFS_ELM_USE_LFN'):
- RT_DFS_ELM_USE_LFN = True
- if rtconfig_ns.has_key('RT_USING_DFS_YAFFS2'):
- RT_USING_DFS_YAFFS2 = True
- if rtconfig_ns.has_key('RT_USING_DFS_NFS'):
- RT_USING_DFS_NFS = True
- if rtconfig_ns.has_key('RT_USING_DFS_ROMFS'):
- RT_USING_DFS_ROMFS = True
- if rtconfig_ns.has_key('RT_USING_DFS_DEVFS'):
- RT_USING_DFS_DEVFS = True
-
-# lwip options
-if rtconfig_ns.has_key('RT_USING_LWIP'):
- RT_USING_LWIP = True
- if rtconfig_ns.has_key('RT_USING_WEBSERVER'):
- RT_USING_WEBSERVER = True
-
-# rtgui options
-if rtconfig_ns.has_key('RT_USING_RTGUI'):
- RT_USING_RTGUI = True
-
-if rtconfig_ns.has_key('RT_USING_FTK'):
- RT_USING_FTK = True
-
-# module options
-if rtconfig_ns.has_key('RT_USING_MODULE'):
- RT_USING_MODULE = True
-
# panel options
# 'PNL_A70','PNL_N35', 'PNL_T35'
RT_USING_LCD_TYPE = 'PNL_T35'
@@ -117,9 +43,6 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
- if RT_USING_WEBSERVER:
- CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
-
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'armcc':
@@ -146,9 +69,6 @@ elif PLATFORM == 'armcc':
else:
CFLAGS += ' -O2'
- RT_USING_MINILIBC = False
- if RT_USING_WEBSERVER:
- CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
elif PLATFORM == 'iar':
diff --git a/bsp/stm3210/Libraries/SConscript b/bsp/stm3210/Libraries/SConscript
index 2fe127941d..73e242f71b 100644
--- a/bsp/stm3210/Libraries/SConscript
+++ b/bsp/stm3210/Libraries/SConscript
@@ -1,9 +1,9 @@
-Import('env')
+import rtconfig
Import('RTT_ROOT')
-Import('projects')
+from building import *
# The set of source files associated with this SConscript file.
-src_local = Split("""
+src = Split("""
CMSIS/Core/CM3/core_cm3.c
CMSIS/Core/CM3/system_stm32f10x.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
@@ -33,20 +33,7 @@ STM32F10x_StdPeriph_Driver/src/misc.c
path = [RTT_ROOT + '/bsp/stm3210/Libraries/STM32F10x_StdPeriph_Driver/inc',
RTT_ROOT + '/bsp/stm3210/Libraries/CMSIS/Core/CM3']
-# group definitions
-group = {}
-group['name'] = 'STM32_StdPeriph'
-group['CCFLAGS'] = ''
-group['CPPPATH'] = path
-group['CPPDEFINES'] = []
-group['LINKFLAGS'] = ''
-group['src'] = File(src_local)
+CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
+group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path)
-# add group to project list
-projects.append(group)
-
-env.Append(CPPPATH = path)
-
-obj = env.Object(src_local)
-
-Return('obj')
+Return('group')
diff --git a/bsp/stm3210/SConscript b/bsp/stm3210/SConscript
index 47f884cbe9..c96e2f9a80 100644
--- a/bsp/stm3210/SConscript
+++ b/bsp/stm3210/SConscript
@@ -1,41 +1,25 @@
-Import('env')
-Import('projects')
+import rtconfig
Import('RTT_ROOT')
-Import('rtconfig')
-
-# group definitions
-group = {}
-group['name'] = 'Startup'
-group['CCFLAGS'] = ''
-group['CPPPATH'] = [RTT_ROOT + '/bsp/stm3210']
-group['CPPDEFINES'] = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
-group['LINKFLAGS'] = ''
+from building import *
src_bsp = ['application.c', 'startup.c', 'board.c', 'stm32f10x_it.c']
src_drv = ['rtc.c', 'usart.c', 'led.c']
-if rtconfig.RT_USING_DFS:
+if GetDepend('RT_USING_DFS'):
if rtconfig.STM32_TYPE == 'STM32F10X_HD':
src_drv += ['sdcard.c']
else:
src_drv += ['msd.c']
-if rtconfig.RT_USING_LWIP:
+if GetDepend('RT_USING_LWIP'):
if rtconfig.STM32_TYPE == 'STM32F10X_CL':
src_drv += ['stm32_eth.c']
else:
src_drv += ['enc28j60.c']
-group['src'] = File(src_bsp + src_drv)
-
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-obj = env.Object(group['src'])
+src = src_bsp + src_drv
+CPPPATH = [RTT_ROOT + '/bsp/stm3210']
+CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
+group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
-Return('obj')
+Return('group')
diff --git a/bsp/stm3210/SConstruct b/bsp/stm3210/SConstruct
index 38e0bed6d0..3ba4a0249d 100644
--- a/bsp/stm3210/SConstruct
+++ b/bsp/stm3210/SConstruct
@@ -4,18 +4,9 @@ import rtconfig
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
-import mdk
+from building import *
-target = 'rtthread-stm32'
-projects = []
-
-AddOption('--target',
- dest='target',
- type='string',
- help='set target project: mdk')
-
-if GetOption('target'):
- SetOption('no_exec', 1)
+TARGET = 'rtthread-stm32.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -24,28 +15,17 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
-Export('env')
Export('RTT_ROOT')
Export('rtconfig')
-Export('projects')
-# kernel building script
-objs = SConscript(RTT_ROOT + '/src/SConscript', variant_dir='build/src', duplicate=0)
-# arch building script
-objs = objs + SConscript(RTT_ROOT + '/libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)
-# STM32 firemare library building script
-objs = objs + SConscript(RTT_ROOT + '/bsp/stm3210/Libraries/SConscript', variant_dir='build/Libraries', duplicate=0)
+# prepare building environment
+objs = PrepareBuilding(env, RTT_ROOT)
-# component script
-Repository(RTT_ROOT)
-objs = objs + SConscript('components/SConscript')
-
-# board build script
-objs = objs + SConscript('SConscript', variant_dir='build/bsp', duplicate=0)
+# STM32 firemare library building script
+objs = objs + SConscript(RTT_ROOT + '/bsp/stm3210/Libraries/SConscript', variant_dir='bsp/Libraries', duplicate=0)
-TARGET = target + '.' + rtconfig.TARGET_EXT
+# build program
env.Program(TARGET, objs)
-env.AddPostAction(TARGET, rtconfig.POST_ACTION)
-if GetOption('target') == 'mdk':
- mdk.MDKProject('project.Uv2', projects)
+# end building
+EndBuilding(TARGET)
diff --git a/bsp/stm3210/project.Uv2 b/bsp/stm3210/project.Uv2
index 698018cefb..292e2e263e 100644
--- a/bsp/stm3210/project.Uv2
+++ b/bsp/stm3210/project.Uv2
@@ -3,83 +3,68 @@
Target (RT-Thread STM32), 0x0004 // Tools: 'ARM-ADS'
+Group (Startup)
Group (Kernel)
Group (STM32)
-Group (STM32_StdPeriph)
-Group (finsh)
Group (Filesystem)
+Group (finsh)
Group (LwIP)
-Group (Startup)
+Group (STM32_StdPeriph)
-File 1,1,<..\..\src\clock.c><clock.c>
-File 1,1,<..\..\src\device.c><device.c>
-File 1,1,<..\..\src\idle.c><idle.c>
-File 1,1,<..\..\src\ipc.c><ipc.c>
-File 1,1,<..\..\src\irq.c><irq.c>
-File 1,1,<..\..\src\kservice.c><kservice.c>
-File 1,1,<..\..\src\mem.c><mem.c>
-File 1,1,<..\..\src\mempool.c><mempool.c>
-File 1,1,<..\..\src\module.c><module.c>
-File 1,1,<..\..\src\object.c><object.c>
-File 1,1,<..\..\src\rtm.c><rtm.c>
-File 1,1,<..\..\src\scheduler.c><scheduler.c>
-File 1,1,<..\..\src\slab.c><slab.c>
-File 1,1,<..\..\src\thread.c><thread.c>
-File 1,1,<..\..\src\timer.c><timer.c>
-File 2,1,<..\..\libcpu\arm\stm32\cpu.c><cpu.c>
-File 2,1,<..\..\libcpu\arm\stm32\fault.c><fault.c>
-File 2,1,<..\..\libcpu\arm\stm32\interrupt.c><interrupt.c>
-File 2,1,<..\..\libcpu\arm\stm32\serial.c><serial.c>
-File 2,1,<..\..\libcpu\arm\stm32\stack.c><stack.c>
-File 2,2,<..\..\libcpu\arm\stm32\context_rvds.S><context_rvds.S>
-File 2,2,<..\..\libcpu\arm\stm32\fault_rvds.S><fault_rvds.S>
-File 2,2,<..\..\libcpu\arm\stm32\start_rvds.S><start_rvds.S>
-File 2,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
-File 2,1,<..\..\libcpu\arm\common\div0.c><div0.c>
-File 2,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
-File 3,1,<Libraries\CMSIS\Core\CM3\core_cm3.c><core_cm3.c>
-File 3,1,<Libraries\CMSIS\Core\CM3\system_stm32f10x.c><system_stm32f10x.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c><stm32f10x_crc.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c><stm32f10x_rcc.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c><stm32f10x_wwdg.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c><stm32f10x_pwr.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c><stm32f10x_exti.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c><stm32f10x_bkp.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c><stm32f10x_i2c.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c><stm32f10x_adc.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c><stm32f10x_dac.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c><stm32f10x_rtc.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c><stm32f10x_fsmc.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c><stm32f10x_tim.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c><stm32f10x_iwdg.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c><stm32f10x_spi.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c><stm32f10x_flash.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c><stm32f10x_sdio.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c><stm32f10x_gpio.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c><stm32f10x_usart.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c><stm32f10x_dbgmcu.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c><stm32f10x_dma.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c><stm32f10x_can.c>
-File 3,1,<Libraries\STM32F10x_StdPeriph_Driver\src\misc.c><misc.c>
-File 4,1,<..\..\components\finsh\cmd.c><cmd.c>
-File 4,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
-File 4,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
-File 4,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
-File 4,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
-File 4,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
-File 4,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
-File 4,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
-File 4,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
-File 4,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
-File 4,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
-File 4,1,<..\..\components\finsh\shell.c><shell.c>
-File 4,1,<..\..\components\finsh\symbol.c><symbol.c>
-File 5,1,<..\..\components\dfs\src\dfs.c><dfs.c>
-File 5,1,<..\..\components\dfs\src\dfs_fs.c><dfs_fs.c>
-File 5,1,<..\..\components\dfs\src\dfs_file.c><dfs_file.c>
-File 5,1,<..\..\components\dfs\src\dfs_posix.c><dfs_posix.c>
-File 5,1,<..\..\components\dfs\filesystems\elmfat\dfs_elm.c><dfs_elm.c>
-File 5,1,<..\..\components\dfs\filesystems\elmfat\ff.c><ff.c>
+File 1,1,<.\application.c><application.c>
+File 1,1,<.\startup.c><startup.c>
+File 1,1,<.\board.c><board.c>
+File 1,1,<.\stm32f10x_it.c><stm32f10x_it.c>
+File 1,1,<.\rtc.c><rtc.c>
+File 1,1,<.\usart.c><usart.c>
+File 1,1,<.\led.c><led.c>
+File 1,1,<.\sdcard.c><sdcard.c>
+File 1,1,<.\enc28j60.c><enc28j60.c>
+File 2,1,<..\..\src\clock.c><clock.c>
+File 2,1,<..\..\src\device.c><device.c>
+File 2,1,<..\..\src\idle.c><idle.c>
+File 2,1,<..\..\src\ipc.c><ipc.c>
+File 2,1,<..\..\src\irq.c><irq.c>
+File 2,1,<..\..\src\kservice.c><kservice.c>
+File 2,1,<..\..\src\mem.c><mem.c>
+File 2,1,<..\..\src\mempool.c><mempool.c>
+File 2,1,<..\..\src\module.c><module.c>
+File 2,1,<..\..\src\object.c><object.c>
+File 2,1,<..\..\src\rtm.c><rtm.c>
+File 2,1,<..\..\src\scheduler.c><scheduler.c>
+File 2,1,<..\..\src\slab.c><slab.c>
+File 2,1,<..\..\src\thread.c><thread.c>
+File 2,1,<..\..\src\timer.c><timer.c>
+File 3,1,<..\..\libcpu\arm\stm32\cpu.c><cpu.c>
+File 3,1,<..\..\libcpu\arm\stm32\fault.c><fault.c>
+File 3,1,<..\..\libcpu\arm\stm32\interrupt.c><interrupt.c>
+File 3,1,<..\..\libcpu\arm\stm32\serial.c><serial.c>
+File 3,1,<..\..\libcpu\arm\stm32\stack.c><stack.c>
+File 3,2,<..\..\libcpu\arm\stm32\context_rvds.S><context_rvds.S>
+File 3,2,<..\..\libcpu\arm\stm32\fault_rvds.S><fault_rvds.S>
+File 3,2,<..\..\libcpu\arm\stm32\start_rvds.S><start_rvds.S>
+File 3,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
+File 3,1,<..\..\libcpu\arm\common\div0.c><div0.c>
+File 3,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
+File 4,1,<..\..\components\dfs\src\dfs.c><dfs.c>
+File 4,1,<..\..\components\dfs\src\dfs_fs.c><dfs_fs.c>
+File 4,1,<..\..\components\dfs\src\dfs_file.c><dfs_file.c>
+File 4,1,<..\..\components\dfs\src\dfs_posix.c><dfs_posix.c>
+File 4,1,<..\..\components\dfs\filesystems\elmfat\dfs_elm.c><dfs_elm.c>
+File 4,1,<..\..\components\dfs\filesystems\elmfat\ff.c><ff.c>
+File 5,1,<..\..\components\finsh\cmd.c><cmd.c>
+File 5,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
+File 5,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
+File 5,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
+File 5,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
+File 5,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
+File 5,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
+File 5,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
+File 5,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
+File 5,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
+File 5,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
+File 5,1,<..\..\components\finsh\shell.c><shell.c>
+File 5,1,<..\..\components\finsh\symbol.c><symbol.c>
File 6,1,<..\..\components\net\lwip\src\api\api_lib.c><api_lib.c>
File 6,1,<..\..\components\net\lwip\src\api\api_msg.c><api_msg.c>
File 6,1,<..\..\components\net\lwip\src\api\err.c><err.c>
@@ -134,17 +119,30 @@ File 6,1,<..\..\components\net\lwip\src\netif\ppp\ppp.c><ppp.c>
File 6,1,<..\..\components\net\lwip\src\netif\ppp\ppp_oe.c><ppp_oe.c>
File 6,1,<..\..\components\net\lwip\src\netif\ppp\randm.c><randm.c>
File 6,1,<..\..\components\net\lwip\src\netif\ppp\vj.c><vj.c>
-File 7,1,<.\application.c><application.c>
-File 7,1,<.\startup.c><startup.c>
-File 7,1,<.\board.c><board.c>
-File 7,1,<.\stm32f10x_it.c><stm32f10x_it.c>
-File 7,1,<.\rtc.c><rtc.c>
-File 7,1,<.\usart.c><usart.c>
-File 7,1,<.\led.c><led.c>
-File 7,1,<.\sdcard.c><sdcard.c>
-File 7,1,<.\enc28j60.c><enc28j60.c>
-
-
+File 7,1,<Libraries\CMSIS\Core\CM3\core_cm3.c><core_cm3.c>
+File 7,1,<Libraries\CMSIS\Core\CM3\system_stm32f10x.c><system_stm32f10x.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c><stm32f10x_crc.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c><stm32f10x_rcc.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c><stm32f10x_wwdg.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c><stm32f10x_pwr.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c><stm32f10x_exti.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c><stm32f10x_bkp.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c><stm32f10x_i2c.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c><stm32f10x_adc.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c><stm32f10x_dac.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c><stm32f10x_rtc.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c><stm32f10x_fsmc.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c><stm32f10x_tim.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c><stm32f10x_iwdg.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c><stm32f10x_spi.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c><stm32f10x_flash.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c><stm32f10x_sdio.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c><stm32f10x_gpio.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c><stm32f10x_usart.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c><stm32f10x_dbgmcu.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c><stm32f10x_dma.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c><stm32f10x_can.c>
+File 7,1,<Libraries\STM32F10x_StdPeriph_Driver\src\misc.c><misc.c>
Options 1,0,0 // Target 'RT-Thread STM32'
@@ -205,7 +203,7 @@ Options 1,0,0 // Target 'RT-Thread STM32'
ADSCMISC ()
ADSCDEFN (STM32F10X_HD, USE_STDPERIPH_DRIVER)
ADSCUDEF ()
- ADSCINCD (Libraries\CMSIS\Core\CM3;Libraries\STM32F10x_StdPeriph_Driver\inc;..\..\components\dfs;..\..\components\finsh;..\..\components\net\lwip\src\include;.;..\..\components\net\lwip\src\include\ipv4;..\..\include;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\components\net\lwip\src\netif\ppp;..\..\libcpu\arm\stm32;..\..\components\net\lwip\src\include\netif)
+ ADSCINCD (Libraries\CMSIS\Core\CM3;Libraries\STM32F10x_StdPeriph_Driver\inc;..\..\components\dfs;..\..\components\finsh;..\..\components\net\lwip\src\include;.;..\..\components\net\lwip\src\include\ipv4;..\..\include;..\..\components\net\lwip\src\arch\include;..\..\components\dfs\include;..\..\components\net\lwip\src;..\..\libcpu\arm\common;..\..\components\net\lwip\src\netif\ppp;..\..\libcpu\arm\stm32;..\..\components\net\lwip\src\include\netif)
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
diff --git a/bsp/stm3210/rtconfig.py b/bsp/stm3210/rtconfig.py
index 5887d97ca9..4050e7074c 100644
--- a/bsp/stm3210/rtconfig.py
+++ b/bsp/stm3210/rtconfig.py
@@ -1,47 +1,3 @@
-import SCons.cpp
-
-# component options
-
-# make all component false
-RT_USING_FINSH = False
-RT_USING_DFS = False
-RT_USING_DFS_ELMFAT = False
-RT_USING_DFS_YAFFS2 = False
-RT_USING_LWIP = False
-RT_USING_WEBSERVER = False
-RT_USING_RTGUI = False
-
-# parse rtconfig.h to get used component
-PreProcessor = SCons.cpp.PreProcessor()
-f = file('rtconfig.h', 'r')
-contents = f.read()
-f.close()
-PreProcessor.process_contents(contents)
-rtconfig_ns = PreProcessor.cpp_namespace
-
-# finsh shell options
-if rtconfig_ns.has_key('RT_USING_FINSH'):
- RT_USING_FINSH = True
-
-# device virtual filesystem options
-if rtconfig_ns.has_key('RT_USING_DFS'):
- RT_USING_DFS = True
-
- if rtconfig_ns.has_key('RT_USING_DFS_ELMFAT'):
- RT_USING_DFS_ELMFAT = True
- if rtconfig_ns.has_key('RT_USING_DFS_YAFFS2'):
- RT_USING_DFS_YAFFS2 = True
-
-# lwip options
-if rtconfig_ns.has_key('RT_USING_LWIP'):
- RT_USING_LWIP = True
- if rtconfig_ns.has_key('RT_USING_WEBSERVER'):
- RT_USING_WEBSERVER = True
-
-# rtgui options
-if rtconfig_ns.has_key('RT_USING_RTGUI'):
- RT_USING_RTGUI = True
-
# toolchains options
ARCH='arm'
CPU='stm32'
@@ -83,7 +39,6 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
- RT_USING_MINILIBC = True
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'armcc':
@@ -110,7 +65,6 @@ elif PLATFORM == 'armcc':
else:
CFLAGS += ' -O2'
- RT_USING_MINILIBC = False
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
elif PLATFORM == 'iar':
@@ -128,5 +82,4 @@ elif PLATFORM == 'iar':
LFLAGS = ' --config stm32f10x_flash.icf'
EXEC_PATH += '/arm/bin/'
- RT_USING_MINILIBC = False
POST_ACTION = ''