update the m16c62p project

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2187 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-06-26 06:41:59 +00:00
parent f1e6f2f6ca
commit bb529858fe
22 changed files with 1906 additions and 145 deletions

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -94,7 +94,7 @@
</option>
<option>
<name>GData16HeapSize</name>
<state>0x1000</state>
<state>0x400</state>
</option>
<option>
<name>GFarHeapSize</name>
@ -136,7 +136,7 @@
</option>
<option>
<name>GeneralWordAlignFunc</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>OGChipSelectMenu</name>
@ -331,9 +331,13 @@
</option>
<option>
<name>newCCIncludePaths</name>
<state>$PROJ_DIR$\</state>
<state>$PROJ_DIR$\..\..\include\</state>
<state>$PROJ_DIR$\..\..\components\finsh\</state>
<state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$\drivers</state>
<state>$PROJ_DIR$\..\..\libcpu\m16c\common</state>
<state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\..\..\libcpu\m16c\m16c62p</state>
<state>$PROJ_DIR$\applications</state>
<state>$PROJ_DIR$\..\..\components\finsh</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -594,12 +598,12 @@
</option>
<option>
<name>OutputFile</name>
<state>rtt2m16c.d34</state>
<state>project.d34</state>
</option>
<option>
<name>OutputFormat</name>
<version>11</version>
<state>12</state>
<state>27</state>
</option>
<option>
<name>FormatVariant</name>
@ -764,7 +768,7 @@
</option>
<option>
<name>ExtraOutputFile</name>
<state>rtt2m16c.mot</state>
<state>project.mot</state>
</option>
<option>
<name>ExtraOutputFormat</name>
@ -1027,7 +1031,7 @@
</option>
<option>
<name>OGChipSelectMenu</name>
<state>m16cgen Generic M16C</state>
<state></state>
</option>
<option>
<name>GeneralMisraRules98</name>
@ -1218,7 +1222,13 @@
</option>
<option>
<name>newCCIncludePaths</name>
<state></state>
<state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$\drivers</state>
<state>$PROJ_DIR$\..\..\libcpu\m16c\common</state>
<state>$PROJ_DIR$\.</state>
<state>$PROJ_DIR$\..\..\libcpu\m16c\m16c62p</state>
<state>$PROJ_DIR$\applications</state>
<state>$PROJ_DIR$\..\..\components\finsh</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -1478,7 +1488,7 @@
</option>
<option>
<name>OutputFile</name>
<state>rtt2m16c.dbg</state>
<state></state>
</option>
<option>
<name>OutputFormat</name>
@ -1774,103 +1784,70 @@
</settings>
</configuration>
<group>
<name>bsp</name>
<group>
<name>m16c62p</name>
<name>Applications</name>
<file>
<name>$PROJ_DIR$\application.c</name>
<name>$PROJ_DIR$\applications\application.c</name>
</file>
<file>
<name>$PROJ_DIR$\board.c</name>
</file>
<file>
<name>$PROJ_DIR$\bsp.c</name>
</file>
<file>
<name>$PROJ_DIR$\cstartup.asm</name>
</file>
<file>
<name>$PROJ_DIR$\interrupts.asm</name>
</file>
<file>
<name>$PROJ_DIR$\lnkm30627fhp.xcl</name>
</file>
<file>
<name>$PROJ_DIR$\rtconfig.h</name>
</file>
<file>
<name>$PROJ_DIR$\startup.c</name>
</file>
<file>
<name>$PROJ_DIR$\uart.c</name>
</file>
<file>
<name>$PROJ_DIR$\vectors.asm</name>
<name>$PROJ_DIR$\applications\startup.c</name>
</file>
</group>
<group>
<name>Drivers</name>
<file>
<name>$PROJ_DIR$\drivers\board.c</name>
</file>
<file>
<name>$PROJ_DIR$\drivers\bsp.c</name>
</file>
<file>
<name>$PROJ_DIR$\drivers\interrupts_iar.asm</name>
</file>
<file>
<name>$PROJ_DIR$\drivers\start_iar.asm</name>
</file>
<file>
<name>$PROJ_DIR$\drivers\uart.c</name>
</file>
<file>
<name>$PROJ_DIR$\drivers\vectors_iar.asm</name>
</file>
</group>
<group>
<name>finsh</name>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\cmd.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_compiler.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_error.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_error.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_heap.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_heap.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_init.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_node.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_node.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_ops.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_ops.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_parser.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_parser.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_token.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_token.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_var.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_var.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_vm.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\finsh_vm.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\components\finsh\shell.c</name>
</file>
@ -1879,19 +1856,7 @@
</file>
</group>
<group>
<name>include</name>
<file>
<name>$PROJ_DIR$\..\..\include\rtdef.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\include\rthw.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\include\rtthread.h</name>
</file>
</group>
<group>
<name>kernel</name>
<name>Kernel</name>
<file>
<name>$PROJ_DIR$\..\..\src\clock.c</name>
</file>
@ -1910,9 +1875,6 @@
<file>
<name>$PROJ_DIR$\..\..\src\kservice.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\src\kservice.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\src\mem.c</name>
</file>
@ -1925,9 +1887,6 @@
<file>
<name>$PROJ_DIR$\..\..\src\scheduler.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\src\slab.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\src\thread.c</name>
</file>
@ -1936,11 +1895,7 @@
</file>
</group>
<group>
<name>libcpu</name>
<group>
<name>m16c</name>
<group>
<name>m16c62p</name>
<name>M16C62P</name>
<file>
<name>$PROJ_DIR$\..\..\libcpu\m16c\m16c62p\context_iar.asm</name>
</file>
@ -1948,8 +1903,6 @@
<name>$PROJ_DIR$\..\..\libcpu\m16c\m16c62p\cpuport.c</name>
</file>
</group>
</group>
</group>
</project>

