diff options
| author | bernard.xiong <[email protected]> | 2011-03-17 09:14:38 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2011-03-17 09:14:38 +0000 |
| commit | b5fbd467765e062d293e9e22a033ca6665210627 (patch) | |
| tree | 1ee5821b7be358e2763b40113429df4eea718d47 /bsp | |
| parent | 24dfbe437de3b96e78298206e6e62c1dc975c4f8 (diff) | |
add GNU GCC support in LPC2478.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1333 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/lpc2478/SConscript | 9 | ||||
| -rw-r--r-- | bsp/lpc2478/SConstruct | 11 | ||||
| -rw-r--r-- | bsp/lpc2478/application.c | 46 | ||||
| -rw-r--r-- | bsp/lpc2478/board.c | 63 | ||||
| -rw-r--r-- | bsp/lpc2478/lowlevel.S | 0 | ||||
| -rw-r--r-- | bsp/lpc2478/lpc2478_rom.lds | 227 | ||||
| -rw-r--r-- | bsp/lpc2478/project.Uv2 | 143 | ||||
| -rw-r--r-- | bsp/lpc2478/rtconfig.h | 9 | ||||
| -rw-r--r-- | bsp/lpc2478/rtconfig.py | 5 | ||||
| -rw-r--r-- | bsp/lpc2478/startup.c | 12 |
10 files changed, 291 insertions, 234 deletions
diff --git a/bsp/lpc2478/SConscript b/bsp/lpc2478/SConscript index 5d3d95124c..291cde94ea 100644 --- a/bsp/lpc2478/SConscript +++ b/bsp/lpc2478/SConscript @@ -3,15 +3,8 @@ Import('RTT_ROOT') from building import *
src_bsp = ['application.c', 'startup.c', 'board.c']
-src_drv = []
-if GetDepend('RT_USING_DFS'):
- src_drv += ['sd.c', 'spi.c']
-
-if GetDepend('RT_USING_LWIP'):
- src_drv += ['emac.c']
-
-src = File(src_bsp + src_drv)
+src = File(src_bsp)
CPPPATH = [RTT_ROOT + '/bsp/lpc2478']
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
diff --git a/bsp/lpc2478/SConstruct b/bsp/lpc2478/SConstruct index 760c3bbdac..15a893bcdf 100644 --- a/bsp/lpc2478/SConstruct +++ b/bsp/lpc2478/SConstruct @@ -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-lpc2478.' + rtconfig.TARGET_EXT
+TARGET = 'rtthread-lpc.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
@@ -21,15 +21,6 @@ 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)
-
-# 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/lpc2478/application.c b/bsp/lpc2478/application.c index 5854fad804..1f92fc7b8c 100644 --- a/bsp/lpc2478/application.c +++ b/bsp/lpc2478/application.c @@ -18,54 +18,8 @@ * @addtogroup LPC2478 */ /*@{*/ - -char thread1_stack[512]; -char thread2_stack[512]; - -struct rt_thread thread1; -struct rt_thread thread2; - -void thread1_entry(void* parameter) -{ - int i; - - while (1) - { - for (i = 0; i < 10; i ++) - { - rt_kprintf("%d\n", i); - rt_thread_delay(100); - } - } -} - -void thread2_entry(void* parameter) -{ - int count = 0; - while (1) - { - rt_kprintf("Thread2 count:%d\n", count++); - rt_thread_delay(50); - } -} - int rt_application_init() { - rt_thread_init(&thread1, - "thread1", - thread1_entry, RT_NULL, - &thread1_stack[0], sizeof(thread1_stack), - 20, 10); - - rt_thread_init(&thread2, - "thread2", - thread2_entry, RT_NULL, - &thread2_stack[0], sizeof(thread2_stack), - 25, 8); - - rt_thread_startup(&thread1); - rt_thread_startup(&thread2); - return 0; } diff --git a/bsp/lpc2478/board.c b/bsp/lpc2478/board.c index e90a2de875..9ed24d28bd 100644 --- a/bsp/lpc2478/board.c +++ b/bsp/lpc2478/board.c @@ -18,9 +18,9 @@ #include <LPC24xx.h> #include "board.h" -/* #define RT_BOARD_DEBUG */ +#define DATA_COUNT 14400000/RT_TICK_PER_SECOND /* T0MR0 = delayInMs * (Fpclk / 1000); */
-#define DATA_COUNT 14400000/RT_TICK_PER_SECOND /* T0MR0 = delayInMs * (Fpclk / 1000); */ +extern void rt_hw_serial_init(void); /** * @addtogroup LPC2478 @@ -29,70 +29,21 @@ void rt_timer_handler(int vector) { -#ifdef BOARD_DEBUG - rt_kprintf("timer handler, increase a tick\n"); -#endif - T0IR |= 0x01; /* clear interrupt flag */ rt_tick_increase(); VICVectAddr = 0; /* Acknowledge Interrupt */ } - -/** - * This function is used to display a string on console, normally, it's - * invoked by rt_kprintf - * - * @param str the displayed string - */ -void rt_hw_console_output(const char* str) -{ - while (*str) - { - if (*str=='\n') - { - while (!(U0LSR & 0x20)); - U0THR = '\r'; - } - - while (!(U0LSR & 0x20)); - U0THR = *str; - - str ++; - } -} - -#define BAUD_RATE 115200 -#define U0PINS 0x50 -void rt_hw_console_init() -{ - rt_uint32_t fdiv; - - /* Enable RxD and TxD pins */ - PINSEL0 = U0PINS; - - /* 8 bits, no Parity, 1 Stop bit */ - U0LCR = 0x83; - - /* Setup Baudrate */ - fdiv = ( PCLK / 16 ) / BAUD_RATE ; /*baud rate */ - U0DLM = fdiv / 256; - U0DLL = fdiv % 256; - U0FCR = 0x00; /* Enable and reset TX and RX FIFO. */ - U0LCR = 0x03; /* DLAB = 0 */ - - /* DLAB = 0 */ - U0LCR = 0x03; -} - /** * This function will init LPC2478 board */ void rt_hw_board_init() { - /* init console for rt_kprintf function */ - rt_hw_console_init(); - +#if defined(RT_USING_DEVICE) && defined(RT_USING_UART1)
+ rt_hw_serial_init();
+ rt_console_set_device("uart1");
+#endif
+
T0IR = 0xff; T0TC = 0; T0MCR = 0x03; diff --git a/bsp/lpc2478/lowlevel.S b/bsp/lpc2478/lowlevel.S deleted file mode 100644 index e69de29bb2..0000000000 --- a/bsp/lpc2478/lowlevel.S +++ /dev/null diff --git a/bsp/lpc2478/lpc2478_rom.lds b/bsp/lpc2478/lpc2478_rom.lds index 78f741aaf6..ced52b9fc8 100644 --- a/bsp/lpc2478/lpc2478_rom.lds +++ b/bsp/lpc2478/lpc2478_rom.lds @@ -1,105 +1,144 @@ -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) +/* + * linker script for LPC2478 with GNU ld + * bernard.xiong 2011-03-17 + */ + +/* Program Entry, set to mark it as "used" and avoid gc */ +MEMORY +{ + CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 + DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000 +} ENTRY(_start) + SECTIONS { - . = 0x00000000; + .text : + { + *(.init) + *(.text) + *(.text.*) /* remaining code */ + *(.rodata) /* read-only data (constants) */ + *(.rodata*) + *(.glue_7) + *(.glue_7t) + *(.gnu.linkonce.t*) + + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + . = ALIGN(4); + + . = ALIGN(4); + _etext = .; + } > CODE = 0 + + . = ALIGN(4); + .ctors : + { + PROVIDE(__ctors_start__ = .); + KEEP(*(SORT(.ctors.*))) + KEEP(*(.ctors)) + PROVIDE(__ctors_end__ = .); + } > CODE + + .dtors : + { + PROVIDE(__dtors_start__ = .); + KEEP(*(SORT(.dtors.*))) + KEEP(*(.dtors)) + PROVIDE(__dtors_end__ = .); + } > CODE + + /* .ARM.exidx is sorted, so has to go in its own output section. */ + __exidx_start = .; + .ARM.exidx : + { + *(.ARM.exidx* .gnu.linkonce.armexidx.*) + + /* This is used by the startup in order to initialize the .data secion */ + _sidata = .; + } > CODE + __exidx_end = .; + + /* .data section which is used for initialized data */ + .data : AT (_sidata) + { + . = ALIGN(4); + /* This is used by the startup in order to initialize the .data secion */ + _sdata = . ; + + *(.data) + *(.data.*) + *(.gnu.linkonce.d*) - __text_start = .; - .text : - { - *(.vectors) - *(.text) - *(.text.*) - } =0 + . = ALIGN(4); + /* This is used by the startup in order to initialize the .data secion */ + _edata = . ; + } >DATA + __data_end = .; - __text_end = .; - - __rodata_start = .; - .rodata : - { - *(.rodata) - *(.rodata.*) - /* section information for finsh shell */ - . = ALIGN(4); - __fsymtab_start = .; - KEEP(*(FSymTab)) - __fsymtab_end = .; - . = ALIGN(4); - __vsymtab_start = .; - KEEP(*(VSymTab)) - __vsymtab_end = .; - . = ALIGN(4); - } - __rodata_end = .; - - . = 0x40000000; /*Data in SRAM*/ - - __data_start = .; - . = ALIGN(4); - .data : - { - *(.data) - *(.data.*) - } - __data_end = .; + .noinit : + { + *(.bss.noinit) + } > DATA - . = ALIGN(4); - __bss_start = __data_end; - .bss : - { - *(.bss) - *(.bss.*) - *(COMMON) - . = ALIGN(4); - } - . = ALIGN(4); - __bss_end = .; + __bss_start = .; + .bss : + { + . = ALIGN(4); + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; - . = ALIGN(4); - __UndStack_start = __bss_end; - .UndStack : { *(.UndStack) } - __UndStack_end = ( __UndStack_start + 0x00000100 ); - - . = ALIGN(4); - __IRQStack_start = __UndStack_end; - .IRQStack : { *(.IRQStack) } - __IRQStack_end = ( __IRQStack_start + 0x00000400 ); - - . = ALIGN(4); - __FIQStack_start = __IRQStack_end; - .FIQStack : { *(.FIQStack) } - __FIQStack_end = ( __FIQStack_start + 0x00000400 ); - - . = ALIGN(4); - __SVCStack_start = __FIQStack_end; - .SVCStack : { *(.SVCStack) } - __SVCStack_end = ( __SVCStack_start + 0x00000400 ); - - . = ALIGN(4); - __ABTStack_start = __SVCStack_end; - .ABTStack : { *(.ABTStack) } - __ABTStack_end = ( __ABTStack_start + 0x00000400 ); - - . = ALIGN(4); - __USRStack_start = __ABTStack_end; - .USRStack : { *(.USRStack) } - __USRStack_end = ( __USRStack_start + 0x00000400 ); - - . = ALIGN(4); - __Heap_start = __USRStack_end; - .Heap : { *(.Heap) } - __Heap_end = (__Heap_start + 0x00004000); + *(.bss) + *(COMMON) + . = ALIGN(4); + /* This is used by the startup in order to initialize the .bss secion */ + _ebss = . ; + _estack = .; + } > DATA + __bss_end = .; - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } + _end = .; - _end = .; + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + /* DWARF debug sections. + * Symbols in the DWARF debugging sections are relative to the beginning + * of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } } diff --git a/bsp/lpc2478/project.Uv2 b/bsp/lpc2478/project.Uv2 new file mode 100644 index 0000000000..05ac110f5a --- /dev/null +++ b/bsp/lpc2478/project.Uv2 @@ -0,0 +1,143 @@ +### uVision2 Project, (C) Keil Software
+### Do not modify !
+
+Target (RT-Thread LPC2478), 0x0004 // Tools: 'ARM-ADS'
+
+Group (Startup)
+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>
+
+
+Options 1,0,0 // Target 'RT-Thread LPC2478'
+ Device (LPC2478)
+ Vendor (NXP (founded by Philips))
+ Cpu (IRAM(0x40000000-0x4000FFFF) IRAM2(0x7FE00000-0x7FE03FFF) IROM(0-0x7FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
+ FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 38400 1))
+ StupF ("STARTUP\Philips\LPC2400.s" ("Philips LPC2400 Startup Code"))
+ FlashDR (UL2ARM(-U268761108 -O7 -S0 -C0 -FO15 -FD40000000 -FC800 -FN1 -FF0LPC_IAP2_512 -FS00 -FL07E000))
+ DevID (4307)
+ Rgf (LPC23xx.H)
+ Mem ()
+ C ()
+ A ()
+ RL ()
+ OH ()
+ DBC_IFX ()
+ DBC_CMS ()
+ DBC_AMS ()
+ DBC_LMS ()
+ UseEnv=0
+ EnvBin ()
+ EnvInc ()
+ EnvLib ()
+ EnvReg (Philips\)
+ OrgReg (Philips\)
+ TgStat=16
+ OutDir (.\obj\)
+ OutName (rtthread-lpc)
+ GenApp=1
+ GenLib=0
+ GenHex=0
+ Debug=1
+ Browse=1
+ LstDir (.\obj\)
+ HexSel=1
+ MG32K=0
+ TGMORE=0
+ RunUsr 0 0 <>
+ RunUsr 1 0 <>
+ BrunUsr 0 0 <>
+ BrunUsr 1 0 <>
+ CrunUsr 0 0 <>
+ CrunUsr 1 0 <>
+ SVCSID <>
+ GLFLAGS=1790
+ ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ACPUTYP (ARM7TDMI)
+ RVDEV ()
+ ADSTFLGA { 0,12,16,2,99,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMADSIRAM { 0,0,0,0,64,0,0,1,0 }
+ OCMADSIROM { 1,0,0,0,0,0,0,8,0 }
+ OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
+ OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,1,0,0,0,0,224,127,0,64,0,0 }
+ RV_STAVEC ()
+ ADSCCFLG { 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ADSCMISC ()
+ ADSCDEFN ()
+ ADSCUDEF ()
+ ADSCINCD (..\..\include;..\..\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 ()
+ ADSAUDEF ()
+ ADSAINCD ()
+ PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ IncBld=1
+ AlwaysBuild=0
+ GenAsm=0
+ AsmAsm=0
+ PublicsOnly=0
+ StopCode=3
+ CustArgs ()
+ LibMods ()
+ ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ADSLDTA (0x00000000)
+ ADSLDDA (0x10000000)
+ ADSLDSC ()
+ ADSLDIB ()
+ ADSLDIC ()
+ 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)()()()
+ 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))
+ FLASH4 ()
+EndOpt
+
diff --git a/bsp/lpc2478/rtconfig.h b/bsp/lpc2478/rtconfig.h index 449d4c3ef1..f4495c1b5d 100644 --- a/bsp/lpc2478/rtconfig.h +++ b/bsp/lpc2478/rtconfig.h @@ -67,6 +67,7 @@ #define RT_UART_RX_BUFFER_SIZE 64
/* SECTION: Console options */
+#define RT_USING_CONSOLE
/* the buffer size of console*/
#define RT_CONSOLEBUF_SIZE 128
@@ -77,14 +78,6 @@ #define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
-/* SECTION: a mini libc */
-/* Using mini libc library*/
-/* #define RT_USING_MINILIBC */
-
-/* SECTION: C++ support */
-/* Using C++ support*/
-/* #define RT_USING_CPLUSPLUS */
-
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
/* Using lighweight TCP/IP protocol stack*/
/* #define RT_USING_LWIP */
diff --git a/bsp/lpc2478/rtconfig.py b/bsp/lpc2478/rtconfig.py index fcad8d9619..7f7cf363e9 100644 --- a/bsp/lpc2478/rtconfig.py +++ b/bsp/lpc2478/rtconfig.py @@ -12,11 +12,6 @@ elif CROSS_TOOL == 'keil': BUILD = 'debug'
if PLATFORM == 'gcc':
- print "========================="
- print "Can not support GNU GCC!!"
- print "========================="
- exit (0)
-
# toolchains
PREFIX = 'arm-none-eabi-'
CC = PREFIX + 'gcc'
diff --git a/bsp/lpc2478/startup.c b/bsp/lpc2478/startup.c index 6024805c55..cde4d4552a 100644 --- a/bsp/lpc2478/startup.c +++ b/bsp/lpc2478/startup.c @@ -73,14 +73,7 @@ void rtthread_startup(void) /* init scheduler system */ rt_system_scheduler_init(); - -#ifdef RT_USING_DEVICE - /* init hardware serial device */ - rt_hw_serial_init(); - /*init all registed devices*/ - rt_device_init_all(); -#endif /* init application */ rt_application_init(); @@ -106,6 +99,11 @@ void rtthread_startup(void) #ifdef __CC_ARM int main(void) { + rt_uint32_t UNUSED level;
+
+ /* disable interrupt first */
+ level = rt_hw_interrupt_disable();
+
/* invoke rtthread_startup */ rtthread_startup(); |
