Merge pull request #485 from pangweishen/master
Remove the RT_USING_COMPONENTS_INIT in simulation project
This commit is contained in:
commit
607a1cd11d
|
@ -16,8 +16,60 @@
|
|||
#include <stdio.h>
|
||||
#include <board.h>
|
||||
|
||||
#include <components.h>
|
||||
#ifdef RT_USING_FINSH
|
||||
#include <finsh.h>
|
||||
#include <shell.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <lwip/sys.h>
|
||||
#include <netif/ethernetif.h>
|
||||
extern void lwip_system_init(void);
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
#include <dfs_init.h>
|
||||
#include <dfs_fs.h>
|
||||
#ifdef RT_USING_DFS_ELMFAT
|
||||
#include <dfs_elm.h>
|
||||
#endif
|
||||
#if defined(RT_USING_LWIP) && defined(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
|
||||
#ifdef RT_USING_DFS_ROMFS
|
||||
#include <dfs_romfs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_NEWLIB
|
||||
#include <libc.h>
|
||||
#endif
|
||||
#ifdef RT_USING_PTHREADS
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
#include <rtm.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#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
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -3,7 +3,34 @@
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue