summaryrefslogtreecommitdiff
path: root/components/init
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-04-10 14:43:42 +0800
committerBernard Xiong <[email protected]>2015-04-10 14:43:42 +0800
commit3949ae258b8fb115d5e81bdf9d5c284ccd419ffe (patch)
treee1e32a9935deab57084e1a9f9cdae2e570559d60 /components/init
parent2ff048f7f0170d618333edc4484cb6b09eaf17fd (diff)
parent1f95de43aa6f24d2684e40b1d9e1a60689f7651d (diff)
Merge pull request #456 from BernardXiong/master
[tools] Add package.json as building script.
Diffstat (limited to 'components/init')
-rw-r--r--components/init/SConscript14
-rw-r--r--components/init/components.c177
-rw-r--r--components/init/components.h105
3 files changed, 0 insertions, 296 deletions
diff --git a/components/init/SConscript b/components/init/SConscript
deleted file mode 100644
index 97e1535240..0000000000
--- a/components/init/SConscript
+++ /dev/null
@@ -1,14 +0,0 @@
-Import('rtconfig')
-from building import *
-
-cwd = GetCurrentDir()
-src = Glob('*.c')
-CPPPATH = [cwd]
-if rtconfig.CROSS_TOOL == 'keil':
- LINKFLAGS = ' --keep __rt_init* '
-else:
- LINKFLAGS = ''
-
-group = DefineGroup('Components', src, depend = ['RT_USING_COMPONENTS_INIT'], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
-
-Return('group')
diff --git a/components/init/components.c b/components/init/components.c
deleted file mode 100644
index 2c507e12f8..0000000000
--- a/components/init/components.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * File : components.c
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2012 - 2013, RT-Thread Development Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Change Logs:
- * Date Author Notes
- * 2012-09-20 Bernard Change the name to components.c
- * And all components related header files.
- * 2012-12-23 Bernard fix the pthread initialization issue.
- * 2013-06-23 Bernard Add the init_call for components initialization.
- * 2013-07-05 Bernard Remove initialization feature for MS VC++ compiler
- */
-
-#include "components.h"
-
-static int rti_start(void)
-{
- return 0;
-}
-INIT_EXPORT(rti_start, "0");
-
-static int rti_board_end(void)
-{
- return 0;
-}
-INIT_EXPORT(rti_board_end, "1.post");
-
-static int rti_end(void)
-{
- return 0;
-}
-INIT_EXPORT(rti_end,"7");
-
-/**
- * RT-Thread Components Initialization for board
- */
-void rt_components_board_init(void)
-{
-#ifndef _MSC_VER
-#if RT_DEBUG_INIT
- int result;
- const struct rt_init_desc *desc;
- for (desc = &__rt_init_desc_rti_start; desc < &__rt_init_desc_rti_board_end; desc ++)
- {
- rt_kprintf("initialize %s", desc->fn_name);
- result = desc->fn();
- rt_kprintf(":%d done\n", result);
- }
-#else
- const init_fn_t *fn_ptr;
-
- for (fn_ptr = &__rt_init_rti_start; fn_ptr < &__rt_init_rti_board_end; fn_ptr++)
- {
- (*fn_ptr)();
- }
-#endif
-#endif
-}
-
-/**
- * RT-Thread Components Initialization
- */
-void rt_components_init(void)
-{
-#ifndef _MSC_VER
-#if RT_DEBUG_INIT
- int result;
- const struct rt_init_desc *desc;
-
- rt_kprintf("do components intialization.\n");
- for (desc = &__rt_init_desc_rti_board_end; desc < &__rt_init_desc_rti_end; desc ++)
- {
- rt_kprintf("initialize %s", desc->fn_name);
- result = desc->fn();
- rt_kprintf(":%d done\n", result);
- }
-#else
- const init_fn_t *fn_ptr;
-
- for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; fn_ptr ++)
- {
- (*fn_ptr)();
- }
-#endif
-#else
-#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
-#endif
-}
diff --git a/components/init/components.h b/components/init/components.h
deleted file mode 100644
index 11d3c81788..0000000000
--- a/components/init/components.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * File : components_init.h
- * This file is part of RT-Thread RTOS
- * COPYRIGHT (C) 2012, RT-Thread Development Team
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Change Logs:
- * Date Author Notes
- * 2012-09-20 Bernard Change the name to components.h
- * And all components related header files.
- */
-
-#ifndef __COMPONENTS_INIT_H__
-#define __COMPONENTS_INIT_H__
-
-#include <rtthread.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
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Initializes board routine in RT-Thread.
- */
-void rt_components_board_init(void);
-
-/**
- * Initializes components in RT-Thread
- * notes: this function must be invoked in Init Thread
- */
-void rt_components_init(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif