diff --git a/bsp/lpc2148/application.c b/bsp/lpc2148/application.c index 6c1f0113cc..9eaeb365c4 100644 --- a/bsp/lpc2148/application.c +++ b/bsp/lpc2148/application.c @@ -1,23 +1,23 @@ -/* - * File : app.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Development Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2006-06-05 Bernard the first version +/* + * File : app.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006, RT-Thread Development Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2006-06-05 Bernard the first version */ - + #include #include - -/** - * @addtogroup LPC2148 - */ + +/** + * @addtogroup LPC2148 + */ /*@{*/ #ifdef RT_USING_DFS @@ -42,99 +42,100 @@ /* thread phase init */ void rt_init_thread_entry(void *parameter) { -/* Filesystem Initialization */ + /* Filesystem Initialization */ #ifdef RT_USING_DFS - { - /* init the device filesystem */ - dfs_init(); - /* init the efsl filesystam*/ - efsl_init(); + { + /* init the device filesystem */ + dfs_init(); + /* init the efsl filesystam*/ + efsl_init(); - /* mount sd card fat partition 1 as root directory */ - if (dfs_mount("sd0", "/", "efs", 0, 0) == 0) - rt_kprintf("File System initialized!\n"); - else - rt_kprintf("File System init failed!\n"); - } + /* mount sd card fat partition 1 as root directory */ + if (dfs_mount("sd0", "/", "efs", 0, 0) == 0) + rt_kprintf("File System initialized!\n"); + else + rt_kprintf("File System init failed!\n"); + } #endif -/* LwIP Initialization */ + /* LwIP Initialization */ #ifdef RT_USING_LWIP - { - extern void lwip_sys_init(void); - - /* init lwip system */ - lwip_sys_init(); - rt_kprintf("TCP/IP initialized!\n"); - } + { + extern void lwip_sys_init(void); + + /* init lwip system */ + lwip_sys_init(); + rt_kprintf("TCP/IP initialized!\n"); + } #endif } - + /************** LED BLINK *******************/ #include "lpc214x.h" -#define LED1 ( 1<<16) //P1 -#define LED2 ( 1<<17) //P1 -#define LED3 ( 1<<18) //P1 -#define LED4 ( 1<<19) //P1 -char thread3_stack[512]; -struct rt_thread thread3; -void thread3_entry(void* parameter) +#define LED1 (1<<16) //P1 +#define LED2 (1<<17) //P1 +#define LED3 (1<<18) //P1 +#define LED4 (1<<19) //P1 +char thread_led1_stack[512]; +struct rt_thread thread_led1; +void thread_led1_entry(void* parameter) { - volatile unsigned int i; - IO1DIR |= LED1; - while(1) - { - IO1CLR = LED1; - rt_thread_delay(20); - IO1SET = LED1; - rt_thread_delay(20); - } + volatile unsigned int i; + IO1DIR |= LED1; + while(1) + { + IO1CLR = LED1; + rt_thread_delay( RT_TICK_PER_SECOND/3 ); /* delay 0.3s */ + IO1SET = LED1; + rt_thread_delay( RT_TICK_PER_SECOND/3 ); + } } -char thread4_stack[512]; -struct rt_thread thread4; -void thread4_entry(void* parameter) +char thread_led2_stack[512]; +struct rt_thread thread_led2; +void thread_led2_entry(void* parameter) { - volatile unsigned int i; - IO1DIR |= LED2; - while(1) - { - IO1CLR = LED2; - rt_thread_delay(30); - IO1SET = LED2; - rt_thread_delay(30); - } + volatile unsigned int i; + IO1DIR |= LED2; + while(1) + { + IO1CLR = LED2; + rt_thread_delay( RT_TICK_PER_SECOND/2 ); /* delay 0.5s */ + IO1SET = LED2; + rt_thread_delay( RT_TICK_PER_SECOND/2 ); + } } /************** LED BLINK *******************/ - -int rt_application_init() -{ - rt_thread_init(&thread3, - "led1", - thread3_entry, RT_NULL, - &thread3_stack[0], sizeof(thread3_stack), - 20, 10); - - rt_thread_init(&thread4, - "led2", - thread4_entry, RT_NULL, - &thread4_stack[0], sizeof(thread4_stack), - 25, 8); - rt_thread_startup(&thread3); - rt_thread_startup(&thread4); - { - rt_thread_t init_thread; - - init_thread = rt_thread_create("init", - rt_init_thread_entry, RT_NULL, - 1024, 8, 5); - rt_thread_startup(init_thread); - } - - rt_kprintf("enter list() to get function list!\n"); - - return 0; +int rt_application_init() +{ + rt_thread_init(&thread_led1, + "led1", + thread_led1_entry, RT_NULL, + &thread_led1_stack[0], sizeof(thread_led1_stack), + 20, 10); + + rt_thread_init(&thread_led2, + "led2", + thread_led2_entry, RT_NULL, + &thread_led2_stack[0], sizeof(thread_led2_stack), + 25, 8); + rt_thread_startup(&thread_led1); + rt_thread_startup(&thread_led2); + + /* inint SD-crad and dm9000 */ + { + rt_thread_t init_thread; + + init_thread = rt_thread_create("init", + rt_init_thread_entry, RT_NULL, + 1024, 8, 5); + rt_thread_startup(init_thread); + } + + rt_kprintf("\r\nenter list() to get function list!\r\n"); + + return 0; } - -/*@}*/ + +/*@}*/ diff --git a/bsp/lpc2148/project.Opt b/bsp/lpc2148/project.Opt index 55b3f79ea0..d8e0936042 100644 --- a/bsp/lpc2148/project.Opt +++ b/bsp/lpc2148/project.Opt @@ -10,106 +10,52 @@ CppX (*.cpp) DaveTm { 0,0,0,0,0,0,0,0 } -Target (RT-Thread/LPC2148), 0x0004 // Tools: 'ARM-ADS' +Target (RT-Thread-LPC2148), 0x0004 // Tools: 'ARM-ADS' GRPOPT 1,(Startup),1,0,0 GRPOPT 2,(Kernel),0,0,0 GRPOPT 3,(LPC214x),0,0,0 GRPOPT 4,(finsh),0,0,0 -GRPOPT 5,(Filesystem),0,0,0 -GRPOPT 6,(LwIP),0,0,0 -OPTFFF 1,1,1,150994944,0,0,0,0,<.\application.c> +OPTFFF 1,1,1,637534208,0,119,136,0,<.\application.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,110,0,0,0,145,0,0,0,100,4,0,0,240,1,0,0 } OPTFFF 1,2,1,0,0,0,0,0,<.\board.c> -OPTFFF 1,3,1,0,0,0,0,0,<.\startup.c> -OPTFFF 1,4,1,0,0,0,0,0,<.\dm9000.c> -OPTFFF 1,5,1,0,0,0,0,0,<.\sd.c> -OPTFFF 1,6,5,0,0,0,0,0,<.\rtconfig.h> -OPTFFF 2,7,1,0,0,0,0,0,<..\..\src\clock.c> -OPTFFF 2,8,1,150994944,0,0,0,0,<..\..\src\device.c> -OPTFFF 2,9,1,0,0,0,0,0,<..\..\src\ipc.c> -OPTFFF 2,10,1,0,0,0,0,0,<..\..\src\mempool.c> -OPTFFF 2,11,1,0,0,0,0,0,<..\..\src\object.c> -OPTFFF 2,12,1,0,0,0,0,0,<..\..\src\timer.c> -OPTFFF 2,13,1,0,0,0,0,0,<..\..\src\idle.c> -OPTFFF 2,14,1,0,0,0,0,0,<..\..\src\irq.c> -OPTFFF 2,15,1,0,0,0,0,0,<..\..\src\mem.c> -OPTFFF 2,16,1,0,0,0,0,0,<..\..\src\scheduler.c> -OPTFFF 2,17,1,0,0,0,0,0,<..\..\src\slab.c> -OPTFFF 2,18,1,0,0,0,0,0,<..\..\src\thread.c> -OPTFFF 2,19,1,0,0,0,0,0,<..\..\src\kservice.c> -OPTFFF 3,20,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\serial.c> -OPTFFF 3,21,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\interrupt.c> -OPTFFF 3,22,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\cpu.c> -OPTFFF 3,23,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\trap.c> -OPTFFF 3,24,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\stack.c> -OPTFFF 3,25,2,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\start_rvds.s> -OPTFFF 3,26,2,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\context_rvds.s> -OPTFFF 4,27,1,0,0,0,0,0,<..\..\finsh\finsh_compiler.c> -OPTFFF 4,28,1,0,0,0,0,0,<..\..\finsh\finsh_error.c> -OPTFFF 4,29,1,0,0,0,0,0,<..\..\finsh\finsh_heap.c> -OPTFFF 4,30,1,0,0,0,0,0,<..\..\finsh\finsh_init.c> -OPTFFF 4,31,1,0,0,0,0,0,<..\..\finsh\finsh_node.c> -OPTFFF 4,32,1,0,0,0,0,0,<..\..\finsh\finsh_ops.c> -OPTFFF 4,33,1,0,0,0,0,0,<..\..\finsh\finsh_token.c> -OPTFFF 4,34,1,0,0,0,0,0,<..\..\finsh\finsh_var.c> -OPTFFF 4,35,1,0,0,0,0,0,<..\..\finsh\finsh_vm.c> -OPTFFF 4,36,1,0,0,0,0,0,<..\..\finsh\shell.c> -OPTFFF 4,37,1,0,0,0,0,0,<..\..\finsh\symbol.c> -OPTFFF 4,38,1,0,0,0,0,0,<..\..\finsh\cmd.c> -OPTFFF 4,39,1,0,0,0,0,0,<..\..\finsh\finsh_parser.c> -OPTFFF 5,40,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_util.c> -OPTFFF 5,41,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_cache.c> -OPTFFF 5,42,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_fs.c> -OPTFFF 5,43,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_init.c> -OPTFFF 5,44,1,301989888,0,0,0,0,<..\..\filesystem\dfs\src\dfs_posix.c> -OPTFFF 5,45,1,0,0,0,0,0,<..\..\filesystem\dfs\src\dfs_raw.c> -OPTFFF 5,46,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\plibc.c> -OPTFFF 5,47,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\efs.c> -OPTFFF 5,48,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\extract.c> -OPTFFF 5,49,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\base\partition.c> -OPTFFF 5,50,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\dir.c> -OPTFFF 5,51,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fat.c> -OPTFFF 5,52,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\file.c> -OPTFFF 5,53,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c> -OPTFFF 5,54,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ls.c> -OPTFFF 5,55,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ui.c> -OPTFFF 5,56,1,0,0,0,0,0,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\time.c> -OPTFFF 6,57,1,0,0,0,0,0,<..\..\net\lwip\src\netif\etharp.c> -OPTFFF 6,58,1,150994944,0,0,0,0,<..\..\net\lwip\src\netif\ethernetif.c> -OPTFFF 6,59,1,0,0,0,0,0,<..\..\net\lwip\src\core\udp.c> -OPTFFF 6,60,1,0,0,0,0,0,<..\..\net\lwip\src\core\dhcp.c> -OPTFFF 6,61,1,0,0,0,0,0,<..\..\net\lwip\src\core\dns.c> -OPTFFF 6,62,1,0,0,0,0,0,<..\..\net\lwip\src\core\init.c> -OPTFFF 6,63,1,0,0,0,0,0,<..\..\net\lwip\src\core\memp_tiny.c> -OPTFFF 6,64,1,0,0,0,0,0,<..\..\net\lwip\src\core\netif.c> -OPTFFF 6,65,1,0,0,0,0,0,<..\..\net\lwip\src\core\pbuf.c> -OPTFFF 6,66,1,0,0,0,0,0,<..\..\net\lwip\src\core\raw.c> -OPTFFF 6,67,1,0,0,0,0,0,<..\..\net\lwip\src\core\stats.c> -OPTFFF 6,68,1,0,0,0,0,0,<..\..\net\lwip\src\core\sys.c> -OPTFFF 6,69,1,0,0,0,0,0,<..\..\net\lwip\src\core\tcp.c> -OPTFFF 6,70,1,0,0,0,0,0,<..\..\net\lwip\src\core\tcp_in.c> -OPTFFF 6,71,1,0,0,0,0,0,<..\..\net\lwip\src\core\tcp_out.c> -OPTFFF 6,72,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip_frag.c> -OPTFFF 6,73,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\autoip.c> -OPTFFF 6,74,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\icmp.c> -OPTFFF 6,75,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\igmp.c> -OPTFFF 6,76,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\inet.c> -OPTFFF 6,77,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\inet_chksum.c> -OPTFFF 6,78,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip.c> -OPTFFF 6,79,1,0,0,0,0,0,<..\..\net\lwip\src\core\ipv4\ip_addr.c> -OPTFFF 6,80,1,0,0,0,0,0,<..\..\net\lwip\src\api\tcpip.c> -OPTFFF 6,81,1,0,0,0,0,0,<..\..\net\lwip\src\api\api_lib.c> -OPTFFF 6,82,1,0,0,0,0,0,<..\..\net\lwip\src\api\api_msg.c> -OPTFFF 6,83,1,0,0,0,0,0,<..\..\net\lwip\src\api\err.c> -OPTFFF 6,84,1,0,0,0,0,0,<..\..\net\lwip\src\api\netbuf.c> -OPTFFF 6,85,1,0,0,0,0,0,<..\..\net\lwip\src\api\netdb.c> -OPTFFF 6,86,1,0,0,0,0,0,<..\..\net\lwip\src\api\netifapi.c> -OPTFFF 6,87,1,0,0,0,0,0,<..\..\net\lwip\src\api\sockets.c> -OPTFFF 6,88,1,0,0,0,0,0,<..\..\net\lwip\src\arch\sys_arch_init.c> -OPTFFF 6,89,1,0,0,0,0,0,<..\..\net\lwip\src\arch\sys_arch.c> +OPTFFF 1,3,1,33554434,0,2,18,0,<.\startup.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,44,0,0,0,58,0,0,0,46,4,0,0,112,1,0,0 } +OPTFFF 1,4,5,0,0,0,0,0,<.\rtconfig.h> +OPTFFF 2,5,1,0,0,0,0,0,<..\..\src\clock.c> +OPTFFF 2,6,1,150994944,0,0,0,0,<..\..\src\device.c> +OPTFFF 2,7,1,0,0,0,0,0,<..\..\src\ipc.c> +OPTFFF 2,8,1,0,0,0,0,0,<..\..\src\mempool.c> +OPTFFF 2,9,1,0,0,0,0,0,<..\..\src\object.c> +OPTFFF 2,10,1,0,0,0,0,0,<..\..\src\timer.c> +OPTFFF 2,11,1,553648128,0,0,0,0,<..\..\src\idle.c> +OPTFFF 2,12,1,0,0,0,0,0,<..\..\src\irq.c> +OPTFFF 2,13,1,0,0,0,0,0,<..\..\src\mem.c> +OPTFFF 2,14,1,0,0,0,0,0,<..\..\src\scheduler.c> +OPTFFF 2,15,1,0,0,0,0,0,<..\..\src\slab.c> +OPTFFF 2,16,1,0,0,0,0,0,<..\..\src\thread.c> +OPTFFF 2,17,1,0,0,0,0,0,<..\..\src\kservice.c> +OPTFFF 3,18,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\serial.c> +OPTFFF 3,19,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\interrupt.c> +OPTFFF 3,20,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\cpu.c> +OPTFFF 3,21,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\trap.c> +OPTFFF 3,22,1,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\stack.c> +OPTFFF 3,23,2,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\start_rvds.s> +OPTFFF 3,24,2,0,0,0,0,0,<..\..\libcpu\arm\lpc214x\context_rvds.s> +OPTFFF 4,25,1,0,0,0,0,0,<..\..\finsh\finsh_compiler.c> +OPTFFF 4,26,1,0,0,0,0,0,<..\..\finsh\finsh_error.c> +OPTFFF 4,27,1,0,0,0,0,0,<..\..\finsh\finsh_heap.c> +OPTFFF 4,28,1,0,0,0,0,0,<..\..\finsh\finsh_init.c> +OPTFFF 4,29,1,0,0,0,0,0,<..\..\finsh\finsh_node.c> +OPTFFF 4,30,1,0,0,0,0,0,<..\..\finsh\finsh_ops.c> +OPTFFF 4,31,1,0,0,0,0,0,<..\..\finsh\finsh_token.c> +OPTFFF 4,32,1,0,0,0,0,0,<..\..\finsh\finsh_var.c> +OPTFFF 4,33,1,0,0,0,0,0,<..\..\finsh\finsh_vm.c> +OPTFFF 4,34,1,0,0,0,0,0,<..\..\finsh\shell.c> +OPTFFF 4,35,1,0,0,0,0,0,<..\..\finsh\symbol.c> +OPTFFF 4,36,1,0,0,0,0,0,<..\..\finsh\cmd.c> +OPTFFF 4,37,1,0,0,0,0,0,<..\..\finsh\finsh_parser.c> -TARGOPT 1, (RT-Thread/LPC2148) +TARGOPT 1, (RT-Thread-LPC2148) ADSCLK=12000000 OPTTT 1,1,1,0 OPTHX 1,65535,0,0,0 @@ -123,7 +69,7 @@ TARGOPT 1, (RT-Thread/LPC2148) OPTDBG 48125,6,()()()()()()()()()() (Segger\JLTAgdi.dll)()()() OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(153=-1,-1,-1,-1,0)(154=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(145=-1,-1,-1,-1,0)(147=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(113=556,103,931,655,0)(112=-1,-1,-1,-1,0)(137=-1,-1,-1,-1,0)(138=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(146=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(141=-1,-1,-1,-1,0)(142=-1,-1,-1,-1,0)(143=-1,-1,-1,-1,0)(144=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)) OPTKEY 0,(ARMDBGFLAGS)(-T5F) - OPTDF 0xB0 + OPTDF 0x90 OPTLE <> OPTLC <> EndOpt diff --git a/bsp/lpc2148/project.Uv2 b/bsp/lpc2148/project.Uv2 index f1f82c90c8..18a86744a4 100644 --- a/bsp/lpc2148/project.Uv2 +++ b/bsp/lpc2148/project.Uv2 @@ -1,20 +1,16 @@ ### uVision2 Project, (C) Keil Software ### Do not modify ! -Target (RT-Thread/LPC2148), 0x0004 // Tools: 'ARM-ADS' +Target (RT-Thread-LPC2148), 0x0004 // Tools: 'ARM-ADS' Group (Startup) Group (Kernel) Group (LPC214x) Group (finsh) -Group (Filesystem) -Group (LwIP) File 1,1,<.\application.c> File 1,1,<.\board.c> File 1,1,<.\startup.c> -File 1,1,<.\dm9000.c> -File 1,1,<.\sd.c> File 1,5,<.\rtconfig.h> File 2,1,<..\..\src\clock.c> File 2,1,<..\..\src\device.c> @@ -49,59 +45,9 @@ File 4,1,<..\..\finsh\shell.c> File 4,1,<..\..\finsh\symbol.c> File 4,1,<..\..\finsh\cmd.c> File 4,1,<..\..\finsh\finsh_parser.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_util.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_cache.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_fs.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_init.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_posix.c> -File 5,1,<..\..\filesystem\dfs\src\dfs_raw.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\base\plibc.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\base\efs.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\base\extract.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\base\partition.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\dir.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fat.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\file.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ls.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\ui.c> -File 5,1,<..\..\filesystem\dfs\filesystems\efsl\src\fs\vfat\time.c> -File 6,1,<..\..\net\lwip\src\netif\etharp.c> -File 6,1,<..\..\net\lwip\src\netif\ethernetif.c> -File 6,1,<..\..\net\lwip\src\core\udp.c> -File 6,1,<..\..\net\lwip\src\core\dhcp.c> -File 6,1,<..\..\net\lwip\src\core\dns.c> -File 6,1,<..\..\net\lwip\src\core\init.c> -File 6,1,<..\..\net\lwip\src\core\memp_tiny.c> -File 6,1,<..\..\net\lwip\src\core\netif.c> -File 6,1,<..\..\net\lwip\src\core\pbuf.c> -File 6,1,<..\..\net\lwip\src\core\raw.c> -File 6,1,<..\..\net\lwip\src\core\stats.c> -File 6,1,<..\..\net\lwip\src\core\sys.c> -File 6,1,<..\..\net\lwip\src\core\tcp.c> -File 6,1,<..\..\net\lwip\src\core\tcp_in.c> -File 6,1,<..\..\net\lwip\src\core\tcp_out.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\ip_frag.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\autoip.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\icmp.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\igmp.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\inet.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\inet_chksum.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\ip.c> -File 6,1,<..\..\net\lwip\src\core\ipv4\ip_addr.c> -File 6,1,<..\..\net\lwip\src\api\tcpip.c> -File 6,1,<..\..\net\lwip\src\api\api_lib.c> -File 6,1,<..\..\net\lwip\src\api\api_msg.c> -File 6,1,<..\..\net\lwip\src\api\err.c> -File 6,1,<..\..\net\lwip\src\api\netbuf.c> -File 6,1,<..\..\net\lwip\src\api\netdb.c> -File 6,1,<..\..\net\lwip\src\api\netifapi.c> -File 6,1,<..\..\net\lwip\src\api\sockets.c> -File 6,1,<..\..\net\lwip\src\arch\sys_arch_init.c> -File 6,1,<..\..\net\lwip\src\arch\sys_arch.c> -Options 1,0,0 // Target 'RT-Thread/LPC2148' +Options 1,0,0 // Target 'RT-Thread-LPC2148' Device (LPC2148) Vendor (NXP (founded by Philips)) Cpu (IRAM(0x40000000-0x40007FFF) IROM(0-0x7FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI)) diff --git a/bsp/lpc2148/rtconfig.h b/bsp/lpc2148/rtconfig.h index 14d1ef4e1a..e554b70d2d 100644 --- a/bsp/lpc2148/rtconfig.h +++ b/bsp/lpc2148/rtconfig.h @@ -84,7 +84,7 @@ /* #define RT_USING_CPLUSPLUS */ /* SECTION: DFS options */ -#define RT_USING_DFS +/* #define RT_USING_DFS */ /* the max number of mounted filesystem */ #define DFS_FILESYSTEMS_MAX 2 /* the max number of opened files */ @@ -94,7 +94,7 @@ /* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* Using lighweight TCP/IP protocol stack*/ -#define RT_USING_LWIP +/* #define RT_USING_LWIP */ /* Trace LwIP protocol*/ /* #define RT_LWIP_DEBUG */ diff --git a/bsp/lpc2148/startup.c b/bsp/lpc2148/startup.c index eb9b5d065b..a29819b06d 100644 --- a/bsp/lpc2148/startup.c +++ b/bsp/lpc2148/startup.c @@ -1,24 +1,24 @@ -/* - * File : startup.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Develop Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2009-02-16 Bernard first implementation - */ - -#include -#include +/* + * File : startup.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2006, RT-Thread Develop Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2009-02-16 Bernard first implementation + */ + +#include +#include #ifdef RT_USING_FINSH #include #endif - -#include "board.h" + +#include "board.h" #ifdef RT_USING_LWIP #include #include "dm9000.h" @@ -26,18 +26,18 @@ #ifdef RT_USING_DFS #include "sd.h" #endif - -/** - * @addtogroup lpc2148 - */ - -/*@{*/ - -#ifdef RT_USING_FINSH -extern void finsh_system_init(void); -#endif - -extern int rt_application_init(void); + +/** + * @addtogroup lpc2148 + */ + +/*@{*/ + +#ifdef RT_USING_FINSH +extern void finsh_system_init(void); +#endif + +extern int rt_application_init(void); extern void rt_show_version(void); #ifdef RT_USING_DEVICE extern rt_err_t rt_hw_serial_init(void); @@ -46,95 +46,95 @@ extern rt_err_t rt_hw_serial_init(void); extern void finsh_system_init(void); #endif -#ifdef __CC_ARM +#ifdef __CC_ARM extern int Image$$RW_IRAM1$$ZI$$Limit; #else extern int __bss_end; #endif -/** - * This function will startup RT-Thread RTOS. - */ -void rtthread_startup(void) -{ - /* init hardware interrupt */ - rt_hw_interrupt_init(); - - /* init board */ - rt_hw_board_init(); - - /* init tick */ - rt_system_tick_init(); - - /* init kernel object */ - rt_system_object_init(); - - rt_show_version(); - - /* init timer system */ - rt_system_timer_init(); - +/** + * This function will startup RT-Thread RTOS. + */ +void rtthread_startup(void) +{ + /* init hardware interrupt */ + rt_hw_interrupt_init(); + + /* init board */ + rt_hw_board_init(); + + /* init tick */ + rt_system_tick_init(); + + /* init kernel object */ + rt_system_object_init(); + + rt_show_version(); + + /* init timer system */ + rt_system_timer_init(); + #ifdef RT_USING_HEAP #ifdef __CC_ARM - rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40008000); -#else - /* init memory system */ - rt_system_heap_init((void*)&__bss_end, (void*)0x40008000); -#endif + rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40008000); +#else + /* init memory system */ + rt_system_heap_init((void*)&__bss_end, (void*)0x40008000); #endif - - /* init scheduler system */ - rt_system_scheduler_init(); - -#ifdef RT_USING_HOOK /* if the hook is used */ - /* set idle thread hook */ - rt_thread_idle_sethook(0); +#endif + + /* init scheduler system */ + rt_system_scheduler_init(); + +#ifdef RT_USING_HOOK /* if the hook is used */ + /* set idle thread hook */ + rt_thread_idle_sethook(0); #endif #ifdef RT_USING_DEVICE #ifdef RT_USING_DFS - /* init sd card */ - rt_hw_sdcard_init(); + /* init sd card */ + rt_hw_sdcard_init(); #endif #ifdef RT_USING_LWIP - eth_system_device_init(); - /* init ethernetif device */ - rt_hw_dm9000_init(); + eth_system_device_init(); + /* init ethernetif device */ + rt_hw_dm9000_init(); #endif - /* init hardware serial device */ - rt_hw_serial_init(); + /* init hardware serial device */ + rt_hw_serial_init(); - /*init all registed devices*/ - rt_device_init_all(); + /*init all registed devices*/ + rt_device_init_all(); #endif - - /* init application */ - rt_application_init(); - -#ifdef RT_USING_FINSH - /* init finsh */ - finsh_system_init(); - finsh_set_device("uart1"); -#endif - - /* init idle thread */ - rt_thread_idle_init(); - - /* start scheduler */ - rt_system_scheduler_start(); - - /* never reach here */ - return ; + + /* init application */ + rt_application_init(); + +#ifdef RT_USING_FINSH + /* init finsh */ + finsh_system_init(); + finsh_set_device("uart1"); +#endif + + /* init idle thread */ + rt_thread_idle_init(); + + /* start scheduler */ + rt_system_scheduler_start(); + + /* never reach here */ + return ; } - + int main (void) { - /* invoke rtthread_startup */ - rtthread_startup(); + /* invoke rtthread_startup */ + rtthread_startup(); - return 0; + return 0; } - -/*@}*/ + +/*@}*/