diff options
| author | prife <[email protected]> | 2013-01-22 17:08:54 +0800 |
|---|---|---|
| committer | prife <[email protected]> | 2013-01-22 17:08:54 +0800 |
| commit | 832bbb9fe2a0d6aa04729627018536abb75f8dd3 (patch) | |
| tree | d7865545134a5cd9c67be4c68f088c5d8e6c9c54 /bsp/simlinux/applications | |
| parent | f2636ea813cac0b63729ae25127928895d3bb040 (diff) | |
remove bsp/simlinux
Diffstat (limited to 'bsp/simlinux/applications')
| -rwxr-xr-x | bsp/simlinux/applications/SConscript | 9 | ||||
| -rwxr-xr-x | bsp/simlinux/applications/application.c | 116 | ||||
| -rwxr-xr-x | bsp/simlinux/applications/platform.c | 29 | ||||
| -rwxr-xr-x | bsp/simlinux/applications/startup.c | 92 |
4 files changed, 0 insertions, 246 deletions
diff --git a/bsp/simlinux/applications/SConscript b/bsp/simlinux/applications/SConscript deleted file mode 100755 index 4ccb177207..0000000000 --- a/bsp/simlinux/applications/SConscript +++ /dev/null @@ -1,9 +0,0 @@ -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] - -group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) - -Return('group') diff --git a/bsp/simlinux/applications/application.c b/bsp/simlinux/applications/application.c deleted file mode 100755 index 6394cf736b..0000000000 --- a/bsp/simlinux/applications/application.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * File : application.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Development Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2009-01-05 Bernard the first version - */ - -#include <rtthread.h> -#include <stdio.h> -#include <board.h> - -#include <components.h> - - -void rt_init_thread_entry(void *parameter) -{ -#ifdef RT_USING_LWIP - pcap_netif_hw_init(); -#endif - - /* initialization RT-Thread Components */ - rt_components_init(); - - rt_platform_init(); - - /* File system Initialization */ -#ifdef RT_USING_DFS - { -#ifdef RT_USING_DFS_WINSHAREDIR - { - extern rt_err_t rt_win_sharedir_init(const char *name); - extern int dfs_win32_init(void); - - rt_win_sharedir_init("wdd"); - dfs_win32_init(); - - if (dfs_mount("wdd", "/", "wdir", 0, 0) == 0) - rt_kprintf("win32 share directory initialized!\n"); - else - rt_kprintf("win32 share directory initialized failed!\n"); - } -#endif - -#ifdef RT_USING_DFS_ELMFAT - /* mount sd card fatfs as root directory */ - //if (dfs_mount("sd0", "/disk/sd", "elm", 0, 0) == 0) - if (dfs_mount("sd0", "/", "elm", 0, 0) == 0) - rt_kprintf("fatfs initialized!\n"); - else - rt_kprintf("fatfs initialization failed!\n"); -#endif - -#ifdef RT_USING_DFS_UFFS - /* mount uffs as the nand flash file system */ - if (dfs_mount("nand0", "/disk/nand", "uffs", 0, 0) == 0) - rt_kprintf("uffs initialized!\n"); - else - rt_kprintf("uffs initialization failed!\n"); -#endif - -#ifdef RT_USING_DFS_JFFS2 - /* mount jffs2 as the nor flash file system */ - if (dfs_mount("nor", "/disk/nor", "jffs2", 0, 0) == 0) - rt_kprintf("jffs2 initialized!\n"); - else - rt_kprintf("jffs2 initialization failed!\n"); -#endif - - } -#endif - -#if defined(RT_USING_RTGUI) - //rt_thread_delay(RT_TICK_PER_SECOND); - //snake_main(); -#endif -} - -static void rt_test_thread_entry(void *parameter) -{ - int i; - for (i = 0; i < 5; i++) - { - rt_kprintf("hello, world\n"); - rt_thread_delay(RT_TICK_PER_SECOND); - } -} - - -int rt_application_init() -{ - rt_thread_t tid; - - tid = rt_thread_create("init", - rt_init_thread_entry, RT_NULL, - 2048, RT_THREAD_PRIORITY_MAX / 3, 20); - - if (tid != RT_NULL) - rt_thread_startup(tid); - - tid = rt_thread_create("test", - rt_test_thread_entry, RT_NULL, - 2048, RT_THREAD_PRIORITY_MAX * 3 / 4, 20); - if (tid != RT_NULL) - rt_thread_startup(tid); - - return 0; -} - -/*@}*/ diff --git a/bsp/simlinux/applications/platform.c b/bsp/simlinux/applications/platform.c deleted file mode 100755 index 3c7ffdb541..0000000000 --- a/bsp/simlinux/applications/platform.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <rtthread.h> -#include "board.h" - -void rt_platform_init(void) -{ -#ifdef RT_USING_DFS - /* initialize sd card */ - rt_hw_sdcard_init(); - -#if defined(RT_USING_MTD_NAND) - rt_hw_mtd_nand_init(); -#endif - -#if defined(RT_USING_MTD_NOR) - sst25vfxx_mtd_init("nor", 0, RT_UINT32_MAX); -#endif - -#endif /* RT_USING_DFS */ - -#ifdef RT_USING_RTGUI - /* start sdl thread to simulate an LCD */ - rt_hw_sdl_start(); -#endif /* RT_USING_RTGUI */ - -#ifdef _WIN32 - rt_thread_idle_sethook(rt_hw_win32_low_cpu); -#endif -} - diff --git a/bsp/simlinux/applications/startup.c b/bsp/simlinux/applications/startup.c deleted file mode 100755 index 2b21c69016..0000000000 --- a/bsp/simlinux/applications/startup.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * File : startup.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006, RT-Thread Develop Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://openlab.rt-thread.com/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2012-09-03 prife first implementation - */ - -#include <rthw.h> -#include <rtthread.h> - -#include "board.h" - -/** - * @addtogroup win32 - */ - -/*@{*/ - -extern int rt_application_init(void); -#ifdef RT_USING_FINSH -extern void finsh_system_init(void); -extern void finsh_set_device(const char *device); -#endif - -extern rt_uint8_t *heap; -/** - * This function will startup RT-Thread RTOS. - */ -void rtthread_startup(void) -{ - /* init board */ - rt_hw_board_init(); - - /* show version */ - rt_show_version(); - - /* init tick */ - rt_system_tick_init(); - - /* init kernel object */ - rt_system_object_init(); - - /* init timer system */ - rt_system_timer_init(); - -#ifdef RT_USING_HEAP - /* init memory system */ - rt_system_heap_init((void *)heap, (void *)&heap[RT_HEAP_SIZE - 1]); -#endif - - /* init scheduler system */ - rt_system_scheduler_init(); - - /* init all device */ -#ifdef RT_USING_DEVICE - rt_device_init_all(); -#endif - /* init application */ - rt_application_init(); - - /* init timer thread */ - rt_system_timer_thread_init(); - - /* init idle thread */ - rt_thread_idle_init(); - - /* start scheduler */ - rt_system_scheduler_start(); - - /* never reach here */ - return ; -} - -int main(void) -{ - /* disable interrupt first */ - rt_hw_interrupt_disable(); - - /* startup RT-Thread RTOS */ - rtthread_startup(); - - return 0; -} - -/*@}*/ |
