Add console implementation on LPC2478 porting.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@11 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong committed 2009-07-31 04:10:48 +00:00
1 parent 53919ba500
commit 1df36ebf2f
2 files changed
+79 -176

No files matched your search

+52 -150
View File
File diff suppressed because it is too large. Load diff
+27 -26
View File
@@ -5,15 +5,20 @@
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://openlab.rt-thread.com/license/LICENSE
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2008-12-11 xuxinming first version
*/
#include <rtthread.h>
#include <rthw.h>
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <finsh.h>
extern void finsh_system_init(void);
#endif
#include <LPC24xx.h>
#include <board.h>
@@ -23,46 +28,36 @@
*/
/*@{*/
#ifdef __CC_ARM
extern int Image$$RW_IRAM1$$ZI$$Limit;
#else
extern char __rodata_start[];
extern char __rodata_end[];
extern char __data_start[];
extern char __bss_start[];
extern char __data_end[];
extern char __bss_end[];
extern char __Heap_start[];
extern char __Heap_end[];
extern int rt_application_init(void);
#ifdef RT_USING_DEVICE
extern rt_err_t rt_hw_serial_init(void);
#endif
#ifdef RT_USING_FINSH
extern void finsh_system_init(void);
#endif
extern int rt_application_init(void);
#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 Target */
// TargetResetInit();
/* init hardware interrupt */
rt_hw_interrupt_init();
/* init board */
rt_hw_board_init();
rt_show_version();
/* init tick */
rt_system_tick_init();
/* init kernel object */
rt_system_object_init();
rt_show_version();
/* init timer system */
rt_system_timer_init();
@@ -71,22 +66,27 @@ void rtthread_startup(void)
#ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x40010000);
#else
rt_system_heap_init((void*)__Heap_start, 0x40010000);
rt_system_heap_init((void*)&__bss_end, (void*)0x40010000);
#endif
#endif
/* 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();
#ifdef RT_USING_FINSH
/* init the finsh input */
rt_hw_finsh_init();
/* init finsh */
finsh_system_init();
finsh_set_device("uart1");
#endif
/* init idle thread */
@@ -102,6 +102,7 @@ void rtthread_startup(void)
#ifdef __CC_ARM
int main(void)
{
/* invoke rtthread_startup */
rtthread_startup();
return 0;