From 2c32bb90a486941a8f6ff04f67dec456b5ff6714 Mon Sep 17 00:00:00 2001 From: qiuyiuestc Date: Thu, 22 Jul 2010 13:19:09 +0000 Subject: rename postlinker to rtmlinker && add post action git-svn-id: https://rt-thread.googlecode.com/svn/trunk@812 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/module/basicapp/SConscript | 13 +++++++++---- tools/postlinker.exe | Bin 8704 -> 0 bytes tools/rtmlinker.exe | Bin 0 -> 8704 bytes 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 tools/postlinker.exe create mode 100644 tools/rtmlinker.exe diff --git a/components/module/basicapp/SConscript b/components/module/basicapp/SConscript index 600b9ea8ad..f7b811fc9a 100644 --- a/components/module/basicapp/SConscript +++ b/components/module/basicapp/SConscript @@ -2,6 +2,9 @@ Import('env') Import('projects') Import('RTT_ROOT') Import('rtconfig') +Import('TARGET') + +RTMLINKER = RTT_ROOT + '/tools/rtmlinker.exe ' # group definitions group = {} @@ -11,11 +14,14 @@ group['CCFLAGS'] = '' group['CPPPATH'] = [''] group['CPPDEFINES'] = '' -target = 'basicapp.mo' +target = 'basicapp.so' +POST_ACTION = RTMLINKER + '-l ' + TARGET + ' -o basicapp.mo ' + '$TARGET' # add group to project list projects.append(group) +src_local = Glob('basicapp.c') + env.Append(CCFLAGS = group['CCFLAGS']) env.Append(CPPPATH = group['CPPPATH']) env.Append(CPPDEFINES = group['CPPDEFINES']) @@ -23,7 +29,6 @@ module_env = env.Clone(CPPDEFINE = 'RT_MODULE') module_env = env.Clone(CCFLAGS = ' -mcpu=arm920t -O0 -fPIC') module_env.Replace(LINK = 'arm-none-eabi-ld') module_env.Replace(LINKFLAGS = '-z max-page-size=0x4 -shared -fPIC -e rt_application_entry -nostdlib -s') +module_env.Program(target, src_local) +module_env.AddPostAction(target, POST_ACTION) -src_local = Glob('*.c') - -module_env.Program(target, src_local) diff --git a/tools/postlinker.exe b/tools/postlinker.exe deleted file mode 100644 index 5968a11bf4..0000000000 Binary files a/tools/postlinker.exe and /dev/null differ diff --git a/tools/rtmlinker.exe b/tools/rtmlinker.exe new file mode 100644 index 0000000000..5968a11bf4 Binary files /dev/null and b/tools/rtmlinker.exe differ -- cgit v1.3.1