diff --git a/components/init/SConscript b/components/init/SConscript index 261065dd529b1d56dc6aaca2daaab2d9867d8c13..c3ce75088d348367ee831d1ee1014231855dc65e 100644 --- a/components/init/SConscript +++ b/components/init/SConscript @@ -3,6 +3,11 @@ from building import * cwd = GetCurrentDir() src = Glob('*.c') CPPPATH = [cwd] -group = DefineGroup('Components', src, depend = ['RT_USING_COMPONENTS_INIT'], CPPPATH = CPPPATH) +if rtconfig.CROSS_TOOL == 'keil': + LINKFLAGS = ' --keep __rt_init* ' +else: + LINKFLAGS = '' + +group = DefineGroup('Components', src, depend = ['RT_USING_COMPONENTS_INIT'], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) Return('group')