diff --git a/bsp/simulator/applications/application.c b/bsp/simulator/applications/application.c index 500b7e6f2a..a01e8d91b7 100755 --- a/bsp/simulator/applications/application.c +++ b/bsp/simulator/applications/application.c @@ -16,8 +16,60 @@ #include #include -#include +#ifdef RT_USING_FINSH +#include +#include +#endif +#ifdef RT_USING_LWIP +#include +#include +extern void lwip_system_init(void); +#endif + +#ifdef RT_USING_DFS +#include +#include +#ifdef RT_USING_DFS_ELMFAT +#include +#endif +#if defined(RT_USING_LWIP) && defined(RT_USING_DFS_NFS) +#include +#endif +#ifdef RT_USING_DFS_ROMFS +#include +#endif +#ifdef RT_USING_DFS_DEVFS +#include +#endif +#ifdef RT_USING_DFS_UFFS +#include +#endif +#ifdef RT_USING_DFS_JFFS2 +#include +#endif +#ifdef RT_USING_DFS_YAFFS2 +#include +#endif +#ifdef RT_USING_DFS_ROMFS +#include +#endif +#endif + +#ifdef RT_USING_NEWLIB +#include +#endif +#ifdef RT_USING_PTHREADS +#include +#endif + +#ifdef RT_USING_MODULE +#include +#endif + +#ifdef RT_USING_RTGUI +#include +#endif void rt_init_thread_entry(void *parameter) { @@ -31,8 +83,81 @@ void rt_init_thread_entry(void *parameter) rt_platform_init(); - /* initialization RT-Thread Components */ - rt_components_init(); +#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 + /* 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 /* start sdl thread to simulate an LCD. SDL may depend on DFS and should be @@ -104,4 +229,4 @@ int rt_application_init() return 0; } -/*@}*/ +/*@}*/ \ No newline at end of file diff --git a/bsp/simulator/rtconfig.h b/bsp/simulator/rtconfig.h index ce8c783547..a1f877de2e 100755 --- a/bsp/simulator/rtconfig.h +++ b/bsp/simulator/rtconfig.h @@ -98,9 +98,6 @@ #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "sci0" -/* SECTION: component options */ -#define RT_USING_COMPONENTS_INIT - /* SECTION: APP MODULE */ /* #define RT_USING_MODULE */ diff --git a/components/dfs/filesystems/uffs/SConscript b/components/dfs/filesystems/uffs/SConscript index f822cf5d73..53f7713fc2 100644 --- a/components/dfs/filesystems/uffs/SConscript +++ b/components/dfs/filesystems/uffs/SConscript @@ -3,9 +3,36 @@ from building import * cwd = GetCurrentDir() + src = Glob('*.c') + +uffs = Split(''' +src/uffs/uffs_badblock.c +src/uffs/uffs_blockinfo.c +src/uffs/uffs_buf.c +src/uffs/uffs_debug.c +src/uffs/uffs_device.c +src/uffs/uffs_ecc.c +src/uffs/uffs_crc.c +src/uffs/uffs_fd.c +src/uffs/uffs_find.c +src/uffs/uffs_flash.c +src/uffs/uffs_fs.c +src/uffs/uffs_init.c +src/uffs/uffs_mem.c +src/uffs/uffs_mtb.c +src/uffs/uffs_pool.c +src/uffs/uffs_public.c +src/uffs/uffs_tree.c +src/uffs/uffs_utils.c +src/uffs/uffs_version.c + +''') + +src = src + uffs + CPPPATH = [cwd, cwd + '/src/inc'] -group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_UFFS'], CPPPATH = CPPPATH) +group = DefineGroup('Filesystem', src , depend = ['RT_USING_DFS', 'RT_USING_DFS_UFFS'], CPPPATH = CPPPATH) Return('group')