View File

@ -2,7 +2,7 @@
<workspace>
<project>
<path>$WS_DIR$\rtt2m16c.ewp</path>
<path>$WS_DIR$\project.ewp</path>
</project>
<batchBuild/>
</workspace>

View File

@ -1,7 +1,7 @@
/*
* File : readme.txt
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
* COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@ -43,31 +43,36 @@ Directory Hierarchy:
/rt-thread
/bsp
/m16c62p
/applications
/application.c - init led task
/startup.c - rt-thread start, include main()
/drivers
/board.c - hardware init, init uart0
/board.h
/bsp.c - include led_init(), mcu_init(), timer0_init()
/bsp.h
/cstartup.asm - assembly start
/interrupts.asm - include time0 interrupt handler, uart0 interrupt handler
/lnkm30627fhp.xcl - IAR link file for m16c62p(m30627fhp)
/rtconfig.h - rt-thread config file
/rtconfig.py - SCONS config file
/rtt2m16c.dep - IAR project file
/rtt2m16c.ewd - IAR project file
/rtt2m16c.ewp - IAR project file
/rtt2m16c.eww - IAR project file
/SConsscript - SCONS script file
/SConstruct - SCONS struct file
/startup.c - rt-thread start, include main()
/uart.c - implement uart0 device
/uart.h
/vectors.asm - relocatable exception vector table
/start_iar.asm - assembly start of iar
/interrupts_iar.asm - include time0 interrupt handler, uart0 interrupt handler
/vectors_iar.asm - relocatable exception vector table
/start_gcc.asm - assembly start of gcc
/interrupts_gcc.asm - include time0 interrupt handler, uart0 interrupt handler
/vectors_gcc.asm - relocatable exception vector table
/lnkm30627fhp.xcl - IAR link file for m16c62p(m30627fhp)
/m16c62p.ld - GCC link file for m16c62p(m30627fhp)
/rtconfig.h - rt-thread config file
/rtconfig.py - SCONS config file
/project.ewp - IAR project file
/project.eww - IAR project file
/SConsscript - SCONS script file
/SConstruct - SCONS struct file
/libcpu
/m16c
/m16c62p
/context_iar.asm - rt-thread context switch, used by IAR project
/context_iar.S - rt-thread context switch, used by SCONS
/context_iar.S - rt-thread context switch, used by SCONS + iar
/context_gcc.S - rt-thread context switch, used by SCONS + gcc
/interrupt.c
/stack.c - rt-thread stack initlization
@ -85,3 +90,8 @@ there are two ways to build the renesase M16C project:
#set PATH=C:\Python27\Scripts;%PATH%
#scons -c
#scons -j 2
3, crate IAR project with template project
#set PATH=C:\Python27\Scripts;%PATH%
#scons --target=iar -s
add the context_iar.asm to M16C62P, and remove the context_iar.S

1776
bsp/m16c62p/template.ewp Normal file

File diff suppressed because it is too large Load Diff