[BSP] Remove the RT_USING_COMPONENTS_INIT in rt_config.h , and added some components init functions by hand.

This commit is contained in:
pangwei 2015-05-21 15:05:00 +08:00
parent a99931e93c
commit 688f324fea
2 changed files with 76 additions and 6 deletions

View File

@ -31,8 +31,81 @@ void rt_init_thread_entry(void *parameter)
rt_platform_init(); rt_platform_init();
/* initialization RT-Thread Components */ #ifdef RT_USING_MODULE
rt_components_init(); 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
/* initialize lwip stack */
/* register ethernetif device */
eth_system_device_init();
/* initialize lwip system */
lwip_system_init();
rt_kprintf("TCP/IP initialized!\n");
#endif
#ifdef RT_USING_DFS
/* initialize the device file system */
dfs_init();
#ifdef RT_USING_DFS_ELMFAT
/* initialize the elm chan FatFS file system*/
elm_init();
#endif
#if defined(RT_USING_DFS_NFS) && defined(RT_USING_LWIP)
/* initialize NFSv3 client file system */
nfs_init();
#endif
#ifdef RT_USING_DFS_YAFFS2
dfs_yaffs2_init();
#endif
#ifdef RT_USING_DFS_UFFS
dfs_uffs_init();
#endif
#ifdef RT_USING_DFS_JFFS2
dfs_jffs2_init();
#endif
#ifdef RT_USING_DFS_ROMFS
dfs_romfs_init();
#endif
#ifdef RT_USING_DFS_RAMFS
dfs_ramfs_init();
#endif
#ifdef RT_USING_DFS_DEVFS
devfs_init();
#endif
#endif /* end of RT_USING_DFS */
#ifdef RT_USING_NEWLIB
libc_system_init(RT_CONSOLE_DEVICE_NAME);
#else
/* the pthread system initialization will be initiallized in libc */
#ifdef RT_USING_PTHREADS
pthread_system_init();
#endif
#endif
#ifdef RT_USING_RTGUI
rtgui_system_server_init();
#endif
#ifdef RT_USING_USB_HOST
rt_usb_host_init();
#endif
#ifdef RT_USING_RTGUI #ifdef RT_USING_RTGUI
/* start sdl thread to simulate an LCD. SDL may depend on DFS and should be /* start sdl thread to simulate an LCD. SDL may depend on DFS and should be

View File

@ -98,9 +98,6 @@
#define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "sci0" #define RT_CONSOLE_DEVICE_NAME "sci0"
/* SECTION: component options */
#define RT_USING_COMPONENTS_INIT
/* SECTION: APP MODULE */ /* SECTION: APP MODULE */
/* #define RT_USING_MODULE */ /* #define RT_USING_MODULE */
@ -136,7 +133,7 @@
/* #define RT_USING_DFS_NFS */ /* #define RT_USING_DFS_NFS */
/* DFS: UFFS nand file system options */ /* DFS: UFFS nand file system options */
#define RT_USING_DFS_UFFS //#define RT_USING_DFS_UFFS
/* configuration for uffs, more to see dfs_uffs.h and uffs_config.h */ /* configuration for uffs, more to see dfs_uffs.h and uffs_config.h */
#define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_HW_AUTO #define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_HW_AUTO
/* enable this ,you need provide a mark_badblock/check_block function */ /* enable this ,you need provide a mark_badblock/check_block function */