提交 69665320 编写于 作者: B bernard.xiong@gmail.com

add finsh component initialization.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2041 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 5cc877fa
...@@ -8,14 +8,54 @@ ...@@ -8,14 +8,54 @@
#endif #endif
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
#include <dfs_init.h>
#ifdef RT_USING_DFS_ELMFAT
#include <dfs_elm.h>
#endif
#ifdef RT_USING_DFS_NFS
#include <dfs_nfs.h>
#endif
#ifdef RT_USING_DFS_ROMFS
#include <dfs_romfs.h>
#endif
#ifdef RT_USING_DFS_DEVFS
#include <devfs.h>
#endif
#ifdef RT_USING_DFS_UFFS
#include <dfs_uffs.h>
#endif
#ifdef RT_USING_DFS_JFFS2
#include <dfs_jffs2.h>
#endif
#ifdef RT_USING_DFS_YAFFS2
#include <dfs_yaffs2.h>
#endif
#endif
#ifdef RT_USING_NEWLIB
#include <libc.h>
#endif
#ifdef RT_USING_PTHREADS
#include <pthread.h>
#endif #endif
/**
* RT-Thread Components Initialization
*/
void rt_components_init(void) void rt_components_init(void)
{ {
#ifdef RT_USING_MODULE
rt_system_module_init();
#endif
#ifdef RT_USING_FINSH
/* initialize finsh */
finsh_system_init();
finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif
#ifdef RT_USING_LWIP #ifdef RT_USING_LWIP
/* initialize lwip stack */ /* initialize lwip stack */
extern void lwip_sys_init(void);
/* register ethernetif device */ /* register ethernetif device */
eth_system_device_init(); eth_system_device_init();
...@@ -25,17 +65,17 @@ void rt_components_init(void) ...@@ -25,17 +65,17 @@ void rt_components_init(void)
#endif #endif
#ifdef RT_USING_DFS #ifdef RT_USING_DFS
/* initialize the device filesystem */ /* initialize the device file system */
dfs_init(); dfs_init();
#ifdef RT_USING_DFS_ELMFAT #ifdef RT_USING_DFS_ELMFAT
/* initialize the elm chan FatFS filesystam*/ /* initialize the elm chan FatFS file systam*/
elm_init(); elm_init();
#endif #endif
#if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP) #if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP)
extern void nfs_init(void); extern void nfs_init(void);
/* initialize NFSv3 client filesystem */ /* initialize NFSv3 client file system */
nfs_init(); nfs_init();
#endif #endif
...@@ -58,7 +98,14 @@ void rt_components_init(void) ...@@ -58,7 +98,14 @@ void rt_components_init(void)
#ifdef RT_USING_DFS_DEVFS #ifdef RT_USING_DFS_DEVFS
devfs_init(); devfs_init();
#endif #endif
#endif
#ifdef RT_USING_NEWLIB
libc_system_init(RT_CONSOLE_DEVICE_NAME);
#endif
#ifdef RT_USING_PTHREADS
pthread_system_init();
#endif #endif
#ifdef RT_USING_RTGUI #ifdef RT_USING_RTGUI
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册