diff --git a/bsp/lpc178x/SConscript b/bsp/lpc178x/SConscript index 1bb1701d1f..569e67de75 100644 --- a/bsp/lpc178x/SConscript +++ b/bsp/lpc178x/SConscript @@ -2,11 +2,13 @@ import rtconfig Import('RTT_ROOT') from building import * -src_bsp = ['application.c', 'startup.c'] +cwd = str(Dir('#')) +objs = [] +list = os.listdir(cwd) -src = File(src_bsp) -CPPPATH = [ GetCurrentDir() ] -CPPDEFINES = [] -group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) -Return('group') +Return('objs') diff --git a/bsp/lpc178x/SConstruct b/bsp/lpc178x/SConstruct index 6b8bc35550..ff91371b27 100644 --- a/bsp/lpc178x/SConstruct +++ b/bsp/lpc178x/SConstruct @@ -21,22 +21,9 @@ Export('rtconfig') # 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) - if GetDepend('RT_USING_RTGUI'): objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0) -cwd = str(Dir('#')) -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -# libc testsuite -# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0) - # build program env.Program(TARGET, objs) diff --git a/bsp/lpc178x/application.c b/bsp/lpc178x/applications/application.c similarity index 100% rename from bsp/lpc178x/application.c rename to bsp/lpc178x/applications/application.c diff --git a/bsp/lpc178x/startup.c b/bsp/lpc178x/applications/startup.c similarity index 100% rename from bsp/lpc178x/startup.c rename to bsp/lpc178x/applications/startup.c diff --git a/bsp/lpc178x/project.uvproj b/bsp/lpc178x/project.uvproj index 9f08eaccb7..5de2c7bfed 100644 --- a/bsp/lpc178x/project.uvproj +++ b/bsp/lpc178x/project.uvproj @@ -346,7 +346,7 @@ - drivers;.;CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x;..\..\include;..\..\libcpu\arm\cortex-m3;..\..\libcpu\arm\common;CMSIS\CM3\CoreSupport;..\..\components\finsh + ..\..\include;drivers;.;CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x;applications;..\..\libcpu\arm\cortex-m3;..\..\libcpu\arm\common;CMSIS\CM3\CoreSupport;..\..\components\finsh @@ -384,17 +384,77 @@ - Startup + Applications application.c 1 - .\application.c + applications\application.c startup.c 1 - .\startup.c + applications\startup.c + + + + + CMSIS + + + core_cm3.c + 1 + CMSIS\CM3\CoreSupport\core_cm3.c + + + system_LPC177x_8x.c + 1 + CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x\system_LPC177x_8x.c + + + startup_LPC177x_8x.s + 2 + CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x\startup\arm\startup_LPC177x_8x.s + + + + + Drivers + + + board.c + 1 + drivers\board.c + + + lpc177x_8x_clkpwr.c + 1 + drivers\lpc177x_8x_clkpwr.c + + + lpc177x_8x_emc.c + 1 + drivers\lpc177x_8x_emc.c + + + lpc177x_8x_pinsel.c + 1 + drivers\lpc177x_8x_pinsel.c + + + lpc177x_8x_uart.c + 1 + drivers\lpc177x_8x_uart.c + + + lpc17xx_lcd.c + 1 + drivers\lpc17xx_lcd.c + + + uart.c + 1 + drivers\uart.c @@ -563,66 +623,6 @@ - - CMSIS - - - core_cm3.c - 1 - CMSIS\CM3\CoreSupport\core_cm3.c - - - system_LPC177x_8x.c - 1 - CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x\system_LPC177x_8x.c - - - startup_LPC177x_8x.s - 2 - CMSIS\CM3\DeviceSupport\NXP\LPC177x_8x\startup\arm\startup_LPC177x_8x.s - - - - - Drivers - - - board.c - 1 - drivers\board.c - - - lpc177x_8x_clkpwr.c - 1 - drivers\lpc177x_8x_clkpwr.c - - - lpc177x_8x_emc.c - 1 - drivers\lpc177x_8x_emc.c - - - lpc177x_8x_pinsel.c - 1 - drivers\lpc177x_8x_pinsel.c - - - lpc177x_8x_uart.c - 1 - drivers\lpc177x_8x_uart.c - - - lpc17xx_lcd.c - 1 - drivers\lpc17xx_lcd.c - - - uart.c - 1 - drivers\uart.c - - -