From 54f8b19e12819faf9b055d3c38f7346992990b0b Mon Sep 17 00:00:00 2001 From: Grissiom Date: Tue, 14 Apr 2015 18:22:46 +0800 Subject: [PATCH 1/2] SConscript: fix the `--keep` parameter for Keil The old `--keep` parameter for Keil is wrong. RTFM of Keil and get it right. --- components/finsh/SConscript | 4 ++-- src/SConscript | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/finsh/SConscript b/components/finsh/SConscript index edb52eb357..8d6729e4a7 100644 --- a/components/finsh/SConscript +++ b/components/finsh/SConscript @@ -28,10 +28,10 @@ msh.c CPPPATH = [cwd] if rtconfig.CROSS_TOOL == 'keil': - LINKFLAGS = ' --keep __fsym_*' + LINKFLAGS = ' --keep *.o(FSymTab)' if not GetDepend('FINSH_USING_MSH_ONLY'): - LINKFLAGS = LINKFLAGS + ' --keep __vsym_* ' + LINKFLAGS = LINKFLAGS + ' --keep *.o(VSymTab) ' else: LINKFLAGS = '' diff --git a/src/SConscript b/src/SConscript index 6d59365195..0242d4634c 100644 --- a/src/SConscript +++ b/src/SConscript @@ -9,9 +9,9 @@ if rtconfig.CROSS_TOOL == 'keil': # add more link flags for module and components_init. LINKFLAGS = '' if GetDepend('RT_USING_MODULE'): - LINKFLAGS = ' --keep __rtmsym_* ' + LINKFLAGS = ' --keep *.o(RTMSymTab) ' if GetDepend('RT_USING_COMPONENTS_INIT'): - LINKFLAGS = ' --keep __rt_init* ' + LINKFLAGS = ' --keep *.o(.rti_fn.*) ' else: LINKFLAGS = '' From b3214ed45fba09f64689eea647e795e79b1e3c81 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Tue, 14 Apr 2015 18:34:09 +0800 Subject: [PATCH 2/2] SConscript: fix LINKFLAGS over-written Fix a regression on 62a0172d11e5592. --- src/SConscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SConscript b/src/SConscript index 0242d4634c..953ea5060d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -9,9 +9,9 @@ if rtconfig.CROSS_TOOL == 'keil': # add more link flags for module and components_init. LINKFLAGS = '' if GetDepend('RT_USING_MODULE'): - LINKFLAGS = ' --keep *.o(RTMSymTab) ' + LINKFLAGS += ' --keep *.o(RTMSymTab) ' if GetDepend('RT_USING_COMPONENTS_INIT'): - LINKFLAGS = ' --keep *.o(.rti_fn.*) ' + LINKFLAGS += ' --keep *.o(.rti_fn.*) ' else: LINKFLAGS = ''