Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
luozhenger
rt-thread
提交
a2fbc5f5
R
rt-thread
项目概览
luozhenger
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2fbc5f5
编写于
3月 11, 2015
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #431 from ArdaFu/master
[BSP] TM4C129X Fix bugs and errors.
上级
972b92bc
1daa96a2
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
53 addition
and
1710 deletion
+53
-1710
bsp/tm4c129x/applications/application.c
bsp/tm4c129x/applications/application.c
+1
-10
bsp/tm4c129x/applications/board.c
bsp/tm4c129x/applications/board.c
+15
-18
bsp/tm4c129x/applications/board.h
bsp/tm4c129x/applications/board.h
+1
-1
bsp/tm4c129x/drivers/drv_eth.c
bsp/tm4c129x/drivers/drv_eth.c
+8
-1
bsp/tm4c129x/drivers/drv_eth.h
bsp/tm4c129x/drivers/drv_eth.h
+1
-1
bsp/tm4c129x/drivers/drv_uart.c
bsp/tm4c129x/drivers/drv_uart.c
+2
-2
bsp/tm4c129x/libraries/SConscript
bsp/tm4c129x/libraries/SConscript
+0
-2
bsp/tm4c129x/libraries/inc/tm4c1294ncpdt.h
bsp/tm4c129x/libraries/inc/tm4c1294ncpdt.h
+6
-1657
bsp/tm4c129x/rtconfig.h
bsp/tm4c129x/rtconfig.h
+6
-6
bsp/tm4c129x/rtconfig.py
bsp/tm4c129x/rtconfig.py
+2
-2
bsp/tm4c129x/template.uvproj
bsp/tm4c129x/template.uvproj
+9
-9
bsp/tm4c129x/tm4c_rom.icf
bsp/tm4c129x/tm4c_rom.icf
+2
-1
未找到文件。
bsp/tm4c129x/applications/application.c
浏览文件 @
a2fbc5f5
...
...
@@ -13,23 +13,13 @@
*/
#include <rtthread.h>
#include <board.h>
#include <components.h>
#ifdef RT_USING_LWIP
#include "drv_eth.h"
#endif
/* thread phase init */
void
rt_init_thread_entry
(
void
*
parameter
)
{
/* Initialization RT-Thread Components */
rt_components_init
();
#ifdef RT_USING_FINSH
finsh_set_device
(
RT_CONSOLE_DEVICE_NAME
);
#endif
#ifdef RT_USING_LWIP
rt_hw_tiva_eth_init
();
#endif
}
int
rt_application_init
(
void
)
...
...
@@ -42,3 +32,4 @@ int rt_application_init(void)
return
0
;
}
bsp/tm4c129x/applications/board.c
浏览文件 @
a2fbc5f5
...
...
@@ -15,9 +15,9 @@
#include <rthw.h>
#include <rtthread.h>
#include <components.h>
#include "board.h"
#include "drv_uart.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
...
...
@@ -61,23 +61,27 @@ extern void HardFault_Handler(void);
*/
void
rt_hw_board_init
()
{
MAP_IntMasterDisable
();
//init low level drivers. e.g. cpu uart etc.
rt_components_board_init
();
//redirect RTT stdio to CONSOLE device
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
}
int
rt_hw_cpu_init
(
void
)
{
MAP_IntMasterDisable
();
IntRegister
(
FAULT_HARD
,
HardFault_Handler
);
IntRegister
(
FAULT_PENDSV
,
PendSV_Handler
);
IntRegister
(
FAULT_SYSTICK
,
SysTick_Handler
);
//
// Enable lazy stacking for interrupt handlers. This allows floating-point
// instructions to be used within interrupt handlers, but at the expense of
// extra stack usage.
//
MAP_FPULazyStackingEnable
();
//
// Set the clocking to run directly from the external crystal/oscillator.
// TODO: The SYSCTL_XTAL_ value must be changed to match the value of the
// crystal on your board.
//
SysClock
=
MAP_SysCtlClockFreqSet
(
(
SYSCTL_XTAL_25MHZ
|
SYSCTL_OSC_MAIN
|
SYSCTL_USE_PLL
|
SYSCTL_CFG_VCO_480
),
SYS_CLOCK_DEFAULT
);
...
...
@@ -87,15 +91,8 @@ void rt_hw_board_init()
MAP_SysTickIntEnable
();
MAP_SysTickEnable
();
/* set pend exception priority */
//IntPrioritySet(FAULT_PENDSV, (1 << 5) - 1);
/*init uart device*/
rt_hw_uart_init
();
//redirect RTT stdio to CONSOLE device
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
//
// Enable interrupts to the processor.
//
MAP_IntMasterEnable
();
return
0
;
}
// rt_hw_cpu_init should be run before any other INIT_BOARD_EXPORT
// We use INIT_EXPORT here and set the sequence index to "0.xxxx"
INIT_EXPORT
(
rt_hw_cpu_init
,
"0.post"
);
bsp/tm4c129x/applications/board.h
浏览文件 @
a2fbc5f5
...
...
@@ -17,7 +17,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include "tm4c129
xnczad
.h"
#include "tm4c129
4ncpdt
.h"
#include <rtthread.h>
#include <stdbool.h>
#include <stdint.h>
...
...
bsp/tm4c129x/drivers/drv_eth.c
浏览文件 @
a2fbc5f5
...
...
@@ -146,6 +146,8 @@ extern void lwIPHostGetTime(u32_t *time_s, u32_t *time_ns);
#include "lwipopts.h"
#include "drv_eth.h"
#include <components.h>
/**
* A structure used to keep track of driver state and error counts.
*/
...
...
@@ -1378,7 +1380,7 @@ static struct pbuf* eth_dev_rx(rt_device_t dev)
return
(
result
==
RT_EOK
)
?
(
struct
pbuf
*
)
temp
:
RT_NULL
;
}
rt_err_
t
rt_hw_tiva_eth_init
(
void
)
in
t
rt_hw_tiva_eth_init
(
void
)
{
rt_err_t
result
;
...
...
@@ -1406,6 +1408,11 @@ rt_err_t rt_hw_tiva_eth_init(void)
result
=
eth_device_init
(
&
(
eth_dev
->
parent
),
"e0"
);
return
result
;
}
// eth_device_init using malloc
// We use INIT_COMPONENT_EXPORT insted of INIT_BOARD_EXPORT
INIT_COMPONENT_EXPORT
(
rt_hw_tiva_eth_init
);
#if 0
#ifdef RT_USING_FINSH
#include "finsh.h"
...
...
bsp/tm4c129x/drivers/drv_eth.h
浏览文件 @
a2fbc5f5
...
...
@@ -15,6 +15,6 @@
#ifndef __TIVA_ETH_H__
#define __TIVA_ETH_H__
rt_err_
t
rt_hw_tiva_eth_init
(
void
);
in
t
rt_hw_tiva_eth_init
(
void
);
#endif
bsp/tm4c129x/drivers/drv_uart.c
浏览文件 @
a2fbc5f5
...
...
@@ -18,7 +18,7 @@
#include <rtdevice.h>
#include "board.h"
//
#include <components.h>
#include <components.h>
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
...
...
@@ -220,4 +220,4 @@ int rt_hw_uart_init(void)
#endif
return
0
;
}
//
INIT_BOARD_EXPORT(rt_hw_uart_init);
INIT_BOARD_EXPORT
(
rt_hw_uart_init
);
bsp/tm4c129x/libraries/SConscript
浏览文件 @
a2fbc5f5
...
...
@@ -14,8 +14,6 @@ elif rtconfig.CROSS_TOOL == 'keil':
src
+=
[
'startup/startup_rvmdk.S'
]
elif
rtconfig
.
CROSS_TOOL
==
'iar'
:
src
+=
[
'startup/startup_ewarm.c'
]
elif
rtconfig
.
CROSS_TOOL
==
'ccs'
:
src
+=
[
'startup/startup_ccs.c'
]
CPPPATH
=
[
cwd
,
cwd
+
'/inc'
,
cwd
+
'/driverlib'
]
...
...
bsp/tm4c129x/libraries/inc/tm4c129
xnczad
.h
→
bsp/tm4c129x/libraries/inc/tm4c129
4ncpdt
.h
浏览文件 @
a2fbc5f5
此差异已折叠。
点击以展开。
bsp/tm4c129x/rtconfig.h
浏览文件 @
a2fbc5f5
...
...
@@ -180,19 +180,19 @@
// <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
#define RT_LWIP_PBUF_NUM
8
// <integer name="RT_LWIP_TCP_PCB_NUM" description="Maximal number of simultaneously active TCP connections" default="5" />
#define RT_LWIP_TCP_PCB_NUM
3
#define RT_LWIP_TCP_PCB_NUM
5
// <integer name="RT_LWIP_TCP_SND_BUF" description="TCP sender buffer size" default="8192" />
#define RT_LWIP_TCP_SND_BUF
4086
#define RT_LWIP_TCP_SND_BUF
8192
// <integer name="RT_LWIP_TCP_WND" description="TCP receive window" default="8192" />
#define RT_LWIP_TCP_WND
2048
#define RT_LWIP_TCP_WND
8192
// <bool name="RT_LWIP_SNMP" description="Enable SNMP protocol" default="false" />
// #define RT_LWIP_SNMP
// <bool name="RT_LWIP_DHCP" description="Enable DHCP client to get IP address" default="false" />
//
#define RT_LWIP_DHCP
#define RT_LWIP_DHCP
// <integer name="RT_LWIP_TCP_SEG_NUM" description="the number of simultaneously queued TCP" default="4" />
#define RT_LWIP_TCP_SEG_NUM
12
#define RT_LWIP_TCP_SEG_NUM
24
// <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" />
...
...
bsp/tm4c129x/rtconfig.py
浏览文件 @
a2fbc5f5
...
...
@@ -29,8 +29,8 @@ elif CROSS_TOOL == 'iar':
if
os
.
getenv
(
'RTT_EXEC_PATH'
):
EXEC_PATH
=
os
.
getenv
(
'RTT_EXEC_PATH'
)
BUILD
=
'debug'
#
BUILD = 'release'
#
BUILD = 'debug'
BUILD
=
'release'
if
PLATFORM
==
'gcc'
:
# tool-chains
...
...
bsp/tm4c129x/template.uvproj
浏览文件 @
a2fbc5f5
...
...
@@ -12,26 +12,26 @@
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
<TargetCommonOption>
<Device>
TM4C129
XNCZAD
</Device>
<Device>
TM4C129
4NCPDT
</Device>
<Vendor>
Texas Instruments
</Vendor>
<PackID>
Keil.TM4C_DFP.1.0.0
</PackID>
<PackURL>
http://www.keil.com/pack/
</PackURL>
<Cpu>
IROM(0x00000000,0x100000) IRAM(0x20000000,0x040000) CPUTYPE("Cortex-M4") FPU2 CLOCK(120000000) ELITTLE
</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C129_1024 -FS00 -FL0100000 -FP0($$Device:TM4C129
XNCZAD
$Flash\TM4C129_1024.FLM))
</FlashDriverDll>
<DeviceId>
70
96
</DeviceId>
<RegisterFile>
$$Device:TM4C129
XNCZAD
$Device\Include\TM4C129\TM4C129.h
</RegisterFile>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0TM4C129_1024 -FS00 -FL0100000 -FP0($$Device:TM4C129
4NCPDT
$Flash\TM4C129_1024.FLM))
</FlashDriverDll>
<DeviceId>
70
88
</DeviceId>
<RegisterFile>
$$Device:TM4C129
4NCPDT
$Device\Include\TM4C129\TM4C129.h
</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc>
-DTM4C129
XNCZAD
</SLE66CMisc>
<SLE66CMisc>
-DTM4C129
4NCPDT
</SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>
$$Device:TM4C129
XNCZAD$SVD\TM4C129\TM4C129XNCZAD
.svd
</SFDFile>
<SFDFile>
$$Device:TM4C129
4NCPDT$SVD\TM4C129\TM4C1294NCPDT
.svd
</SFDFile>
<bCustSvd>
0
</bCustSvd>
<UseEnv>
0
</UseEnv>
<BinPath></BinPath>
...
...
@@ -52,7 +52,7 @@
<CreateLib>
0
</CreateLib>
<CreateHexFile>
0
</CreateHexFile>
<DebugInformation>
1
</DebugInformation>
<BrowseInformation>
0
</BrowseInformation>
<BrowseInformation>
1
</BrowseInformation>
<ListingPath>
.\
</ListingPath>
<HexFormatSelection>
1
</HexFormatSelection>
<Merge32K>
0
</Merge32K>
...
...
@@ -148,7 +148,7 @@
<UsePdscDebugDescription>
1
</UsePdscDebugDescription>
</Target>
<RunDebugAfterBuild>
0
</RunDebugAfterBuild>
<TargetSelection>
3
</TargetSelection>
<TargetSelection>
6
</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
...
...
@@ -162,7 +162,7 @@
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
<Driver>
BIN\lmidk-agdi
.dll
</Driver>
<Driver>
Segger\JL2CM3
.dll
</Driver>
</TargetDlls>
</DebugOption>
<Utilities>
...
...
bsp/tm4c129x/tm4c_rom.icf
浏览文件 @
a2fbc5f5
...
...
@@ -77,4 +77,5 @@ place at start of SRAM { section VTABLE };
//
place in SRAM { readwrite, block HEAP };
keep { section FSymTab };
keep { section VSymTab };
\ No newline at end of file
keep { section VSymTab };
keep { section .rti_fn* };
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录