mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
prepare RT-Thread 1.1.0 alpha release.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2064 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -13,19 +13,37 @@
|
||||
* 2010-03-04 Magicoe for LPC1766 version
|
||||
* 2010-05-02 Aozima add led function
|
||||
* 2010-05-24 Bernard add filesystem initialization and move led function to led.c
|
||||
* 2012-04-15 Bernard enable components_init.
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
#include <components_init.h>
|
||||
#endif
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <emac.h>
|
||||
#endif
|
||||
#ifdef RT_USING_DFS
|
||||
#include <dfs_fs.h>
|
||||
#endif
|
||||
|
||||
/* thread phase init */
|
||||
void rt_init_thread_entry(void *parameter)
|
||||
{
|
||||
/* initialize platform */
|
||||
platform_init();
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
/* register Ethernet interface device */
|
||||
lpc17xx_emac_hw_init();
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
/* initialization RT-Thread Components */
|
||||
rt_components_init();
|
||||
#endif
|
||||
|
||||
/* Filesystem Initialization */
|
||||
#ifdef RT_USING_DFS
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* File : platform.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, 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
|
||||
* 2012-04-15 Bernard the first version.
|
||||
*/
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef RT_USING_MEMHEAP
|
||||
static struct rt_memheap _memheap;
|
||||
#endif
|
||||
|
||||
void platform_init(void)
|
||||
{
|
||||
#ifdef RT_USING_MEMHEAP
|
||||
/* create memory heap object on 0x2007 C000 - 0x2008 4000*/
|
||||
#ifdef RT_USING_LWIP
|
||||
rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 16*1024);
|
||||
#else
|
||||
rt_memheap_init(&_memheap, "system", (void*)0x2007C000, 32*1024);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* File : platform.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, 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
|
||||
* 2012-04-15 Bernard the first version.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_H__
|
||||
#define __PLATFORM_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
void platform_init(void);
|
||||
|
||||
#endif
|
||||
+250
-407
File diff suppressed because it is too large
Load Diff
+101
-80
File diff suppressed because it is too large
Load Diff
@@ -376,7 +376,7 @@
|
||||
<ScatterFile></ScatterFile>
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc> --keep __fsym_* --keep __vsym_* </Misc>
|
||||
<Misc>--keep __fsym_* --keep __vsym_*</Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings></DisabledWarnings>
|
||||
</LDads>
|
||||
@@ -391,6 +391,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\application.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>platform.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\platform.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>startup.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -619,7 +624,7 @@
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>ComponentsInit</GroupName>
|
||||
<GroupName>Components</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>components_init.c</FileName>
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
// <section name="MM" description="Memory Management" default="always" >
|
||||
// <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
|
||||
#define RT_USING_MEMPOOL
|
||||
// <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Object in the system" default="true" />
|
||||
#define RT_USING_MEMHEAP
|
||||
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
|
||||
#define RT_USING_HEAP
|
||||
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
|
||||
@@ -110,7 +112,7 @@
|
||||
// </integer>
|
||||
#define RT_DFS_ELM_USE_LFN 1
|
||||
// <integer name="RT_DFS_ELM_MAX_LFN" description="Maximal size of file name length" default="256" />
|
||||
#define RT_DFS_ELM_MAX_LFN 256
|
||||
#define RT_DFS_ELM_MAX_LFN 64
|
||||
// <bool name="RT_USING_DFS_YAFFS2" description="Using YAFFS2" default="false" />
|
||||
// #define RT_USING_DFS_YAFFS2
|
||||
// <bool name="RT_USING_DFS_UFFS" description="Using UFFS" default="false" />
|
||||
@@ -125,8 +127,6 @@
|
||||
|
||||
// <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" >
|
||||
#define RT_USING_LWIP
|
||||
// <bool name="RT_LWIP_USING_RT_MEM" description="Using RT-Thread memory management for LwIP" default="true" />
|
||||
#define RT_LWIP_USING_RT_MEM
|
||||
// <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" />
|
||||
#define RT_LWIP_ICMP
|
||||
// <bool name="RT_LWIP_IGMP" description="Enable IGMP protocol" default="false" />
|
||||
@@ -137,8 +137,10 @@
|
||||
#define RT_LWIP_TCP
|
||||
// <bool name="RT_LWIP_DNS" description="Enable DNS protocol" default="true" />
|
||||
#define RT_LWIP_DNS
|
||||
// <integer name="RT_LWIP_PBUF_NUM" description="Maximal number of buffers in the pbuf pool" default="4" />
|
||||
#define RT_LWIP_PBUF_NUM 4
|
||||
// <integer name="RT_LWIP_TCP_PCB_NUM" description="Maximal number of simultaneously active TCP connections" default="5" />
|
||||
#define RT_LWIP_TCP_PCB_NUM 5
|
||||
#define RT_LWIP_TCP_PCB_NUM 3
|
||||
// <integer name="RT_LWIP_TCP_SND_BUF" description="TCP sender buffer size" default="8192" />
|
||||
#define RT_LWIP_TCP_SND_BUF 2048
|
||||
// <integer name="RT_LWIP_TCP_WND" description="TCP receive window" default="8192" />
|
||||
@@ -147,8 +149,8 @@
|
||||
// #define RT_LWIP_SNMP
|
||||
// <bool name="RT_LWIP_DHCP" description="Enable DHCP client to get IP address" default="false" />
|
||||
// #define RT_LWIP_DHCP
|
||||
// <integer name="RT_LWIP_TCP_SEG_NUM" description="the number of simultaneously queued TCP" default="8" />
|
||||
#define RT_LWIP_TCP_SEG_NUM 8
|
||||
// <integer name="RT_LWIP_TCP_SEG_NUM" description="the number of simultaneously queued TCP" default="4" />
|
||||
#define RT_LWIP_TCP_SEG_NUM 4
|
||||
// <integer name="RT_LWIP_TCPTHREAD_PRIORITY" description="the thread priority of TCP thread" default="128" />
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 12
|
||||
// <integer name="RT_LWIP_TCPTHREAD_MBOX_SIZE" description="the mail box size of TCP thread to wait for" default="32" />
|
||||
|
||||
Reference in New Issue
Block a user