mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
update bsp lpc2478.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1853 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
f1b07348c2
commit
dd47ccd6ca
12 files changed
+489
-59
No files matched your search
+10
-7
@@ -1,11 +1,14 @@
|
||||
import rtconfig
|
||||
# for module compiling
|
||||
import os
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
cwd = str(Dir('#'))
|
||||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
src = File(src_bsp)
|
||||
CPPPATH = [RTT_ROOT + '/bsp/lpc2478']
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
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')
|
||||
@@ -6,7 +6,7 @@ RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread-lpc.' + rtconfig.TARGET_EXT
|
||||
TARGET = 'rtthread-lpc24xx.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
@@ -19,7 +19,7 @@ Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
cwd = os.path.join(str(Dir('#')), 'applications')
|
||||
src = Glob('*.c')
|
||||
CPPPATH = [cwd, str(Dir('#'))]
|
||||
|
||||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,22 @@
|
||||
import copy
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = Glob('*.c')
|
||||
|
||||
# remove no need file.
|
||||
if GetDepend('RT_USING_LWIP') == False:
|
||||
src_need_remove = ['dm9000.c'] # need remove file list.
|
||||
SrcRemove(src, src_need_remove)
|
||||
|
||||
if GetDepend('RT_USING_DFS') == False:
|
||||
src_need_remove = ['sd.c'] # need remove file list.
|
||||
SrcRemove(src, src_need_remove)
|
||||
|
||||
CPPPATH = [cwd]
|
||||
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
File renamed without changes.
@@ -15,6 +15,10 @@
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
/* RT_USING_UART */
|
||||
#define RT_USING_UART1
|
||||
#define RT_USING_UART2
|
||||
#define RT_UART_RX_BUFFER_SIZE 64
|
||||
void rt_hw_board_init(void);
|
||||
void rt_hw_led_set(rt_uint32_t led);
|
||||
void rt_hw_led_flash(void);
|
||||
File diff suppressed because it is too large.
Load diff
+43
-45
@@ -3,52 +3,50 @@
|
||||
|
||||
Target (RT-Thread LPC2478), 0x0004 // Tools: 'ARM-ADS'
|
||||
|
||||
Group (Startup)
|
||||
Group (Applications)
|
||||
Group (Drivers)
|
||||
Group (Kernel)
|
||||
Group (LPC24XX)
|
||||
Group (finsh)
|
||||
|
||||
File 1,1,<.\application.c><application.c>
|
||||
File 1,1,<.\startup.c><startup.c>
|
||||
File 1,1,<.\board.c><board.c>
|
||||
File 2,1,<..\..\src\clock.c><clock.c>
|
||||
File 2,1,<..\..\src\device.c><device.c>
|
||||
File 2,1,<..\..\src\idle.c><idle.c>
|
||||
File 2,1,<..\..\src\ipc.c><ipc.c>
|
||||
File 2,1,<..\..\src\irq.c><irq.c>
|
||||
File 2,1,<..\..\src\kservice.c><kservice.c>
|
||||
File 2,1,<..\..\src\mem.c><mem.c>
|
||||
File 2,1,<..\..\src\mempool.c><mempool.c>
|
||||
File 2,1,<..\..\src\module.c><module.c>
|
||||
File 2,1,<..\..\src\object.c><object.c>
|
||||
File 2,1,<..\..\src\rtm.c><rtm.c>
|
||||
File 2,1,<..\..\src\scheduler.c><scheduler.c>
|
||||
File 2,1,<..\..\src\slab.c><slab.c>
|
||||
File 2,1,<..\..\src\thread.c><thread.c>
|
||||
File 2,1,<..\..\src\timer.c><timer.c>
|
||||
File 3,1,<..\..\libcpu\arm\lpc24xx\cpu.c><cpu.c>
|
||||
File 3,1,<..\..\libcpu\arm\lpc24xx\interrupt.c><interrupt.c>
|
||||
File 3,1,<..\..\libcpu\arm\lpc24xx\serial.c><serial.c>
|
||||
File 3,1,<..\..\libcpu\arm\lpc24xx\stack.c><stack.c>
|
||||
File 3,1,<..\..\libcpu\arm\lpc24xx\trap.c><trap.c>
|
||||
File 3,2,<..\..\libcpu\arm\lpc24xx\context_rvds.S><context_rvds.S>
|
||||
File 3,2,<..\..\libcpu\arm\lpc24xx\start_rvds.S><start_rvds.S>
|
||||
File 3,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
|
||||
File 3,1,<..\..\libcpu\arm\common\div0.c><div0.c>
|
||||
File 3,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
|
||||
File 4,1,<..\..\components\finsh\cmd.c><cmd.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
|
||||
File 4,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
|
||||
File 4,1,<..\..\components\finsh\shell.c><shell.c>
|
||||
File 4,1,<..\..\components\finsh\symbol.c><symbol.c>
|
||||
File 1,1,<applications\application.c><application.c>
|
||||
File 1,1,<applications\startup.c><startup.c>
|
||||
File 2,1,<drivers\board.c><board.c>
|
||||
File 2,1,<drivers\serial.c><serial.c>
|
||||
File 3,1,<..\..\src\device.c><device.c>
|
||||
File 3,1,<..\..\src\thread.c><thread.c>
|
||||
File 3,1,<..\..\src\scheduler.c><scheduler.c>
|
||||
File 3,1,<..\..\src\timer.c><timer.c>
|
||||
File 3,1,<..\..\src\irq.c><irq.c>
|
||||
File 3,1,<..\..\src\kservice.c><kservice.c>
|
||||
File 3,1,<..\..\src\clock.c><clock.c>
|
||||
File 3,1,<..\..\src\object.c><object.c>
|
||||
File 3,1,<..\..\src\mempool.c><mempool.c>
|
||||
File 3,1,<..\..\src\ipc.c><ipc.c>
|
||||
File 3,1,<..\..\src\idle.c><idle.c>
|
||||
File 3,1,<..\..\src\mem.c><mem.c>
|
||||
File 4,1,<..\..\libcpu\arm\lpc24xx\cpu.c><cpu.c>
|
||||
File 4,1,<..\..\libcpu\arm\lpc24xx\interrupt.c><interrupt.c>
|
||||
File 4,1,<..\..\libcpu\arm\lpc24xx\stack.c><stack.c>
|
||||
File 4,1,<..\..\libcpu\arm\lpc24xx\trap.c><trap.c>
|
||||
File 4,2,<..\..\libcpu\arm\lpc24xx\context_rvds.S><context_rvds.S>
|
||||
File 4,2,<..\..\libcpu\arm\lpc24xx\start_rvds.S><start_rvds.S>
|
||||
File 4,1,<..\..\libcpu\arm\common\backtrace.c><backtrace.c>
|
||||
File 4,1,<..\..\libcpu\arm\common\div0.c><div0.c>
|
||||
File 4,1,<..\..\libcpu\arm\common\showmem.c><showmem.c>
|
||||
File 5,1,<..\..\components\finsh\cmd.c><cmd.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_compiler.c><finsh_compiler.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_error.c><finsh_error.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_heap.c><finsh_heap.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_init.c><finsh_init.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_node.c><finsh_node.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_ops.c><finsh_ops.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_parser.c><finsh_parser.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_token.c><finsh_token.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_var.c><finsh_var.c>
|
||||
File 5,1,<..\..\components\finsh\finsh_vm.c><finsh_vm.c>
|
||||
File 5,1,<..\..\components\finsh\shell.c><shell.c>
|
||||
File 5,1,<..\..\components\finsh\symbol.c><symbol.c>
|
||||
|
||||
|
||||
Options 1,0,0 // Target 'RT-Thread LPC2478'
|
||||
@@ -109,7 +107,7 @@ Options 1,0,0 // Target 'RT-Thread LPC2478'
|
||||
ADSCMISC ()
|
||||
ADSCDEFN ()
|
||||
ADSCUDEF ()
|
||||
ADSCINCD (..\..\include;..\..\libcpu\arm\common;..\..\components\finsh;..\..\libcpu\arm\lpc24xx;.)
|
||||
ADSCINCD (..\..\include;drivers;.;applications;..\..\libcpu\arm\common;..\..\components\finsh;..\..\libcpu\arm\lpc24xx)
|
||||
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSAMISC ()
|
||||
ADSADEFN ()
|
||||
@@ -130,11 +128,11 @@ Options 1,0,0 // Target 'RT-Thread LPC2478'
|
||||
ADSLDSC ()
|
||||
ADSLDIB ()
|
||||
ADSLDIC ()
|
||||
ADSLDMC ( --keep __fsym_* --keep __vsym_*)
|
||||
ADSLDMC ( --keep __fsym_* --keep __vsym_* )
|
||||
ADSLDIF ()
|
||||
ADSLDDW ()
|
||||
OPTDL (SARM.DLL)(-cLPC24xx)(DARMP.DLL)(-pLPC2478)(SARM.DLL)()(TARMP.DLL)(-pLPC2478)
|
||||
OPTDBG 48125,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
|
||||
OPTDBG 48126,7,()()()()()()()()()() (Segger\JL2CM3.dll)()()()
|
||||
FLASH1 { 9,0,0,0,1,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2ARM.DLL)
|
||||
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 38400 1))
|
||||
|
||||
@@ -63,8 +63,6 @@
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System*/
|
||||
#define RT_USING_DEVICE
|
||||
#define RT_USING_UART1
|
||||
#define RT_UART_RX_BUFFER_SIZE 64
|
||||
|
||||
/* SECTION: Console options */
|
||||
#define RT_USING_CONSOLE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# toolchains options
|
||||
ARCH='arm'
|
||||
CPU='lpc24xx'
|
||||
CROSS_TOOL='gcc'
|
||||
CROSS_TOOL='keil'
|
||||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
@@ -9,12 +9,16 @@ if CROSS_TOOL == 'gcc':
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armcc'
|
||||
EXEC_PATH = 'E:/Keil'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
PLATFORM = 'iar'
|
||||
EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 6.0/arm/bin'
|
||||
BUILD = 'debug'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'arm-none-eabi-'
|
||||
CC = PREFIX + 'gcc'
|
||||
CXX = PREFIX + 'g++'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
@@ -23,8 +27,8 @@ if PLATFORM == 'gcc':
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mcpu=arm7tdmi'
|
||||
CFLAGS = DEVICE
|
||||
DEVICE = ' -mcpu=arm7tdmi-s'
|
||||
CFLAGS = DEVICE + ' -DRT_USING_MINILIBC'
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lpc2478.map,-cref,-u,Reset_Handler -T lpc2478_rom.lds'
|
||||
|
||||
@@ -42,6 +46,7 @@ if PLATFORM == 'gcc':
|
||||
elif PLATFORM == 'armcc':
|
||||
# toolchains
|
||||
CC = 'armcc'
|
||||
CXX = 'armcc'
|
||||
AS = 'armasm'
|
||||
AR = 'armar'
|
||||
LINK = 'armlink'
|
||||
|
||||
Reference in new issue
Block a user