mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-28 16:14:20 +08:00
Cleanup and add licencse
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
|
||||
* COPYRIGHT (C) 2006 - 2013, 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
|
||||
* 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
|
||||
* 2007-11-20 Yi.Qiu add rtgui application
|
||||
* 2008-6-28 Bernard no rtgui init
|
||||
* 2013-7-14 Peng Fan modified from mini4020
|
||||
* 2013-7-14 Peng Fan Simple application
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -23,18 +31,6 @@
|
||||
#include "board.h"
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
#include <dfs_init.h>
|
||||
#include <dfs_elm.h>
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_posix.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_RTGUI
|
||||
#include <rtgui/rtgui.h>
|
||||
extern void radio_rtgui_init(void);
|
||||
#endif
|
||||
|
||||
#define RT_INIT_THREAD_STACK_SIZE (2*1024)
|
||||
|
||||
void rt_init_thread_entry(void *parameter)
|
||||
|
||||
@@ -1,11 +1,21 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team
|
||||
* COPYRIGHT (C) 2006 - 2013, 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
|
||||
* 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
|
||||
@@ -71,12 +81,11 @@ void rtthread_startup()
|
||||
#ifdef RT_USING_DEVICE
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
rt_hw_sdcard_init();
|
||||
/* Not implemented */
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
eth_system_device_init();
|
||||
rt_hw_dm9000_init();
|
||||
/* Not implemented */
|
||||
#endif
|
||||
|
||||
/*init all registed devices */
|
||||
@@ -106,16 +115,3 @@ void rtthread_startup()
|
||||
return ;
|
||||
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
rt_uint32_t UNUSED level;
|
||||
|
||||
/* disable interrupt first */
|
||||
level = rt_hw_interrupt_disable();
|
||||
|
||||
/* startup RT-Thread RTOS */
|
||||
rtthread_startup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+14
-5
@@ -1,11 +1,21 @@
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2009 - 2012, RT-Thread Development Team
|
||||
* COPYRIGHT (C) 2006 - 2013, 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
|
||||
* 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
|
||||
@@ -20,6 +30,5 @@
|
||||
#include <sep6200.h>
|
||||
|
||||
void rt_hw_board_init(void);
|
||||
void rt_hw_sdcard_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
+21
-20
@@ -1,17 +1,32 @@
|
||||
/*
|
||||
* File : board.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006 - 2012 RT-Thread Develop Team
|
||||
* COPYRIGHT (C) 2006 - 2013, 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://openlab.rt-thread.com/license/LICENSE
|
||||
* 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
|
||||
* 2013-7-14 Peng Fan sep6200 implementation
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup sep6200
|
||||
*/
|
||||
|
||||
/*@{*/
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
@@ -49,7 +64,6 @@ void rt_timer_handler(int vector, void *param)
|
||||
/*
|
||||
* This function will handle serial interrupt
|
||||
*/
|
||||
#if 1
|
||||
void rt_serial_handler(int vector, void *param)
|
||||
{
|
||||
rt_uint32_t num;
|
||||
@@ -76,12 +90,10 @@ void rt_serial_handler(int vector, void *param)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function will init timer2 for system ticks
|
||||
*/
|
||||
|
||||
#define BUS4_FREQ 320000000UL
|
||||
#define TIMER_CLK BUS4_FREQ
|
||||
#define HZ 100
|
||||
@@ -147,19 +159,6 @@ void rt_hw_serial_putc(const char c)
|
||||
*(RP)(SEP6200_UART0_TXFIFO) = c;
|
||||
}
|
||||
|
||||
void printhex(unsigned int data)
|
||||
{
|
||||
int i = 0,a = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
a = (data>>(32-(i+1)*4))&0xf;
|
||||
if (((a<=9)&&(a>=0)))
|
||||
rt_hw_serial_putc(a + 0x30);
|
||||
else if ((a <= 0xf) && (a >= 0xa))
|
||||
rt_hw_serial_putc(a-0xa+0x61);
|
||||
}
|
||||
rt_hw_serial_putc('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used by rt_kprintf to display a string on console.
|
||||
*
|
||||
@@ -171,3 +170,5 @@ void rt_hw_console_output(const char *str)
|
||||
rt_hw_serial_putc(*str++);
|
||||
}
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
+14
-14
@@ -3,16 +3,16 @@
|
||||
#define __RTTHREAD_CFG_H__
|
||||
|
||||
#define RT_DEBUG
|
||||
//#define RT_DEBUG_IRQ 1
|
||||
//#define RT_DEBUG_TIMER 1
|
||||
/* #define RT_DEBUG_IRQ 1 */
|
||||
/* #define RT_DEBUG_TIMER 1 */
|
||||
|
||||
//#define RT_DEBUG_MEM 1
|
||||
//#define RT_DEBUG_MEMHEAP 1
|
||||
//#define RT_DEBUG_MODULE 1
|
||||
//#define RT_DEBUG_SCHEDULER 1
|
||||
//#define RT_DEBUG_SLAB 1
|
||||
//#define RT_DEBUG_THREAD 1
|
||||
//#define RT_DEBUG_IPC 1
|
||||
/* #define RT_DEBUG_MEM 1 */
|
||||
/* #define RT_DEBUG_MEMHEAP 1 */
|
||||
/* #define RT_DEBUG_MODULE 1 */
|
||||
/* #define RT_DEBUG_SCHEDULER 1 */
|
||||
/* #define RT_DEBUG_SLAB 1 */
|
||||
/* #define RT_DEBUG_THREAD 1 */
|
||||
/* #define RT_DEBUG_IPC 1 */
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 8
|
||||
@@ -37,7 +37,7 @@
|
||||
#define RT_USING_HOOK
|
||||
|
||||
/* Using Software Timer */
|
||||
//#define RT_USING_TIMER_SOFT
|
||||
#define RT_USING_TIMER_SOFT
|
||||
#define RT_TIMER_THREAD_PRIO 8
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 512
|
||||
#define RT_TIMER_TICK_PER_SECOND 10
|
||||
@@ -98,8 +98,8 @@
|
||||
|
||||
/* SECTION: Device filesystem support */
|
||||
/* using DFS support */
|
||||
//#define RT_USING_DFS //fanpeng
|
||||
//#define RT_USING_DFS_ELMFAT //fanpeng
|
||||
/* #define RT_USING_DFS */
|
||||
/* #define RT_USING_DFS_ELMFAT */
|
||||
/* #define RT_USING_DFS_YAFFS2 */
|
||||
|
||||
/* #define DFS_USING_WORKDIR */
|
||||
@@ -113,8 +113,8 @@
|
||||
|
||||
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
||||
/* Using lighweight TCP/IP protocol stack */
|
||||
//#define RT_USING_LWIP
|
||||
//#define RT_LWIP_DNS
|
||||
/* #define RT_USING_LWIP */
|
||||
/* #define RT_LWIP_DNS */
|
||||
|
||||
/* Trace LwIP protocol */
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
@@ -3,7 +3,7 @@ import os
|
||||
# toolchains options
|
||||
ARCH = 'unicore32'
|
||||
CPU = 'sep6200'
|
||||
TextBase = '0x00000000'
|
||||
TextBase = '0x40000000'
|
||||
|
||||
CROSS_TOOL = 'gcc'
|
||||
|
||||
@@ -13,10 +13,7 @@ if os.getenv('RTT_CC'):
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = '/usr/unicore/gnu-toolchain-unicore/uc4-1.0-beta-hard-RHELAS5/bin/'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armcc'
|
||||
EXEC_PATH = 'C:/Keil'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
else :
|
||||
print '================ERROR============================'
|
||||
print 'Not support yet!'
|
||||
print '================================================='
|
||||
@@ -43,7 +40,7 @@ if PLATFORM == 'gcc':
|
||||
DEVICE = ' '
|
||||
CFLAGS = DEVICE
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
|
||||
LFLAGS = DEVICE + ' -Bstatic --gc-sections -Map=rtthread_sep6200.map -cref -u _start -Ttext 0x40000000 -T sep6200.ld -L/usr/unicore/gnu-toolchain-unicore/uc4-1.0-beta-hard-RHELAS5/lib/gcc/unicore32-linux/4.4.2 -lgcc' + ' -Ttext ' + TextBase
|
||||
LFLAGS = DEVICE + ' -Bstatic --gc-sections -Map=rtthread_sep6200.map -cref -u _start -T sep6200.ld -L/usr/unicore/gnu-toolchain-unicore/uc4-1.0-beta-hard-RHELAS5/lib/gcc/unicore32-linux/4.4.2 -lgcc' + ' -Ttext ' + TextBase
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
Reference in New Issue
Block a user