From bb529858fe3b8f0722bd060e054523ee9441f685 Mon Sep 17 00:00:00 2001 From: "dzzxzz@gmail.com" Date: Tue, 26 Jun 2012 06:41:59 +0000 Subject: [PATCH] update the m16c62p project git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2187 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/m16c62p/SConscript | 22 +- bsp/m16c62p/applications/SConscript | 9 + bsp/m16c62p/{ => applications}/application.c | 0 bsp/m16c62p/{ => applications}/startup.c | 0 bsp/m16c62p/drivers/SConscript | 19 + bsp/m16c62p/{ => drivers}/board.c | 0 bsp/m16c62p/{ => drivers}/board.h | 0 bsp/m16c62p/{ => drivers}/bsp.c | 0 bsp/m16c62p/{ => drivers}/bsp.h | 0 .../interrupts_gcc.S} | 0 .../interrupts_iar.asm} | 0 bsp/m16c62p/{ => drivers}/iom16c62p.h | 0 bsp/m16c62p/{start.S => drivers/start_gcc.S} | 0 .../{cstartup.asm => drivers/start_iar.asm} | 0 bsp/m16c62p/{ => drivers}/uart.c | 0 bsp/m16c62p/{ => drivers}/uart.h | 0 .../{vects.S => drivers/vectors_gcc.S} | 0 .../{vectors.asm => drivers/vectors_iar.asm} | 0 bsp/m16c62p/{rtt2m16c.ewp => project.ewp} | 161 +- bsp/m16c62p/{rtt2m16c.eww => project.eww} | 20 +- bsp/m16c62p/readme.txt | 44 +- bsp/m16c62p/template.ewp | 1776 +++++++++++++++++ 22 files changed, 1906 insertions(+), 145 deletions(-) create mode 100644 bsp/m16c62p/applications/SConscript rename bsp/m16c62p/{ => applications}/application.c (100%) rename bsp/m16c62p/{ => applications}/startup.c (100%) create mode 100644 bsp/m16c62p/drivers/SConscript rename bsp/m16c62p/{ => drivers}/board.c (100%) rename bsp/m16c62p/{ => drivers}/board.h (100%) rename bsp/m16c62p/{ => drivers}/bsp.c (100%) rename bsp/m16c62p/{ => drivers}/bsp.h (100%) rename bsp/m16c62p/{interrupts.S => drivers/interrupts_gcc.S} (100%) rename bsp/m16c62p/{interrupts.asm => drivers/interrupts_iar.asm} (100%) rename bsp/m16c62p/{ => drivers}/iom16c62p.h (100%) rename bsp/m16c62p/{start.S => drivers/start_gcc.S} (100%) rename bsp/m16c62p/{cstartup.asm => drivers/start_iar.asm} (100%) rename bsp/m16c62p/{ => drivers}/uart.c (100%) rename bsp/m16c62p/{ => drivers}/uart.h (100%) rename bsp/m16c62p/{vects.S => drivers/vectors_gcc.S} (100%) rename bsp/m16c62p/{vectors.asm => drivers/vectors_iar.asm} (100%) rename bsp/m16c62p/{rtt2m16c.ewp => project.ewp} (91%) rename bsp/m16c62p/{rtt2m16c.eww => project.eww} (69%) create mode 100644 bsp/m16c62p/template.ewp diff --git a/bsp/m16c62p/SConscript b/bsp/m16c62p/SConscript index 7f1254936..d9c64eb9f 100644 --- a/bsp/m16c62p/SConscript +++ b/bsp/m16c62p/SConscript @@ -1,18 +1,12 @@ -import rtconfig -Import('RTT_ROOT') from building import * -src_c = ['application.c', 'startup.c', 'board.c', 'bsp.c', 'uart.c'] +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) -# add for startup script -if rtconfig.CROSS_TOOL == 'gcc': - src_asm = ['start.S', 'vects.S', 'interrupts.S'] -elif rtconfig.CROSS_TOOL == 'iar': - src_asm = ['cstartup.asm', 'interrupts.asm', 'vectors.asm'] +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')) -src = File(src_c + src_asm) - -CPPPATH = [RTT_ROOT + '/bsp/m16c62p'] -group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH) - -Return('group') +Return('objs') diff --git a/bsp/m16c62p/applications/SConscript b/bsp/m16c62p/applications/SConscript new file mode 100644 index 000000000..4fe38ed0c --- /dev/null +++ b/bsp/m16c62p/applications/SConscript @@ -0,0 +1,9 @@ +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd, str(Dir('#'))] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/m16c62p/application.c b/bsp/m16c62p/applications/application.c similarity index 100% rename from bsp/m16c62p/application.c rename to bsp/m16c62p/applications/application.c diff --git a/bsp/m16c62p/startup.c b/bsp/m16c62p/applications/startup.c similarity index 100% rename from bsp/m16c62p/startup.c rename to bsp/m16c62p/applications/startup.c diff --git a/bsp/m16c62p/drivers/SConscript b/bsp/m16c62p/drivers/SConscript new file mode 100644 index 000000000..4844cf24a --- /dev/null +++ b/bsp/m16c62p/drivers/SConscript @@ -0,0 +1,19 @@ +from building import * +import rtconfig + +cwd = GetCurrentDir() +src_c = Glob('*.c') + +# add for startup script +if rtconfig.CROSS_TOOL == 'gcc': + src_asm = ['start_gcc.S', 'vectors_gcc.S', 'interrupts_gcc.S'] +elif rtconfig.CROSS_TOOL == 'iar': + src_asm = ['start_iar.asm', 'vectors_iar.asm', 'interrupts_iar.asm'] + +src = File(src_c + src_asm) + +CPPPATH = [cwd] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/m16c62p/board.c b/bsp/m16c62p/drivers/board.c similarity index 100% rename from bsp/m16c62p/board.c rename to bsp/m16c62p/drivers/board.c diff --git a/bsp/m16c62p/board.h b/bsp/m16c62p/drivers/board.h similarity index 100% rename from bsp/m16c62p/board.h rename to bsp/m16c62p/drivers/board.h diff --git a/bsp/m16c62p/bsp.c b/bsp/m16c62p/drivers/bsp.c similarity index 100% rename from bsp/m16c62p/bsp.c rename to bsp/m16c62p/drivers/bsp.c diff --git a/bsp/m16c62p/bsp.h b/bsp/m16c62p/drivers/bsp.h similarity index 100% rename from bsp/m16c62p/bsp.h rename to bsp/m16c62p/drivers/bsp.h diff --git a/bsp/m16c62p/interrupts.S b/bsp/m16c62p/drivers/interrupts_gcc.S similarity index 100% rename from bsp/m16c62p/interrupts.S rename to bsp/m16c62p/drivers/interrupts_gcc.S diff --git a/bsp/m16c62p/interrupts.asm b/bsp/m16c62p/drivers/interrupts_iar.asm similarity index 100% rename from bsp/m16c62p/interrupts.asm rename to bsp/m16c62p/drivers/interrupts_iar.asm diff --git a/bsp/m16c62p/iom16c62p.h b/bsp/m16c62p/drivers/iom16c62p.h similarity index 100% rename from bsp/m16c62p/iom16c62p.h rename to bsp/m16c62p/drivers/iom16c62p.h diff --git a/bsp/m16c62p/start.S b/bsp/m16c62p/drivers/start_gcc.S similarity index 100% rename from bsp/m16c62p/start.S rename to bsp/m16c62p/drivers/start_gcc.S diff --git a/bsp/m16c62p/cstartup.asm b/bsp/m16c62p/drivers/start_iar.asm similarity index 100% rename from bsp/m16c62p/cstartup.asm rename to bsp/m16c62p/drivers/start_iar.asm diff --git a/bsp/m16c62p/uart.c b/bsp/m16c62p/drivers/uart.c similarity index 100% rename from bsp/m16c62p/uart.c rename to bsp/m16c62p/drivers/uart.c diff --git a/bsp/m16c62p/uart.h b/bsp/m16c62p/drivers/uart.h similarity index 100% rename from bsp/m16c62p/uart.h rename to bsp/m16c62p/drivers/uart.h diff --git a/bsp/m16c62p/vects.S b/bsp/m16c62p/drivers/vectors_gcc.S similarity index 100% rename from bsp/m16c62p/vects.S rename to bsp/m16c62p/drivers/vectors_gcc.S diff --git a/bsp/m16c62p/vectors.asm b/bsp/m16c62p/drivers/vectors_iar.asm similarity index 100% rename from bsp/m16c62p/vectors.asm rename to bsp/m16c62p/drivers/vectors_iar.asm diff --git a/bsp/m16c62p/rtt2m16c.ewp b/bsp/m16c62p/project.ewp similarity index 91% rename from bsp/m16c62p/rtt2m16c.ewp rename to bsp/m16c62p/project.ewp index 847186dd7..cf200f5e0 100644 --- a/bsp/m16c62p/rtt2m16c.ewp +++ b/bsp/m16c62p/project.ewp @@ -94,7 +94,7 @@