Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
卖小麦←_←
rt-thread
提交
01671090
R
rt-thread
项目概览
卖小麦←_←
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01671090
编写于
3月 08, 2019
作者:
misonyo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp/lpc408x]更新旧启动机制
上级
60b15494
变更
39
隐藏空白更改
内联
并排
Showing
39 changed file
with
1392 addition
and
2552 deletion
+1392
-2552
bsp/lpc408x/.config
bsp/lpc408x/.config
+153
-43
bsp/lpc408x/README.md
bsp/lpc408x/README.md
+14
-14
bsp/lpc408x/SConscript
bsp/lpc408x/SConscript
+2
-1
bsp/lpc408x/SConstruct
bsp/lpc408x/SConstruct
+7
-2
bsp/lpc408x/applications/SConscript
bsp/lpc408x/applications/SConscript
+2
-4
bsp/lpc408x/applications/application.c
bsp/lpc408x/applications/application.c
+0
-38
bsp/lpc408x/applications/canapp.c
bsp/lpc408x/applications/canapp.c
+0
-80
bsp/lpc408x/applications/main.c
bsp/lpc408x/applications/main.c
+19
-0
bsp/lpc408x/applications/sram.c
bsp/lpc408x/applications/sram.c
+0
-43
bsp/lpc408x/applications/sram.h
bsp/lpc408x/applications/sram.h
+0
-18
bsp/lpc408x/applications/startup.c
bsp/lpc408x/applications/startup.c
+0
-67
bsp/lpc408x/drivers/Kconfig
bsp/lpc408x/drivers/Kconfig
+41
-17
bsp/lpc408x/drivers/SConscript
bsp/lpc408x/drivers/SConscript
+19
-5
bsp/lpc408x/drivers/board.c
bsp/lpc408x/drivers/board.c
+21
-18
bsp/lpc408x/drivers/board.h
bsp/lpc408x/drivers/board.h
+50
-0
bsp/lpc408x/drivers/drv_emac.c
bsp/lpc408x/drivers/drv_emac.c
+2
-2
bsp/lpc408x/drivers/drv_emac.h
bsp/lpc408x/drivers/drv_emac.h
+4
-5
bsp/lpc408x/drivers/drv_hwtimer.c
bsp/lpc408x/drivers/drv_hwtimer.c
+6
-5
bsp/lpc408x/drivers/drv_hwtimer.h
bsp/lpc408x/drivers/drv_hwtimer.h
+13
-5
bsp/lpc408x/drivers/drv_led.c
bsp/lpc408x/drivers/drv_led.c
+3
-2
bsp/lpc408x/drivers/drv_led.h
bsp/lpc408x/drivers/drv_led.h
+16
-0
bsp/lpc408x/drivers/drv_lpccan.c
bsp/lpc408x/drivers/drv_lpccan.c
+0
-1086
bsp/lpc408x/drivers/drv_lpccan.h
bsp/lpc408x/drivers/drv_lpccan.h
+0
-25
bsp/lpc408x/drivers/drv_sdram.c
bsp/lpc408x/drivers/drv_sdram.c
+33
-37
bsp/lpc408x/drivers/drv_sdram.h
bsp/lpc408x/drivers/drv_sdram.h
+12
-11
bsp/lpc408x/drivers/drv_uart.c
bsp/lpc408x/drivers/drv_uart.c
+20
-116
bsp/lpc408x/drivers/drv_uart.h
bsp/lpc408x/drivers/drv_uart.h
+2
-2
bsp/lpc408x/drivers/linker_scripts/link.lds
bsp/lpc408x/drivers/linker_scripts/link.lds
+3
-2
bsp/lpc408x/drivers/linker_scripts/link.sct
bsp/lpc408x/drivers/linker_scripts/link.sct
+0
-0
bsp/lpc408x/project.uvopt
bsp/lpc408x/project.uvopt
+14
-16
bsp/lpc408x/project.uvoptx
bsp/lpc408x/project.uvoptx
+177
-0
bsp/lpc408x/project.uvproj
bsp/lpc408x/project.uvproj
+180
-366
bsp/lpc408x/project.uvprojx
bsp/lpc408x/project.uvprojx
+277
-348
bsp/lpc408x/rtconfig.h
bsp/lpc408x/rtconfig.h
+51
-102
bsp/lpc408x/rtconfig.py
bsp/lpc408x/rtconfig.py
+13
-16
bsp/lpc408x/template.uvopt
bsp/lpc408x/template.uvopt
+14
-16
bsp/lpc408x/template.uvoptx
bsp/lpc408x/template.uvoptx
+177
-0
bsp/lpc408x/template.uvproj
bsp/lpc408x/template.uvproj
+23
-10
bsp/lpc408x/template.uvprojx
bsp/lpc408x/template.uvprojx
+24
-30
未找到文件。
bsp/lpc408x/.config
浏览文件 @
01671090
...
...
@@ -7,20 +7,31 @@
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX
=
8
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_ALIGN_SIZE
=
4
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32
=
y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
CONFIG_RT_THREAD_PRIORITY_MAX
=
32
CONFIG_RT_TICK_PER_SECOND
=
100
CONFIG_RT_DEBUG
=
y
CONFIG_RT_DEBUG_COLOR
=
y
CONFIG_RT_TICK_PER_SECOND
=
1000
CONFIG_RT_USING_OVERFLOW_CHECK
=
y
CONFIG_RT_DEBUG_INIT
=
0
CONFIG_RT_DEBUG_THREAD
=
0
CONFIG_RT_USING_HOOK
=
y
CONFIG_IDLE_THREAD_STACK_SIZE
=
512
CONFIG_RT_USING_IDLE_HOOK
=
y
CONFIG_RT_IDEL_HOOK_LIST_SIZE
=
4
CONFIG_IDLE_THREAD_STACK_SIZE
=
256
# CONFIG_RT_USING_TIMER_SOFT is not set
CONFIG_RT_DEBUG
=
y
CONFIG_RT_DEBUG_COLOR
=
y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
# CONFIG_RT_DEBUG_MEM_CONFIG is not set
# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
#
# Inter-Thread communication
...
...
@@ -38,29 +49,33 @@ CONFIG_RT_USING_MESSAGEQUEUE=y
CONFIG_RT_USING_MEMPOOL
=
y
CONFIG_RT_USING_MEMHEAP
=
y
# CONFIG_RT_USING_NOHEAP is not set
CONFIG_RT_USING_SMALL_MEM
=
y
# CONFIG_RT_USING_SMALL_MEM is not set
# CONFIG_RT_USING_SLAB is not set
# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
# CONFIG_RT_USING_MEMTRACE is not set
CONFIG_RT_USING_MEMHEAP_AS_HEAP
=
y
CONFIG_RT_USING_HEAP
=
y
#
# Kernel Device Object
#
CONFIG_RT_USING_DEVICE
=
y
# CONFIG_RT_USING_DEVICE_OPS is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart0"
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_VER_NUM
=
0
x40001
CONFIG_ARCH_ARM
=
y
CONFIG_ARCH_ARM_CORTEX_M
=
y
CONFIG_ARCH_ARM_CORTEX_M4
=
y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
#
# RT-Thread Components
#
# CONFIG_RT_USING_COMPONENTS_INIT is not set
CONFIG_RT_USING_COMPONENTS_INIT
=
y
CONFIG_RT_USING_USER_MAIN
=
y
CONFIG_RT_MAIN_THREAD_STACK_SIZE
=
2048
CONFIG_RT_MAIN_THREAD_PRIORITY
=
10
#
# C++ features
...
...
@@ -76,13 +91,15 @@ CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES
=
5
CONFIG_FINSH_USING_SYMTAB
=
y
CONFIG_FINSH_USING_DESCRIPTION
=
y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY
=
20
CONFIG_FINSH_THREAD_STACK_SIZE
=
4096
CONFIG_FINSH_CMD_SIZE
=
80
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_USING_MSH
=
y
CONFIG_FINSH_USING_MSH_DEFAULT
=
y
# CONFIG_FINSH_USING_MSH_ONLY is not set
CONFIG_FINSH_USING_MSH_ONLY
=
y
CONFIG_FINSH_ARG_MAX
=
10
#
# Device virtual file system
...
...
@@ -92,6 +109,7 @@ CONFIG_DFS_USING_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX
=
2
CONFIG_DFS_FILESYSTEM_TYPES_MAX
=
2
CONFIG_DFS_FD_MAX
=
16
# CONFIG_RT_USING_DFS_MNTTABLE is not set
CONFIG_RT_USING_DFS_ELMFAT
=
y
#
...
...
@@ -110,30 +128,40 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT
=
y
CONFIG_RT_USING_DFS_DEVFS
=
y
# CONFIG_RT_USING_DFS_NET is not set
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
# CONFIG_RT_USING_DFS_UFFS is not set
# CONFIG_RT_USING_DFS_JFFS2 is not set
# CONFIG_RT_USING_DFS_NFS is not set
#
# Device Drivers
#
CONFIG_RT_USING_DEVICE_IPC
=
y
CONFIG_RT_PIPE_BUFSZ
=
512
CONFIG_RT_USING_SERIAL
=
y
CONFIG_RT_SERIAL_USING_DMA
=
y
CONFIG_RT_USING_CAN
=
y
CONFIG_RT_SERIAL_RB_BUFSZ
=
64
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_MTD is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
#
# Using WiFi
#
# CONFIG_RT_USING_WIFI is not set
#
...
...
@@ -145,28 +173,36 @@ CONFIG_RT_USING_PIN=y
#
# POSIX layer and C standard library
#
CONFIG_RT_USING_LIBC
=
y
CONFIG_RT_USING_PTHREADS
=
y
CONFIG_RT_USING_POSIX
=
y
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_AIO is not set
# CONFIG_HAVE_SYS_SIGNALS is not set
# CONFIG_RT_USING_LIBC is not set
# CONFIG_RT_USING_PTHREADS is not set
#
# Network
stack
# Network
#
#
# Socket abstraction layer
#
# CONFIG_RT_USING_SAL is not set
#
# light weight TCP/IP stack
#
# CONFIG_RT_USING_LWIP is not set
# CONFIG_RT_USING_LWIP141 is not set
# CONFIG_RT_USING_LWIP202 is not set
# CONFIG_RT_USING_LWIP210 is not set
#
# Modbus master and slave stack
#
# CONFIG_RT_USING_MODBUS is not set
#
# AT commands
#
# CONFIG_RT_USING_AT is not set
#
# VBUS(Virtual Software BUS)
#
...
...
@@ -177,43 +213,33 @@ CONFIG_RT_USING_POSIX=y
#
# CONFIG_RT_USING_LOGTRACE is not set
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
#
# ARM CMSIS
#
# CONFIG_RT_USING_CMSIS_OS is not set
# CONFIG_RT_USING_RTT_CMSIS is not set
# CONFIG_RT_USING_LWP is not set
#
# RT-Thread online packages
#
#
# system packages
#
#
# RT-Thread GUI Engine
#
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
#
# IoT - internet of things
#
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_LJSON is not set
# CONFIG_PKG_USING_EZXML is not set
# CONFIG_PKG_USING_NANOPB is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
#
# Wi-Fi
...
...
@@ -231,6 +257,17 @@ CONFIG_RT_USING_POSIX=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_WIZNET is not set
#
# IoT Cloud
#
# CONFIG_PKG_USING_ONENET is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOTKIT is not set
#
# security packages
...
...
@@ -242,6 +279,7 @@ CONFIG_RT_USING_POSIX=y
#
# language packages
#
# CONFIG_PKG_USING_LUA is not set
# CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set
...
...
@@ -249,27 +287,99 @@ CONFIG_RT_USING_POSIX=y
# multimedia packages
#
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
#
# tools packages
#
# CONFIG_PKG_USING_CMBACKTRACE is not set
# CONFIG_PKG_USING_EASYFLASH is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW is not set
# CONFIG_PKG_USING_IPERF is not set
# CONFIG_PKG_USING_RDB is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
#
# system packages
#
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_CAIRO is not set
# CONFIG_PKG_USING_PIXMAN is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
# CONFIG_PKG_USING_LITTLEFS is not set
#
# peripheral libraries and drivers
#
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
# CONFIG_PKG_USING_SHT2X is not set
# CONFIG_PKG_USING_AHT10 is not set
# CONFIG_PKG_USING_AP3216C is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set
# CONFIG_PKG_USING_BUTTON is not set
# CONFIG_PKG_USING_MPU6XXX is not set
# CONFIG_PKG_USING_PCF8574 is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
#
# miscellaneous packages
#
# CONFIG_PKG_USING_LIBCSV is not set
# CONFIG_PKG_USING_OPTPARSE is not set
# CONFIG_PKG_USING_FASTLZ is not set
# CONFIG_PKG_USING_MINILZO is not set
# CONFIG_PKG_USING_QUICKLZ is not set
# CONFIG_PKG_USING_MULTIBUTTON is not set
# CONFIG_PKG_USING_CANFESTIVAL is not set
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
#
#
example package: hello
#
samples: kernel and components samples
#
# CONFIG_PKG_USING_KERNEL_SAMPLES is not set
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_
MULTIBUTTON
is not set
# CONFIG_PKG_USING_
VI
is not set
CONFIG_SOC_LPC4088
=
y
# CONFIG_RT_USING_UART0 is not set
CONFIG_RT_USING_UART1
=
y
#
# Hardware Drivers Config
#
#
# On-chip Peripheral Drivers
#
# CONFIG_BSP_USING_EMAC is not set
# CONFIG_BSP_USING_HWTIMER0 is not set
#
# UART Drivers
#
CONFIG_BSP_USING_UART0
=
y
# CONFIG_BSP_USING_UART2 is not set
#
# Onboard Peripheral Drivers
#
# CONFIG_BSP_USING_SDRAM is not set
# CONFIG_BSP_USING_LED is not set
#
# Offboard Peripheral Drivers
#
bsp/lpc408x/README.md
浏览文件 @
01671090
# LPC408x
# LPC408x
BSP 使用说明
## 简介
LPC408x
是RT-Thread推出的一款基于LPC408x
系列的评估板,板载资源主要如下:
LPC408x
是 RT-Thread 推出的一款基于 LPC408x
系列的评估板,板载资源主要如下:
| 硬件 | 描述 |
| --------- | ------------- |
| 芯片型号 | LPC4088FET208 |
| CPU | ARM Cortex M4 |
| 主频 | 120M |
| 片内
SRAM | 64K
|
| 片外SDRAM | 32M |
| 片内FLASH | 512K |
| 片内
SRAM | 64K
|
| 片外
SDRAM | 32M |
| 片内
FLASH | 512K |
## 编译说明
LPC408x
板级包支持MDK4﹑MDK5开发环境和GCC
编译器,以下是具体版本信息:
LPC408x
板级包支持 MDK4﹑MDK5 开发环境和 GCC
编译器,以下是具体版本信息:
| IDE
/
编译器 | 已测试版本 |
| IDE
/
编译器 | 已测试版本 |
| ---------- | ---------------------------- |
| MDK4 | MDK4.74 |
| MDK5 | MDK524a |
...
...
@@ -25,15 +25,15 @@ LPC408x板级包支持MDK4﹑MDK5开发环境和GCC编译器,以下是具体
## 烧写及执行
供电方式:使用方口USB 连接电脑和开发板。
供电方式:使用方口
USB 连接电脑和开发板。
下载程序:使用
JLink/ULink等等仿真器连接到板子上的20Pin
仿真口。
下载程序:使用
JLink/ULink 等等仿真器连接到板子上的 20Pin
仿真口。
串口连接:板载
CP2102,连接了USB
后打开相应的串口即可。
串口连接:板载
CP2102,连接了 USB
后打开相应的串口即可。
### 运行结果
如果编译 & 烧写无误,当复位设备后,会在串口上看到
RT-Thread的启动logo
信息:
如果编译 & 烧写无误,当复位设备后,会在串口上看到
RT-Thread 的启动 logo
信息:
```
bash
\
| /
...
...
@@ -47,14 +47,14 @@ finsh />
| 驱动 | 支持情况 | 备注 |
| ----- | -------- | :------------: |
| UART | 支持 | UART0
~4
|
| UART | 支持 | UART0
/2
|
| ETH | 支持 | |
| LCD | 支持 | |
| SDRAM | 支持 | |
### IO在板级支持包中的映射情况
### IO
在板级支持包中的映射情况
| IO号 | 板级包中的定义 |
| IO
号 | 板级包中的定义 |
| ----- | -------------- |
| P3_14 | LED1 |
| P3_3 | LED2 |
...
...
bsp/lpc408x/SConscript
浏览文件 @
01671090
from
building
import
*
cwd
=
str
(
Dir
(
'#'
))
cwd
=
GetCurrentDir
()
objs
=
[]
list
=
os
.
listdir
(
cwd
)
...
...
bsp/lpc408x/SConstruct
浏览文件 @
01671090
...
...
@@ -10,7 +10,7 @@ else:
sys
.
path
=
sys
.
path
+
[
os
.
path
.
join
(
RTT_ROOT
,
'tools'
)]
from
building
import
*
TARGET
=
'rtthread
-%s.%s'
%
(
rtconfig
.
BOARD_NAME
,
rtconfig
.
TARGET_EXT
)
TARGET
=
'rtthread
.'
+
rtconfig
.
TARGET_EXT
env
=
Environment
(
tools
=
[
'mingw'
],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
...
...
@@ -20,11 +20,16 @@ env = Environment(tools = ['mingw'],
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
if
rtconfig
.
PLATFORM
==
'iar'
:
env
.
Replace
(
CCCOM
=
[
'$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
ARFLAGS
=
[
''
])
env
.
Replace
(
LINKCOM
=
env
[
"LINKCOM"
]
+
' --map project.map'
)
Export
(
'RTT_ROOT'
)
Export
(
'rtconfig'
)
# prepare building environment
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
)
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
,
has_libcpu
=
False
)
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/lpc408x/applications/SConscript
浏览文件 @
01671090
Import
(
'RTT_ROOT'
)
Import
(
'rtconfig'
)
from
building
import
*
cwd
=
os
.
path
.
join
(
str
(
Dir
(
'#'
)),
'applications'
)
src
=
Glob
(
'*.c'
)
cwd
=
GetCurrentDir
()
CPPPATH
=
[
cwd
,
str
(
Dir
(
'#'
))]
src
=
Glob
(
'*.c'
)
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
...
...
bsp/lpc408x/applications/application.c
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2014-01-02 xiaonong the first version for lpc408x
*/
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
/* thread phase init */
void
rt_init_thread_entry
(
void
*
parameter
)
{
/* Initialization RT-Thread Components */
#ifdef RT_USING_COMPONENTS_INIT
rt_components_init
();
#elif defined(RT_USING_FINSH)
finsh_system_init
();
#endif
}
int
rt_application_init
(
void
)
{
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
);
return
0
;
}
bsp/lpc408x/applications/canapp.c
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-05-14 aubrcool@qq.com first version
*/
#include <board.h>
#include <rtthread.h>
#include <rtdevice.h>
#ifdef RT_USING_CAN
#include "drv_lpccan.h"
struct
can_app_struct
{
const
char
*
name
;
struct
rt_can_filter_config
*
filter
;
rt_uint8_t
eventopt
;
struct
rt_semaphore
sem
;
};
static
struct
can_app_struct
can_data
[
1
];
struct
rt_can_filter_item
filter1item
[
4
]
=
{
LPC_CAN_AF_STD_INIT
(
1
),
LPC_CAN_AF_STD_GRP_INIT
(
3
,
5
),
LPC_CAN_AF_EXT_INIT
(
2
),
LPC_CAN_AF_EXT_GRP_INIT
(
4
,
6
),
};
struct
rt_can_filter_config
filter1
=
{
4
,
1
,
filter1item
,
};
static
struct
can_app_struct
can_data
[
1
]
=
{
{
"lpccan1"
,
&
filter1
,
RT_EVENT_FLAG_OR
|
RT_EVENT_FLAG_CLEAR
,
},
};
static
rt_err_t
lpccanind
(
rt_device_t
dev
,
rt_size_t
size
)
{
rt_sem_release
(
&
can_data
[
0
].
sem
);
}
void
rt_can_thread_entry
(
void
*
parameter
)
{
struct
rt_can_msg
msg
;
struct
can_app_struct
*
canpara
=
(
struct
can_app_struct
*
)
parameter
;
rt_device_t
candev
;
candev
=
rt_device_find
(
canpara
->
name
);
RT_ASSERT
(
candev
);
rt_sem_init
(
&
canpara
->
sem
,
canpara
->
name
,
0
,
RT_IPC_FLAG_FIFO
);
rt_device_open
(
candev
,
(
RT_DEVICE_OFLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_INT_TX
));
rt_device_control
(
candev
,
RT_CAN_CMD_SET_FILTER
,
canpara
->
filter
);
rt_device_set_rx_indicate
(
candev
,
lpccanind
);
while
(
1
)
{
rt_sem_take
(
&
canpara
->
sem
,
RT_WAITING_FOREVER
);
while
(
rt_device_read
(
candev
,
0
,
&
msg
,
sizeof
(
msg
))
==
sizeof
(
msg
))
{
rt_device_write
(
candev
,
0
,
&
msg
,
sizeof
(
msg
));
}
}
}
int
rt_can_app_init
(
void
)
{
rt_thread_t
tid
;
tid
=
rt_thread_create
(
"canapp1"
,
rt_can_thread_entry
,
&
can_data
[
0
],
512
,
RT_THREAD_PRIORITY_MAX
/
3
-
1
,
20
);
if
(
tid
!=
RT_NULL
)
rt_thread_startup
(
tid
);
return
0
;
}
INIT_APP_EXPORT
(
rt_can_app_init
);
#endif
/*RT_USING_CAN*/
bsp/lpc408x/applications/main.c
0 → 100644
浏览文件 @
01671090
/*
* Copyright (c) 2006-2018, Synwit Technology Co.,Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-12-10 armink first version
*/
#include <rtthread.h>
#include <rtdevice.h>
int
main
(
void
)
{
rt_kprintf
(
"Hello RT-Thread!
\n
"
);
return
RT_EOK
;
}
bsp/lpc408x/applications/sram.c
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2013-05-19 Bernard The first version for LPC40xx
*/
#include "sram.h"
#include "board.h"
#include <rtthread.h>
#ifdef LPC_EXT_SDRAM
struct
rt_memheap
system_heap
;
void
sram_init
(
void
)
{
/* initialize the built-in SRAM as a memory heap */
rt_memheap_init
(
&
system_heap
,
"system"
,
(
void
*
)
HEAP_BEGIN
,
(
rt_uint32_t
)
HEAP_END
-
(
rt_uint32_t
)
HEAP_BEGIN
);
}
void
*
sram_malloc
(
unsigned
long
size
)
{
return
rt_memheap_alloc
(
&
system_heap
,
size
);
}
void
sram_free
(
void
*
ptr
)
{
rt_memheap_free
(
ptr
);
}
void
*
sram_realloc
(
void
*
ptr
,
unsigned
long
size
)
{
return
rt_memheap_realloc
(
&
system_heap
,
ptr
,
size
);
}
#endif
bsp/lpc408x/applications/sram.h
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2013-05-19 Bernard The first version for LPC40xx
*/
#ifndef __SRAM_H__
#define __SRAM_H__
void
*
sram_malloc
(
unsigned
long
nbytes
);
void
sram_free
(
void
*
ptr
);
void
*
sram_realloc
(
void
*
ptr
,
unsigned
long
nbytes
);
#endif
bsp/lpc408x/applications/startup.c
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2009-01-05 Bernard first implementation
* 2010-03-04 Magicoe for LPC17xx
*/
#include <rthw.h>
#include <rtthread.h>
#include "board.h"
extern
int
rt_application_init
(
void
);
extern
void
sram_init
(
void
);
/**
* This function will startup RT-Thread RTOS.
*/
void
rtthread_startup
(
void
)
{
/* initialize board */
rt_hw_board_init
();
/* show version */
rt_show_version
();
#ifdef RT_USING_HEAP
#if LPC_EXT_SDRAM
rt_system_heap_init
((
void
*
)
LPC_EXT_SDRAM_BEGIN
,
(
void
*
)
LPC_EXT_SDRAM_END
);
sram_init
();
#else
rt_system_heap_init
((
void
*
)
HEAP_BEGIN
,
(
void
*
)
HEAP_END
);
#endif
#endif
/* initialize scheduler system */
rt_system_scheduler_init
();
/* initialize system timer*/
rt_system_timer_init
();
/* initialize application */
rt_application_init
();
/* initialize timer thread */
rt_system_timer_thread_init
();
/* initialize 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
;
}
bsp/lpc408x/drivers/Kconfig
浏览文件 @
01671090
config RT_USING_UART0
bool "Enable UART0"
default y
menu "Hardware Drivers Config"
config RT_USING_UART2
bool "Enable UART2"
default n
menu "On-chip Peripheral Drivers"
config RT_USING_UART4
bool "Enable UART4"
default n
config BSP_USING_EMAC
bool "EMAC driver"
select RT_USING_LWIP
default n
config BSP_DRV_CLCD
bool "CLCD driver
"
depends on PKG_USING_GUIENGINE
default y
config BSP_USING_HWTIMER0
bool "Using timer0
"
select RT_USING_HWTIMER
default n
config BSP_DRV_EMAC
bool "EMAC driver"
depends on RT_USING_LWIP
default y
menu "UART Drivers"
config BSP_USING_UART0
bool "Enable UART0 P0.2/P0.3(T/R)"
select RT_USING_SERIAL
default y
config BSP_USING_UART2
bool "Enable UART2 P2.8/P0.11(T/R)"
select RT_USING_SERIAL
default n
endmenu
endmenu
menu "Onboard Peripheral Drivers"
config BSP_USING_SDRAM
bool "Enable sdram"
default n
config BSP_USING_LED
bool "Enable LED"
default n
endmenu
menu "Offboard Peripheral Drivers"
endmenu
endmenu
bsp/lpc408x/drivers/SConscript
浏览文件 @
01671090
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
# remove no need file.
if
GetDepend
(
'RT_USING_LWIP'
)
==
False
:
SrcRemove
(
src
,
'drv_emac.c'
)
# add the general drivers.
src
=
Split
(
"""
board.c
"""
)
CPPPATH
=
[
cwd
]
if
GetDepend
([
'BSP_USING_EMAC'
]):
src
+=
[
'drv_emac.c'
]
if
GetDepend
([
'BSP_USING_HWTIMER0'
]):
src
+=
[
'drv_hwtimer.c'
]
if
GetDepend
([
'BSP_USING_LED'
]):
src
+=
[
'drv_led.c'
]
if
GetDepend
([
'BSP_USING_SDRAM'
]):
src
+=
[
'drv_sdram.c'
]
if
GetDepend
(
'BSP_USING_UART0'
)
or
GetDepend
(
'BSP_USING_UART2'
):
src
+=
[
'drv_uart.c'
]
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
...
...
bsp/lpc408x/
application
s/board.c
→
bsp/lpc408x/
driver
s/board.c
浏览文件 @
01671090
...
...
@@ -8,19 +8,14 @@
* 2009-01-05 Bernard first implementation
*/
#include <rthw.h>
#include <rtthread.h>
#include <board.h>
#i
nclude "board.h"
#include "drv_uart
.h"
#ifdef LPC_EXT_SDRAM
#include "drv_sdram.h"
#i
f defined(BSP_USING_SDRAM) && defined(RT_USING_MEMHEAP_AS_HEAP)
#include "drv_sdram
.h"
extern
void
rt_hw_sdram_init
(
void
);
static
struct
rt_memheap
system_heap
;
#endif
/**
* This is the timer interrupt service routine.
*
*/
void
SysTick_Handler
(
void
)
{
/* enter interrupt */
...
...
@@ -52,14 +47,22 @@ void rt_hw_board_init()
/* set pend exception priority */
NVIC_SetPriority
(
PendSV_IRQn
,
(
1
<<
__NVIC_PRIO_BITS
)
-
1
);
/*init uart device*/
rt_hw_uart_init
();
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
#ifdef RT_USING_HEAP
#ifdef LPC_EXT_SDRAM
rt_kprintf
(
"Initialize SDRAM ..."
);
lpc_sdram_hw_init
();
rt_kprintf
(
"done!
\n
"
);
#if defined(BSP_USING_SDRAM) && defined(RT_USING_MEMHEAP_AS_HEAP)
rt_hw_sdram_init
();
rt_system_heap_init
((
void
*
)
EXT_SDRAM_BEGIN
,
(
void
*
)
EXT_SDRAM_END
);
rt_memheap_init
(
&
system_heap
,
"sdram"
,
(
void
*
)
HEAP_BEGIN
,
((
rt_uint32_t
)
HEAP_END
-
(
rt_uint32_t
)
HEAP_BEGIN
));
#else
rt_system_heap_init
((
void
*
)
HEAP_BEGIN
,
(
void
*
)
HEAP_END
);
#endif
#endif
/* RT_USING_HEAP */
#ifdef RT_USING_COMPONENTS_INIT
rt_components_board_init
();
#endif
#ifdef RT_USING_CONSOLE
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
#endif
// rt_components_board_init();
}
bsp/lpc408x/
application
s/board.h
→
bsp/lpc408x/
driver
s/board.h
浏览文件 @
01671090
...
...
@@ -16,48 +16,35 @@
#include "LPC407x_8x_177x_8x.h"
#include <rtthread.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/* SRAM allocation for Peripherals */
#define USB_RAM_BASE 0x20000000
#define MCI_RAM_BASE 0x20002000
#define ETH_RAM_BASE 0x20004000
/* use SDRAM in default */
#define LPC_EXT_SDRAM 1
/* disable SDRAM in default */
#ifndef LPC_EXT_SDRAM
#define LPC_EXT_SDRAM 0
#endif
// <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
// <integer name="LPC_EXT_SDRAM" description="Begin Address of External SDRAM" default="0xA0000000" />
#define LPC_EXT_SDRAM_BEGIN 0xA0000000
// <integer name="LPC_EXT_SDRAM_END" description="End Address of External SDRAM" default="0xA2000000" />
#define LPC_EXT_SDRAM_END 0xA2000000
// <bool name="RT_USING_UART0" description="Using UART0" default="true" />
#define RT_USING_UART0
// <bool name="RT_USING_UART1" description="Using UART1" default="true" />
//#define RT_USING_UART1
// <bool name="RT_USING_UART2" description="Using UART2" default="true" />
#define RT_USING_UART2
// </RDTConfigurator>
/* Internal SRAM memory size[Kbytes] <16-256>, Default: 64*/
#define SRAM_SIZE 64 * 1024
#define SRAM_END (0x10000000 + SRAM_SIZE)
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define HEAP_BEGIN (__segment_end("HEAP"))
#pragma section="HEAP"
#define HEAP_BEGIN (__segment_end("HEAP"))
#else
extern
int
__bss_end
;
#define HEAP_BEGIN ((void *)&__bss_end)
extern
int
__bss_end
;
#define HEAP_BEGIN ((void *)&__bss_end)
#endif
#define HEAP_END
(void*)(0x10000000 + 0x10000)
#define HEAP_END
SRAM_END
#define FINSH_DEVICE_NAME RT_CONSOLE_DEVICE_NAME
void
rt_hw_board_init
(
void
);
#ifdef __cplusplus
}
#endif
#endif
/* __BOARD_H__ */
bsp/lpc408x/drivers/drv_emac.c
浏览文件 @
01671090
...
...
@@ -459,7 +459,7 @@ struct pbuf *lpc_emac_rx(rt_device_t dev)
return
p
;
}
int
lpc_emac_hw
_init
(
void
)
int
rt_hw_emac
_init
(
void
)
{
rt_event_init
(
&
tx_event
,
"tx_event"
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
sem_lock
,
"eth_lock"
,
1
,
RT_IPC_FLAG_FIFO
);
...
...
@@ -490,7 +490,7 @@ int lpc_emac_hw_init(void)
eth_device_init
(
&
(
lpc_emac_device
.
parent
),
"e0"
);
return
0
;
}
INIT_DEVICE_EXPORT
(
lpc_emac_hw
_init
);
INIT_DEVICE_EXPORT
(
rt_hw_emac
_init
);
#ifdef RT_USING_FINSH
#include <finsh.h>
...
...
bsp/lpc408x/drivers/drv_emac.h
浏览文件 @
01671090
...
...
@@ -8,8 +8,8 @@
* 2013-05-19 Bernard porting from LPC17xx drivers.
*/
#ifndef
__
DRV_EMAC_H__
#define
__
DRV_EMAC_H__
#ifndef DRV_EMAC_H__
#define DRV_EMAC_H__
#include "board.h"
...
...
@@ -20,7 +20,6 @@
#define ETH_MAX_FLEN 1536
/* Max. Ethernet Frame Size */
/* MAC Configuration Register 1 */
#define MAC1_REC_EN 0x00000001
/* Receive Enable */
#define MAC1_PASS_ALL 0x00000002
/* Pass All Receive Frames */
...
...
@@ -282,6 +281,6 @@
#define DP83848C_DEF_ADR 0x0F00
/* Default PHY device address */
#define DP83848C_ID 0x20005C90
/* PHY Identifier */
int
lpc_emac_hw
_init
(
void
);
int
rt_hw_emac
_init
(
void
);
#endif
#endif
/* DRV_EMAC_H__ */
bsp/lpc408x/drivers/drv_hwtimer.c
浏览文件 @
01671090
...
...
@@ -50,7 +50,7 @@ static rt_err_t timer_start(rt_hwtimer_t *timer, rt_uint32_t t, rt_hwtimer_mode_
match
.
MatchChannel
=
0
;
match
.
IntOnMatch
=
ENABLE
;
match
.
ResetOnMatch
=
ENABLE
;
match
.
StopOnMatch
=
(
opmode
==
HWTIMER_MODE_ONESHOT
)
?
ENABLE
:
DISABLE
;
match
.
StopOnMatch
=
(
opmode
==
HWTIMER_MODE_ONESHOT
)
?
ENABLE
:
DISABLE
;
match
.
ExtMatchOutputType
=
0
;
match
.
MatchValue
=
t
;
...
...
@@ -84,7 +84,7 @@ static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg)
uint32_t
pre
;
clk
=
CLKPWR_GetCLK
(
CLKPWR_CLKTYPE_PER
);
pre
=
clk
/
*
((
uint32_t
*
)
arg
)
-
1
;
pre
=
clk
/
*
((
uint32_t
*
)
arg
)
-
1
;
tim
->
PR
=
pre
;
}
break
;
...
...
@@ -126,7 +126,7 @@ static const struct rt_hwtimer_ops _ops =
static
rt_hwtimer_t
_timer0
;
int
lpc
_hwtimer_init
(
void
)
int
rt_hw
_hwtimer_init
(
void
)
{
_timer0
.
info
=
&
_info
;
_timer0
.
ops
=
&
_ops
;
...
...
@@ -145,5 +145,6 @@ void TIMER0_IRQHandler(void)
}
}
INIT_BOARD_EXPORT
(
lpc_hwtimer_init
);
#endif
INIT_BOARD_EXPORT
(
rt_hw_hwtimer_init
);
#endif
/* RT_USING_HWTIMER */
bsp/lpc408x/drivers/drv_hwtimer.h
浏览文件 @
01671090
#ifndef __DRV_HWTIMER_H__
#define __DRV_HWTIMER_H__
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-09-02 heyuanjie87 the first version
*/
#ifndef DRV_HWTIMER_H__
#define DRV_HWTIMER_H__
int
stm32
_hwtimer_init
(
void
);
int
rt_hw
_hwtimer_init
(
void
);
#endif
#endif
/* DRV_HWTIMER_H__ */
bsp/lpc408x/drivers/drv_led.c
浏览文件 @
01671090
...
...
@@ -122,7 +122,7 @@ static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args)
return
RT_EOK
;
}
int
rt_
led_hw
_init
(
void
)
int
rt_
hw_led
_init
(
void
)
{
led
.
parent
.
type
=
RT_Device_Class_Char
;
led
.
parent
.
rx_indicate
=
RT_NULL
;
...
...
@@ -141,7 +141,8 @@ int rt_led_hw_init(void)
rt_led_init
(
&
led
.
parent
);
return
0
;
}
INIT_DEVICE_EXPORT
(
rt_led_hw_init
);
INIT_DEVICE_EXPORT
(
rt_hw_led_init
);
#ifdef RT_USING_FINSH
#include <finsh.h>
void
led_test
(
rt_uint32_t
led_num
,
rt_uint32_t
value
)
...
...
bsp/lpc408x/drivers/drv_led.h
浏览文件 @
01671090
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-09-02 heyuanjie87 the first version
*/
#ifndef DRV_LED_H__
#define DRV_LED_H__
int
rt_hw_led_init
(
void
);
#endif
bsp/lpc408x/drivers/drv_lpccan.c
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-06-30 aubrcool@qq.com first version
*/
#include <rthw.h>
#include <rtdevice.h>
#include <board.h>
#include <drv_lpccan.h>
#ifdef RT_USING_CAN
#include "lpc_types.h"
#include "lpc_can.h"
#include "lpc_pinsel.h"
#include "lpc_exti.h"
#include "lpc_clkpwr.h"
struct
lpccandata
{
en_CAN_unitId
id
;
};
static
LPC_CAN_TypeDef
*
lcpcan_get_reg_base
(
rt_uint32_t
id
)
{
LPC_CAN_TypeDef
*
pCan
;
switch
(
id
)
{
case
CAN_ID_1
:
pCan
=
LPC_CAN1
;
break
;
case
CAN_ID_2
:
pCan
=
LPC_CAN2
;
break
;
default:
pCan
=
NULL
;
}
return
pCan
;
}
static
void
lpccan_irqstate_init
(
rt_uint32_t
id
)
{
LPC_CAN_TypeDef
*
pCan
=
lcpcan_get_reg_base
(
id
);
volatile
rt_int32_t
i
;
pCan
->
MOD
=
1
;
// Enter Reset Mode
pCan
->
IER
=
0
;
// Disable All CAN Interrupts
pCan
->
GSR
=
0
;
/* Request command to release Rx, Tx buffer and clear data overrun */
//pCan->CMR = CAN_CMR_AT | CAN_CMR_RRB | CAN_CMR_CDO;
pCan
->
CMR
=
(
1
<<
1
)
|
(
1
<<
2
)
|
(
1
<<
3
);
/* Read to clear interrupt pending in interrupt capture register */
i
=
pCan
->
ICR
;
i
=
i
;
pCan
->
MOD
=
0
;
// Return Normal operating
}
static
rt_err_t
lpccan_baud_set
(
rt_uint32_t
id
,
rt_uint32_t
baud
)
{
uint32_t
result
=
0
;
uint8_t
NT
,
TSEG1
,
TSEG2
;
uint32_t
CANPclk
=
0
;
uint32_t
BRP
;
LPC_CAN_TypeDef
*
pCan
=
lcpcan_get_reg_base
(
id
);
CANPclk
=
CLKPWR_GetCLK
(
CLKPWR_CLKTYPE_PER
);
result
=
CANPclk
/
baud
;
/* Calculate suitable nominal time value
* NT (nominal time) = (TSEG1 + TSEG2 + 3)
* NT <= 24
* TSEG1 >= 2*TSEG2
*/
for
(
NT
=
24
;
NT
>
0
;
NT
=
NT
-
2
)
{
if
((
result
%
NT
)
==
0
)
{
BRP
=
result
/
NT
-
1
;
NT
--
;
TSEG2
=
(
NT
/
3
)
-
1
;
TSEG1
=
NT
-
(
NT
/
3
)
-
1
;
break
;
}
}
/* Enter reset mode */
pCan
->
MOD
=
0x01
;
/* Set bit timing
* Default: SAM = 0x00;
* SJW = 0x03;
*/
pCan
->
BTR
=
(
TSEG2
<<
20
)
|
(
TSEG1
<<
16
)
|
(
3
<<
14
)
|
BRP
;
/* Return to normal operating */
pCan
->
MOD
=
0
;
return
RT_EOK
;
}
static
void
lpccan_init_alut_ram
(
void
)
{
//Reset CANAF value
LPC_CANAF
->
AFMR
=
0x01
;
//clear ALUT RAM
rt_memset
((
void
*
)
LPC_CANAF_RAM
->
mask
,
0
,
2048
);
LPC_CANAF
->
SFF_sa
=
0
;
LPC_CANAF
->
SFF_GRP_sa
=
0
;
LPC_CANAF
->
EFF_sa
=
0
;
LPC_CANAF
->
EFF_GRP_sa
=
0
;
LPC_CANAF
->
ENDofTable
=
0
;
LPC_CANAF
->
AFMR
=
0x00
;
// Set AF Mode
CAN_SetAFMode
(
CAN_NORMAL
);
}
#ifdef RT_USING_LPCCAN1
static
void
lpccan1_turnon_clk
(
void
)
{
CLKPWR_ConfigPPWR
(
CLKPWR_PCONP_PCAN1
,
ENABLE
);
}
static
void
lpccan1_filter_init
(
struct
rt_can_device
*
can
)
{
}
static
void
lpccan1_hw_init
(
uint32_t
baud
,
CAN_MODE_Type
mode
)
{
if
(
mode
!=
CAN_SELFTEST_MODE
)
{
#ifndef LPCCAN1_USEING_GPIO_SECOND
PINSEL_ConfigPin
(
0
,
0
,
1
);
PINSEL_ConfigPin
(
0
,
1
,
1
);
#else
PINSEL_ConfigPin
(
0
,
21
,
4
);
PINSEL_ConfigPin
(
0
,
22
,
4
);
#endif
}
lpccan1_turnon_clk
();
lpccan_irqstate_init
(
CAN_1
);
lpccan_init_alut_ram
();
lpccan1_turnon_clk
();
lpccan_baud_set
(
CAN_1
,
baud
);
CAN_ModeConfig
(
CAN_1
,
mode
,
ENABLE
);
if
(
mode
==
CAN_SELFTEST_MODE
)
{
//CAN_ModeConfig(CAN_1, CAN_TEST_MODE, ENABLE);
CAN_SetAFMode
(
CAN_ACC_BP
);
}
}
#endif
/*RT_USING_LPCCAN1*/
#ifdef RT_USING_LPCCAN2
static
void
lpccan2_turnon_clk
(
void
)
{
CLKPWR_ConfigPPWR
(
CLKPWR_PCONP_PCAN2
,
ENABLE
);
}
static
void
lpccan2_filter_init
(
struct
rt_can_device
*
can
)
{
}
static
void
lpccan2_hw_init
(
uint32_t
baud
,
CAN_MODE_Type
mode
)
{
if
(
mode
!=
CAN_SELFTEST_MODE
)
{
#ifndef LPCCAN2_USEING_GPIO_SECOND
PINSEL_ConfigPin
(
0
,
4
,
2
);
PINSEL_ConfigPin
(
0
,
5
,
2
);
#else
PINSEL_ConfigPin
(
2
,
7
,
1
);
PINSEL_ConfigPin
(
2
,
8
,
1
);
#endif
}
lpccan2_turnon_clk
();
lpccan_irqstate_init
(
CAN_2
);
#ifndef RT_USING_LPCCAN1
lpccan_init_alut_ram
();
#endif
/*RT_USING_LPCCAN1*/
lpccan_baud_set
(
CAN_2
,
baud
);
CAN_ModeConfig
(
CAN_2
,
mode
,
ENABLE
);
if
(
mode
==
CAN_SELFTEST_MODE
)
{
CAN_SetAFMode
(
CAN_ACC_BP
);
}
}
#endif
/*RT_USING_LPCCAN2*/
static
rt_err_t
configure
(
struct
rt_can_device
*
can
,
struct
can_configure
*
cfg
)
{
CAN_MODE_Type
mode
;
rt_uint32_t
canid
;
switch
(
cfg
->
mode
)
{
case
RT_CAN_MODE_NORMAL
:
mode
=
CAN_OPERATING_MODE
;
break
;
case
RT_CAN_MODE_LISEN
:
mode
=
CAN_LISTENONLY_MODE
;
break
;
case
RT_CAN_MODE_LOOPBACKANLISEN
:
mode
=
CAN_SELFTEST_MODE
;
break
;
default:
return
RT_EIO
;
}
canid
=
((
struct
lpccandata
*
)
can
->
parent
.
user_data
)
->
id
;
#ifdef RT_USING_LPCCAN1
if
(
canid
==
CAN_1
)
{
lpccan1_hw_init
(
cfg
->
baud_rate
,
mode
);
lpccan1_filter_init
(
can
);
}
#endif
/*RT_USING_LPCCAN1*/
#ifdef RT_USING_LPCCAN2
#ifdef RT_USING_LPCCAN1
else
#endif
/*RT_USING_LPCCAN1*/
{
lpccan2_hw_init
(
cfg
->
baud_rate
,
mode
);
lpccan2_filter_init
(
can
);
}
#endif
/*RT_USING_LPCCAN2*/
return
RT_EOK
;
}
static
CAN_ERROR
findfilter
(
struct
lpccandata
*
plpccan
,
struct
rt_can_filter_item
*
pitem
,
rt_int32_t
*
pos
)
{
extern
uint16_t
CANAF_FullCAN_cnt
;
extern
uint16_t
CANAF_std_cnt
;
extern
uint16_t
CANAF_gstd_cnt
;
extern
uint16_t
CANAF_ext_cnt
;
extern
uint16_t
CANAF_gext_cnt
;
rt_uint32_t
buf0
=
0
,
buf1
=
0
;
rt_int16_t
cnt1
=
0
,
cnt2
=
0
,
bound1
=
0
;
CAN_ID_FORMAT_Type
format
;
*
pos
=
-
1
;
if
(
pitem
->
ide
)
{
format
=
EXT_ID_FORMAT
;
}
else
{
format
=
STD_ID_FORMAT
;
}
if
(
pitem
->
mode
)
{
rt_uint32_t
id
=
pitem
->
id
;
if
(
format
==
STD_ID_FORMAT
)
{
id
&=
0x07FF
;
id
|=
plpccan
->
id
<<
13
;
/* Add controller number */
if
(
CANAF_std_cnt
==
0
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
if
(
CANAF_std_cnt
==
1
)
{
cnt2
=
(
CANAF_FullCAN_cnt
+
1
)
>>
1
;
if
(
id
!=
LPC_CANAF_RAM
->
mask
[
cnt2
]
>>
16
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
}
else
{
cnt1
=
(
CANAF_FullCAN_cnt
+
1
)
>>
1
;
bound1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
((
CANAF_std_cnt
+
1
)
>>
1
);
while
(
cnt1
<
bound1
)
{
/* Loop through standard existing IDs */
if
(((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
16
)
&
0xE7FF
)
==
id
)
{
*
pos
=
cnt1
*
2
;
return
CAN_OK
;
}
if
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
&
0x0000E7FF
)
==
id
)
{
*
pos
=
cnt1
*
2
+
1
;
return
CAN_OK
;
}
if
(((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
16
)
&
0xE7FF
)
>
id
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
if
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
&
0x0000E7FF
)
>
id
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
cnt1
++
;
}
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
}
/*********** Add Explicit Extended Identifier Frame Format entry *********/
else
{
/* Add controller number */
id
|=
plpccan
->
id
<<
29
;
cnt1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
(((
CANAF_std_cnt
+
1
)
>>
1
)
+
CANAF_gstd_cnt
);
cnt2
=
0
;
while
(
cnt2
<
CANAF_ext_cnt
)
{
/* Loop through extended existing masks*/
if
(
LPC_CANAF_RAM
->
mask
[
cnt1
]
==
id
)
{
*
pos
=
cnt2
;
return
CAN_OK
;
}
if
(
LPC_CANAF_RAM
->
mask
[
cnt1
]
>
id
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
cnt1
++
;
cnt2
++
;
}
}
}
else
{
rt_uint32_t
lowerID
=
pitem
->
id
;
rt_uint32_t
upperID
=
pitem
->
mask
;
rt_uint32_t
LID
,
UID
;
if
(
lowerID
>
upperID
)
return
CAN_CONFLICT_ID_ERROR
;
if
(
format
==
STD_ID_FORMAT
)
{
lowerID
&=
0x7FF
;
//mask ID
upperID
&=
0x7FF
;
cnt1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
((
CANAF_std_cnt
+
1
)
>>
1
);
if
(
CANAF_gstd_cnt
==
0
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
{
bound1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
((
CANAF_std_cnt
+
1
)
>>
1
)
+
CANAF_gstd_cnt
;
while
(
cnt1
<
bound1
)
{
//compare controller first
while
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
29
)
<
(
plpccan
->
id
))
//increase until meet greater or equal controller
cnt1
++
;
buf0
=
LPC_CANAF_RAM
->
mask
[
cnt1
];
if
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
29
)
>
(
plpccan
->
id
))
//meet greater controller
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
//meet equal controller
{
LID
=
(
buf0
>>
16
)
&
0x7FF
;
UID
=
buf0
&
0x7FF
;
if
(
upperID
==
LID
&&
lowerID
==
UID
)
{
*
pos
=
cnt1
;
return
CAN_OK
;
}
if
(
upperID
<
LID
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
if
(
lowerID
>=
UID
)
{
cnt1
++
;
}
else
return
CAN_CONFLICT_ID_ERROR
;
}
}
if
(
cnt1
>=
bound1
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
}
}
/*********Add Group of Extended Identifier Frame Format************/
else
{
lowerID
&=
0x1FFFFFFF
;
//mask ID
upperID
&=
0x1FFFFFFF
;
cnt1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
((
CANAF_std_cnt
+
1
)
>>
1
)
+
CANAF_gstd_cnt
+
CANAF_ext_cnt
;
//if this is the first Group standard ID entry
if
(
CANAF_gext_cnt
==
0
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
{
bound1
=
((
CANAF_FullCAN_cnt
+
1
)
>>
1
)
+
((
CANAF_std_cnt
+
1
)
>>
1
)
+
CANAF_gstd_cnt
\
+
CANAF_ext_cnt
+
(
CANAF_gext_cnt
<<
1
);
while
(
cnt1
<
bound1
)
{
while
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
29
)
<
plpccan
->
id
)
//increase until meet greater or equal controller
cnt1
++
;
buf0
=
LPC_CANAF_RAM
->
mask
[
cnt1
];
buf1
=
LPC_CANAF_RAM
->
mask
[
cnt1
+
1
];
if
((
LPC_CANAF_RAM
->
mask
[
cnt1
]
>>
29
)
>
plpccan
->
id
)
//meet greater controller
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
//meet equal controller
{
LID
=
buf0
&
0x1FFFFFFF
;
//mask ID
UID
=
buf1
&
0x1FFFFFFF
;
if
(
upperID
==
LID
&&
lowerID
==
UID
)
{
*
pos
=
cnt1
;
return
CAN_OK
;
}
if
(
upperID
<
LID
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
else
if
(
lowerID
>=
UID
)
{
//load next entry to compare
cnt1
+=
2
;
}
else
return
CAN_CONFLICT_ID_ERROR
;
}
}
if
(
cnt1
>=
bound1
)
{
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
}
}
}
return
CAN_ENTRY_NOT_EXIT_ERROR
;
}
static
rt_err_t
setfilter
(
struct
lpccandata
*
plpccan
,
struct
rt_can_filter_config
*
pconfig
)
{
struct
rt_can_filter_item
*
pitem
=
pconfig
->
items
;
rt_uint32_t
count
=
pconfig
->
count
;
rt_int32_t
pos
;
CAN_ID_FORMAT_Type
format
;
CAN_ERROR
lpccanres
;
while
(
count
)
{
if
(
pitem
->
ide
)
{
format
=
EXT_ID_FORMAT
;
}
else
{
format
=
STD_ID_FORMAT
;
}
lpccanres
=
findfilter
(
plpccan
,
pitem
,
&
pos
);
if
(
pconfig
->
actived
&&
lpccanres
!=
CAN_OK
)
{
if
(
pitem
->
mode
)
{
lpccanres
=
CAN_LoadGroupEntry
(
plpccan
->
id
,
pitem
->
id
,
pitem
->
mask
,
format
);
}
else
{
lpccanres
=
CAN_LoadExplicitEntry
(
plpccan
->
id
,
pitem
->
id
,
format
);
}
}
else
if
(
!
pconfig
->
actived
&&
lpccanres
==
CAN_OK
)
{
AFLUT_ENTRY_Type
type
;
if
(
pitem
->
mode
)
{
if
(
format
==
EXT_ID_FORMAT
)
{
type
=
GROUP_EXTEND_ENTRY
;
}
else
{
type
=
GROUP_STANDARD_ENTRY
;
}
}
else
{
if
(
format
==
EXT_ID_FORMAT
)
{
type
=
EXPLICIT_EXTEND_ENTRY
;
}
else
{
type
=
EXPLICIT_STANDARD_ENTRY
;
}
}
lpccanres
=
CAN_RemoveEntry
(
type
,
(
rt_uint16_t
)(
pos
));
}
else
if
(
!
pconfig
->
actived
&&
lpccanres
!=
CAN_OK
)
{
lpccanres
=
CAN_OK
;
}
if
(
lpccanres
!=
CAN_OK
)
{
return
RT_EIO
;
}
pitem
++
;
count
--
;
}
return
RT_EOK
;
}
static
rt_err_t
control
(
struct
rt_can_device
*
can
,
int
cmd
,
void
*
arg
)
{
struct
lpccandata
*
plpccan
;
rt_uint32_t
argval
;
CAN_MODE_Type
mode
;
plpccan
=
(
struct
lpccandata
*
)
can
->
parent
.
user_data
;
RT_ASSERT
(
plpccan
!=
RT_NULL
);
switch
(
cmd
)
{
case
RT_DEVICE_CTRL_CLR_INT
:
argval
=
(
rt_uint32_t
)
arg
;
if
(
argval
==
RT_DEVICE_FLAG_INT_RX
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_RIE
,
DISABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_DOIE
,
DISABLE
);
}
else
if
(
argval
==
RT_DEVICE_FLAG_INT_TX
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE1
,
DISABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE2
,
DISABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE3
,
DISABLE
);
}
else
if
(
argval
==
RT_DEVICE_CAN_INT_ERR
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_EIE
,
DISABLE
);
}
break
;
case
RT_DEVICE_CTRL_SET_INT
:
argval
=
(
rt_uint32_t
)
arg
;
if
(
argval
==
RT_DEVICE_FLAG_INT_RX
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_RIE
,
ENABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_DOIE
,
ENABLE
);
}
else
if
(
argval
==
RT_DEVICE_FLAG_INT_TX
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE1
,
ENABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE2
,
ENABLE
);
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_TIE3
,
ENABLE
);
}
else
if
(
argval
==
RT_DEVICE_CAN_INT_ERR
)
{
CAN_IRQCmd
(
plpccan
->
id
,
CANINT_EIE
,
ENABLE
);
}
break
;
case
RT_CAN_CMD_SET_FILTER
:
return
setfilter
(
plpccan
,
(
struct
rt_can_filter_config
*
)
arg
);
case
RT_CAN_CMD_SET_MODE
:
argval
=
(
rt_uint32_t
)
arg
;
if
(
argval
!=
RT_CAN_MODE_NORMAL
||
argval
!=
RT_CAN_MODE_LISEN
)
{
return
RT_ERROR
;
}
if
(
argval
!=
can
->
config
.
mode
)
{
can
->
config
.
mode
=
argval
;
switch
(
argval
)
{
case
RT_CAN_MODE_NORMAL
:
mode
=
CAN_OPERATING_MODE
;
break
;
case
RT_CAN_MODE_LISEN
:
mode
=
CAN_LISTENONLY_MODE
;
break
;
case
RT_CAN_MODE_LOOPBACKANLISEN
:
mode
=
CAN_SELFTEST_MODE
;
break
;
default:
return
RT_EIO
;
}
CAN_ModeConfig
(
plpccan
->
id
,
mode
,
ENABLE
);
if
(
mode
==
CAN_SELFTEST_MODE
)
{
//CAN_ModeConfig(CAN_1, CAN_TEST_MODE, ENABLE);
CAN_SetAFMode
(
CAN_ACC_BP
);
}
}
break
;
case
RT_CAN_CMD_SET_BAUD
:
argval
=
(
rt_uint32_t
)
arg
;
if
(
argval
!=
can
->
config
.
baud_rate
)
{
can
->
config
.
baud_rate
=
argval
;
return
lpccan_baud_set
(
plpccan
->
id
,
(
rt_uint32_t
)
arg
);
}
break
;
case
RT_CAN_CMD_SET_PRIV
:
argval
=
(
rt_uint32_t
)
arg
;
if
(
argval
!=
RT_CAN_MODE_PRIV
||
argval
!=
RT_CAN_MODE_NOPRIV
)
{
return
RT_ERROR
;
}
if
(
argval
!=
can
->
config
.
privmode
)
{
can
->
config
.
privmode
=
argval
;
CAN_ModeConfig
(
plpccan
->
id
,
CAN_TXPRIORITY_MODE
,
ENABLE
);
}
break
;
case
RT_CAN_CMD_GET_STATUS
:
{
can
->
status
.
rcverrcnt
=
0
;
can
->
status
.
snderrcnt
=
0
;
can
->
status
.
errcode
=
0
;
if
(
arg
!=
&
can
->
status
)
{
rt_memcpy
(
arg
,
&
can
->
status
,
sizeof
(
can
->
status
));
}
}
break
;
}
return
RT_EOK
;
}
static
int
sendmsg
(
struct
rt_can_device
*
can
,
const
void
*
buf
,
rt_uint32_t
boxno
)
{
struct
lpccandata
*
plpccan
;
LPC_CAN_TypeDef
*
pCan
;
struct
rt_can_msg
*
pmsg
;
rt_uint32_t
SR_Mask
;
rt_uint32_t
CMRMsk
;
plpccan
=
(
struct
lpccandata
*
)
can
->
parent
.
user_data
;
RT_ASSERT
(
plpccan
!=
RT_NULL
);
pCan
=
lcpcan_get_reg_base
(
plpccan
->
id
);
RT_ASSERT
(
pCan
!=
RT_NULL
);
pmsg
=
(
struct
rt_can_msg
*
)
buf
;
if
(
boxno
>
2
)
{
return
RT_ERROR
;
}
CMRMsk
=
0x01
|
(
0x01
<<
(
boxno
+
5
));
SR_Mask
=
0x01
<<
(
boxno
*
8
+
2
);
if
(
pCan
->
SR
&
SR_Mask
)
{
volatile
unsigned
int
*
pTFI
=
(
&
pCan
->
TFI1
+
0
+
4
*
boxno
);
volatile
unsigned
int
*
pTID
=
(
&
pCan
->
TFI1
+
1
+
4
*
boxno
);
volatile
unsigned
int
*
pTDA
=
(
&
pCan
->
TFI1
+
2
+
4
*
boxno
);
volatile
unsigned
int
*
pTDB
=
(
&
pCan
->
TFI1
+
3
+
4
*
boxno
);
rt_uint32_t
data
;
/* Transmit Channel 1 is available */
/* Write frame informations and frame data into its CANxTFI1,
* CANxTID1, CANxTDA1, CANxTDB1 register */
*
pTFI
&=
~
0x000F0000
;
*
pTFI
|=
(
pmsg
->
len
)
<<
16
;
if
(
pmsg
->
rtr
==
REMOTE_FRAME
)
{
*
pTFI
|=
(
1
<<
30
);
//set bit RTR
}
else
{
*
pTFI
&=
~
(
1
<<
30
);
}
if
(
pmsg
->
ide
==
EXT_ID_FORMAT
)
{
*
pTFI
|=
(((
uint32_t
)
1
)
<<
31
);
//set bit FF
}
else
{
*
pTFI
&=
~
(((
uint32_t
)
1
)
<<
31
);
}
if
(
can
->
config
.
privmode
)
{
*
pTFI
&=
~
0x000000FF
;
*
pTFI
|=
pmsg
->
priv
;
}
/* Write CAN ID*/
*
pTID
=
pmsg
->
id
;
/*Write first 4 data bytes*/
data
=
(
pmsg
->
data
[
0
])
|
(((
pmsg
->
data
[
1
]))
<<
8
)
|
((
pmsg
->
data
[
2
])
<<
16
)
|
((
pmsg
->
data
[
3
])
<<
24
);
*
pTDA
=
data
;
/*Write second 4 data bytes*/
data
=
(
pmsg
->
data
[
4
])
|
(((
pmsg
->
data
[
5
]))
<<
8
)
|
((
pmsg
->
data
[
6
])
<<
16
)
|
((
pmsg
->
data
[
7
])
<<
24
);
*
pTDB
=
data
;
/*Write transmission request*/
pCan
->
CMR
=
CMRMsk
;
return
RT_EOK
;
}
else
{
return
RT_ERROR
;
}
}
static
int
recvmsg
(
struct
rt_can_device
*
can
,
void
*
buf
,
rt_uint32_t
boxno
)
{
struct
lpccandata
*
plpccan
;
LPC_CAN_TypeDef
*
pCan
;
plpccan
=
(
struct
lpccandata
*
)
can
->
parent
.
user_data
;
RT_ASSERT
(
plpccan
!=
RT_NULL
);
pCan
=
lcpcan_get_reg_base
(
plpccan
->
id
);
RT_ASSERT
(
pCan
!=
RT_NULL
);
//CAN_ReceiveMsg
//check status of Receive Buffer
if
((
pCan
->
SR
&
0x00000001
))
{
uint32_t
data
;
struct
rt_can_msg
*
pmsg
=
(
struct
rt_can_msg
*
)
buf
;
/* Receive message is available */
/* Read frame informations */
pmsg
->
ide
=
(
uint8_t
)(((
pCan
->
RFS
)
&
0x80000000
)
>>
31
);
pmsg
->
rtr
=
(
uint8_t
)(((
pCan
->
RFS
)
&
0x40000000
)
>>
30
);
pmsg
->
len
=
(
uint8_t
)(((
pCan
->
RFS
)
&
0x000F0000
)
>>
16
);
/* Read CAN message identifier */
pmsg
->
id
=
pCan
->
RID
;
/* Read the data if received message was DATA FRAME */
if
(
!
pmsg
->
rtr
)
{
/* Read first 4 data bytes */
data
=
pCan
->
RDA
;
pmsg
->
data
[
0
]
=
data
&
0x000000FF
;
pmsg
->
data
[
1
]
=
(
data
&
0x0000FF00
)
>>
8
;
pmsg
->
data
[
2
]
=
(
data
&
0x00FF0000
)
>>
16
;
pmsg
->
data
[
3
]
=
(
data
&
0xFF000000
)
>>
24
;
/* Read second 4 data bytes */
if
(
pmsg
->
len
>
4
)
{
data
=
pCan
->
RDB
;
pmsg
->
data
[
4
]
=
data
&
0x000000FF
;
pmsg
->
data
[
5
]
=
(
data
&
0x0000FF00
)
>>
8
;
pmsg
->
data
[
6
]
=
(
data
&
0x00FF0000
)
>>
16
;
pmsg
->
data
[
7
]
=
(
data
&
0xFF000000
)
>>
24
;
}
pmsg
->
hdr
=
0
;
/*release receive buffer*/
pCan
->
CMR
=
0x04
;
}
else
{
/* Received Frame is a Remote Frame, not have data, we just receive
* message information only */
pCan
->
CMR
=
0x04
;
/*release receive buffer*/
return
SUCCESS
;
}
}
else
{
// no receive message available
return
ERROR
;
}
return
RT_EOK
;
}
static
const
struct
rt_can_ops
canops
=
{
configure
,
control
,
sendmsg
,
recvmsg
,
};
#ifdef RT_USING_LPCCAN1
#ifdef RT_CAN_USING_LED
#endif
static
struct
lpccandata
lpccandata1
=
{
CAN_ID_1
,
};
static
struct
rt_can_device
lpccan1
;
#endif
/*RT_USINGLPCCAN1*/
#ifdef RT_USING_LPCCAN2
#ifdef RT_CAN_USING_LED
#endif
static
struct
lpccandata
lpccandata2
=
{
CAN_ID_2
,
};
static
struct
rt_can_device
lpccan2
;
#endif
/*RT_USINGLPCCAN2*/
/*----------------- INTERRUPT SERVICE ROUTINES --------------------------*/
/*********************************************************************//**
* @brief Event Router IRQ Handler
* @param[in] None
* @return None
**********************************************************************/
void
CAN_IRQHandler
(
void
)
{
rt_uint32_t
IntStatus
;
rt_interrupt_enter
();
#ifdef RT_USING_LPCCAN1
IntStatus
=
CAN_IntGetStatus
(
CAN_1
);
//check receive interrupt
if
((
IntStatus
>>
0
)
&
0x01
)
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_RX_IND
|
0
<<
8
);
}
//check Transmit Interrupt interrupt1
if
((
IntStatus
>>
1
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_1
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
3
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
0
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
0
<<
8
);
}
}
//check Error Warning Interrupt
if
((
IntStatus
>>
2
)
&
0x01
)
{
rt_uint32_t
errtype
;
rt_uint32_t
state
;
errtype
=
(
IntStatus
>>
16
);
if
(
errtype
&
0x1F
&&
lpccan1
.
status
.
lasterrtype
==
(
errtype
&
0x1F
))
{
switch
((
errtype
&
0x1F
))
{
case
00011
:
// Start of Frame
case
00010
:
// ID28 ... ID21
case
00110
:
//ID20 ... ID18
case
00100
:
// SRTR Bit
case
00101
:
// IDE bit
case
00111
:
// ID17 ... 13
case
01111
:
// ID12 ... ID5
case
01110
:
// ID4 ... ID0
case
01100
:
// RTR Bit
case
01011
:
// Data Length Code
case
01010
:
// Data Field
lpccan1
.
status
.
formaterrcnt
++
;
break
;
case
01101
:
// Reserved Bit 1
case
01001
:
// Reserved Bit 0
lpccan1
.
status
.
bitpaderrcnt
++
;
break
;
case
01000
:
// CRC Sequence
case
11000
:
// CRC Delimiter
lpccan1
.
status
.
crcerrcnt
++
;
break
;
case
11001
:
// Acknowledge Slot
case
11011
:
// Acknowledge Delimiter
lpccan1
.
status
.
ackerrcnt
++
;
break
;
case
11010
:
// End of Frame
case
10010
:
// Intermission
lpccan1
.
status
.
formaterrcnt
++
;
break
;
}
lpccan1
.
status
.
lasterrtype
=
errtype
&
0x1F
;
}
state
=
CAN_GetCTRLStatus
(
CAN_1
,
CANCTRL_GLOBAL_STS
);
lpccan1
.
status
.
rcverrcnt
=
(
state
>>
16
)
&
0xFF
;
lpccan1
.
status
.
snderrcnt
=
(
state
>>
24
)
&
0xFF
;
lpccan1
.
status
.
errcode
=
(
state
>>
5
)
&
0x06
;
}
//check Data Overrun Interrupt Interrupt
if
((
IntStatus
>>
3
)
&
0x01
)
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_RXOF_IND
|
0
<<
8
);
}
//check Transmit Interrupt interrupt2
if
((
IntStatus
>>
9
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_1
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
11
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
1
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
1
<<
8
);
}
}
//check Transmit Interrupt interrupt3
if
((
IntStatus
>>
10
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_1
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
19
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
2
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
2
<<
8
);
}
}
#endif
/*RT_USING_LPCCAN1*/
#ifdef RT_USING_LPCCAN2
IntStatus
=
CAN_IntGetStatus
(
CAN_2
);
//check receive interrupt
if
((
IntStatus
>>
0
)
&
0x01
)
{
rt_hw_can_isr
(
&
lpccan2
,
RT_CAN_EVENT_RX_IND
|
0
<<
8
);
}
//check Transmit Interrupt interrupt1
if
((
IntStatus
>>
1
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_2
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
3
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
0
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
0
<<
8
);
}
}
//check Error Warning Interrupt
if
((
IntStatus
>>
2
)
&
0x01
)
{
rt_uint32_t
errtype
;
errtype
=
(
IntStatus
>>
16
);
if
(
errtype
&
0x1F
&&
lpccan2
.
status
.
lasterrtype
==
(
errtype
&
0x1F
))
{
switch
((
errtype
&
0x1F
))
{
case
00011
:
// Start of Frame
case
00010
:
// ID28 ... ID21
case
00110
:
//ID20 ... ID18
case
00100
:
// SRTR Bit
case
00101
:
// IDE bit
case
00111
:
// ID17 ... 13
case
01111
:
// ID12 ... ID5
case
01110
:
// ID4 ... ID0
case
01100
:
// RTR Bit
case
01011
:
// Data Length Code
case
01010
:
// Data Field
lpccan2
.
status
.
formaterrcnt
++
;
break
;
case
01101
:
// Reserved Bit 1
case
01001
:
// Reserved Bit 0
lpccan2
.
status
.
bitpaderrcnt
++
;
break
;
case
01000
:
// CRC Sequence
case
11000
:
// CRC Delimiter
lpccan2
.
status
.
crcerrcnt
++
;
break
;
case
11001
:
// Acknowledge Slot
case
11011
:
// Acknowledge Delimiter
lpccan2
.
status
.
ackerrcnt
++
;
break
;
case
11010
:
// End of Frame
case
10010
:
// Intermission
lpccan2
.
status
.
formaterrcnt
++
;
break
;
}
lpccan2
.
status
.
lasterrtype
=
errtype
&
0x1F
;
}
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_2
,
CANCTRL_GLOBAL_STS
);
lpccan2
.
status
.
rcverrcnt
=
(
state
>>
16
)
&
0xFF
;
lpccan2
.
status
.
snderrcnt
=
(
state
>>
24
)
&
0xFF
;
lpccan2
.
status
.
errcode
=
(
state
>>
5
)
&
0x06
;
}
//check Data Overrun Interrupt Interrupt
if
((
IntStatus
>>
3
)
&
0x01
)
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_RXOF_IND
|
0
<<
8
);
}
//check Transmit Interrupt interrupt2
if
((
IntStatus
>>
9
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_2
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
11
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
1
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
1
<<
8
);
}
}
//check Transmit Interrupt interrupt3
if
((
IntStatus
>>
10
)
&
0x01
)
{
rt_uint32_t
state
=
0
;
state
=
CAN_GetCTRLStatus
(
CAN_2
,
CANCTRL_STS
);
if
(
state
&
(
0x01
<<
19
))
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_DONE
|
2
<<
8
);
}
else
{
rt_hw_can_isr
(
&
lpccan1
,
RT_CAN_EVENT_TX_FAIL
|
2
<<
8
);
}
}
#endif
/*RT_USING_LPCCAN2*/
rt_interrupt_leave
();
}
int
lpc_can_init
(
void
)
{
#ifdef RT_USING_LPCCAN1
lpccan1
.
config
.
baud_rate
=
CAN1MBaud
;
lpccan1
.
config
.
msgboxsz
=
16
;
lpccan1
.
config
.
sndboxnumber
=
3
;
lpccan1
.
config
.
mode
=
RT_CAN_MODE_NORMAL
;
lpccan1
.
config
.
privmode
=
0
;
#ifdef RT_CAN_USING_LED
#endif
lpccan1
.
config
.
ticks
=
50
;
#ifdef RT_CAN_USING_HDR
#endif
//Enable CAN Interrupt
NVIC_EnableIRQ
(
CAN_IRQn
);
rt_hw_can_register
(
&
lpccan1
,
"lpccan1"
,
&
canops
,
&
lpccandata1
);
#endif
/*RT_USING_LPCCAN1*/
#ifdef RT_USING_LPCCAN2
lpccan2
.
config
.
baud_rate
=
CAN1MBaud
;
lpccan2
.
config
.
msgboxsz
=
16
;
lpccan2
.
config
.
sndboxnumber
=
3
;
lpccan2
.
config
.
mode
=
RT_CAN_MODE_NORMAL
;
lpccan2
.
config
.
privmode
=
0
;
#ifdef RT_CAN_USING_LED
#endif
lpccan2
.
config
.
ticks
=
50
;
#ifdef RT_CAN_USING_HDR
#endif
//Enable CAN Interrupt
NVIC_EnableIRQ
(
CAN_IRQn
);
#ifdef RT_CAN_USING_HDR
#endif
rt_hw_can_register
(
&
lpccan2
,
"lpccan2"
,
&
canops
,
&
lpccandata2
);
#endif
/*RT_USING_LPCCAN2*/
return
RT_EOK
;
}
INIT_BOARD_EXPORT
(
lpc_can_init
);
#endif
/*RT_USING_CAN*/
bsp/lpc408x/drivers/drv_lpccan.h
已删除
100644 → 0
浏览文件 @
60b15494
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-06-30 aubrcool@qq.com first version
*/
#ifndef DRV_LPCCAN_H_
#define DRV_LPCCAN_H_
#include <rthw.h>
#include <rtdevice.h>
#define LPC_CAN_AF_STD_INIT(id) \
RT_CAN_FILTER_ITEM_INIT(id,0,0,0,0xFFFFFFFF)
#define LPC_CAN_AF_EXT_INIT(id) \
RT_CAN_FILTER_ITEM_INIT(id,1,0,0,0xFFFFFFFF)
#define LPC_CAN_AF_STD_GRP_INIT(id1,id2) \
RT_CAN_FILTER_ITEM_INIT(id1,0,0,1,id2)
#define LPC_CAN_AF_EXT_GRP_INIT(id1,id2) \
RT_CAN_FILTER_ITEM_INIT(id1,1,0,1,id2)
#endif
/*DRV_LPCCAN_H_*/
bsp/lpc408x/drivers/drv_sdram.c
浏览文件 @
01671090
...
...
@@ -8,20 +8,14 @@
* 2013-05-19 Bernard The first version for LPC40xx
*/
#include <rtthread.h>
#ifdef BSP_USING_SDRAM
#include "drv_sdram.h"
#include <lpc_emc.h>
#include <lpc_timer.h>
#define SDRAM_BASE_ADDR 0xA0000000
#define SDRAM_SIZE 0x2000000
/*******************************************************************************************
* @函数名:sdram_gpio_config()
* @参数 :void
* @返回值:void
* @描述 :SDRAM管脚配置函数,内部调用
*********************************************************************************************/
static
void
sdram_gpio_config
(
void
)
{
LPC_IOCON
->
P3_0
=
(
1
<<
0
|
0
<<
3
|
0
<<
5
|
1
<<
9
);
/* D0 @ P3.0 */
...
...
@@ -78,7 +72,7 @@ static void sdram_gpio_config(void)
LPC_IOCON
->
P2_29
=
(
1
<<
0
|
0
<<
3
|
0
<<
5
|
1
<<
9
);
/* DQM[1] @ P2.29 */
}
void
lpc_sdram_hw
_init
(
void
)
void
rt_hw_sdram
_init
(
void
)
{
volatile
uint32_t
i
;
volatile
uint32_t
dwtemp
;
...
...
@@ -88,7 +82,7 @@ void lpc_sdram_hw_init(void)
TIM_ConfigStruct
.
PrescaleOption
=
TIM_PRESCALE_USVAL
;
TIM_ConfigStruct
.
PrescaleValue
=
1
;
/
/ Set configuration for Tim_config and Tim_MatchConfig
/
* Set configuration for Tim_config and Tim_MatchConfig */
TIM_Init
(
LPC_TIM0
,
TIM_TIMER_MODE
,
&
TIM_ConfigStruct
);
LPC_SC
->
PCONP
|=
0x00000800
;
...
...
@@ -97,53 +91,55 @@ void lpc_sdram_hw_init(void)
LPC_EMC
->
Config
=
0x00000000
;
sdram_gpio_config
();
//LPC_SC->EMCCLKSEL = 1; //跑主频的一般频率,60Mhz
LPC_EMC
->
DynamicRP
=
EMC_NS2CLK
(
20
);
/* 20ns,
*/
LPC_EMC
->
DynamicRAS
=
/*EMC_NS2CLK(42, nsPerClk);*/
15
;
/* 42ns to 100K ns,
*/
LPC_EMC
->
DynamicSREX
=
1
-
1
;
/* tSRE, 1clk,
*/
LPC_EMC
->
DynamicAPR
=
2
-
1
;
/* Not found!!! Estimated as 2clk,
*/
LPC_EMC
->
DynamicDAL
=
EMC_NS2CLK
(
20
)
+
2
;
/* tDAL = tRP + tDPL = 20ns + 2clk */
LPC_EMC
->
DynamicWR
=
2
-
1
;
/* 2CLK,
*/
LPC_EMC
->
DynamicRC
=
EMC_NS2CLK
(
63
);
/* H57V2562GTR-75C tRC=63ns(min)*/
LPC_EMC
->
DynamicRFC
=
EMC_NS2CLK
(
63
);
/* H57V2562GTR-75C tRFC=tRC */
LPC_EMC
->
DynamicXSR
=
0x0000000F
;
/* exit self-refresh to active, 不知道,设为最久
*/
LPC_EMC
->
DynamicRRD
=
EMC_NS2CLK
(
63
);
/* 3clk, tRRD=15ns(min) */
LPC_EMC
->
DynamicMRD
=
2
-
1
;
/* 2clk, tMRD=2clk(min) */
LPC_EMC
->
DynamicReadConfig
=
0x00000001
;
/* Command delayed strategy, using EMCCLKDELAY */
LPC_EMC
->
DynamicRP
=
EMC_NS2CLK
(
20
);
/* 20ns
*/
LPC_EMC
->
DynamicRAS
=
15
;
/* EMC_NS2CLK(42, nsPerClk),42ns to 100K ns
*/
LPC_EMC
->
DynamicSREX
=
1
-
1
;
/* tSRE, 1clk
*/
LPC_EMC
->
DynamicAPR
=
2
-
1
;
/* Not found!!! Estimated as 2clk
*/
LPC_EMC
->
DynamicDAL
=
EMC_NS2CLK
(
20
)
+
2
;
/* tDAL = tRP + tDPL = 20ns + 2clk */
LPC_EMC
->
DynamicWR
=
2
-
1
;
/* 2CLK
*/
LPC_EMC
->
DynamicRC
=
EMC_NS2CLK
(
63
);
/* H57V2562GTR-75C tRC=63ns(min)*/
LPC_EMC
->
DynamicRFC
=
EMC_NS2CLK
(
63
);
/* H57V2562GTR-75C tRFC=tRC */
LPC_EMC
->
DynamicXSR
=
0x0000000F
;
/* exit self-refresh to active
*/
LPC_EMC
->
DynamicRRD
=
EMC_NS2CLK
(
63
);
/* 3clk, tRRD=15ns(min) */
LPC_EMC
->
DynamicMRD
=
2
-
1
;
/* 2clk, tMRD=2clk(min) */
LPC_EMC
->
DynamicReadConfig
=
0x00000001
;
/* Command delayed strategy, using EMCCLKDELAY */
/* H57V2562GTR-75C: tCL=3CLK, tRCD=20ns(min), 3 CLK=24ns */
LPC_EMC
->
DynamicRasCas0
=
0x303
;
/* For Manley lpc1778 SDRAM: H57V2562GTR-75C, 256Mb, 16Mx16, 4 banks, row=13, column=9 */
#ifdef SDRAM_CONFIG_16BIT
LPC_EMC
->
DynamicConfig0
=
0x680
;
/* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC */
LPC_EMC
->
DynamicConfig0
=
0x680
;
/* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC */
#elif defined SDRAM_CONFIG_32BIT
LPC_EMC
->
DynamicConfig0
=
0x4680
;
/* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC */
LPC_EMC
->
DynamicConfig0
=
0x4680
;
/* 256Mb, 16Mx16, 4 banks, row=13, column=9, RBC */
#endif
TIM_Waitms
(
100
);
LPC_EMC
->
DynamicControl
=
0x00000183
;
/* Issue NOP command */
TIM_Waitms
(
200
);
/* wait 200ms */
LPC_EMC
->
DynamicControl
=
0x00000183
;
/* Issue NOP command */
TIM_Waitms
(
200
);
/* wait 200ms */
LPC_EMC
->
DynamicControl
=
0x00000103
;
/* Issue PALL command */
LPC_EMC
->
DynamicControl
=
0x00000103
;
/* Issue PALL command */
LPC_EMC
->
DynamicRefresh
=
0x00000002
;
/* ( n * 16 ) -> 32 clock cycles */
for
(
i
=
0
;
i
<
0x80
;
i
++
);
/* wait 128 AHB clock cycles */
LPC_EMC
->
DynamicRefresh
=
0x00000002
;
/* ( n * 16 ) -> 32 clock cycles */
for
(
i
=
0
;
i
<
0x80
;
i
++
);
/* wait 128 AHB clock cycles */
LPC_EMC
->
DynamicRefresh
=
EMC_SDRAM_REFRESH
(
64
);
LPC_EMC
->
DynamicControl
=
0x00000083
;
/* Issue MODE command */
LPC_EMC
->
DynamicControl
=
0x00000083
;
/* Issue MODE command */
#ifdef SDRAM_CONFIG_16BIT
wtemp
=
*
((
volatile
uint16_t
*
)(
SDRAM_BASE
|
(
0x33
<<
12
)));
/* 8 burst, 3 CAS latency */
wtemp
=
*
((
volatile
uint16_t
*
)(
EXT_SDRAM_BEGIN
|
(
0x33
<<
12
)));
/* 8 burst, 3 CAS latency */
#elif defined SDRAM_CONFIG_32BIT
dwtemp
=
*
((
volatile
uint32_t
*
)(
SDRAM_BASE
|
(
0x32
<<
13
)));
/* 4 burst, 3 CAS latency */
dwtemp
=
*
((
volatile
uint32_t
*
)(
SDRAM_BASE
|
(
0x32
<<
13
)));
/* 4 burst, 3 CAS latency */
#endif
LPC_EMC
->
DynamicControl
=
0x00000000
;
/* Issue NORMAL command */
LPC_EMC
->
DynamicControl
=
0x00000000
;
/* Issue NORMAL command */
LPC_EMC
->
DynamicConfig0
|=
0x80000
;
/* enable buffer */
LPC_EMC
->
DynamicConfig0
|=
0x80000
;
/* enable buffer */
TIM_Waitms
(
1
);
TIM_DeInit
(
LPC_TIM0
);
}
#endif
/* BSP_USING_SDRAM */
bsp/lpc408x/drivers/drv_sdram.h
浏览文件 @
01671090
...
...
@@ -8,24 +8,25 @@
* 2013-05-19 Bernard The first version for LPC40xx
*/
#ifndef
__
DRV_SDRAM_H__
#define
__
DRV_SDRAM_H__
#ifndef DRV_SDRAM_H__
#define DRV_SDRAM_H__
#include <board.h>
#define SDRAM_CONFIG_16BIT /
/use the 16 bitSDRAM
//#define SDRAM_CONFIG_32BIT
//use the 32 bitSDRAM
#define SDRAM_CONFIG_16BIT
/
* use the 16 bitSDRAM */
//#define SDRAM_CONFIG_32BIT
/* use the 32 bitSDRAM */
#ifdef SDRAM_CONFIG_16BIT
#define SDRAM_SIZE 0x2000000 // 256Mbit
#elif defined SDRAM_CONFIG_32BIT
//
#define SDRAM_SIZE 0x4000000 // 512Mbit
#define EXT_SDRAM_SIZE 0x2000000
/* 256Mbit */
#elif defined SDRAM_CONFIG_32BIT
#define EXT_SDRAM_SIZE 0x4000000
/* 512Mbit */
#else
error
Wrong
SDRAM
config
,
check
ex_sdram
.
h
error
Wrong
SDRAM
config
,
check
ex_sdram
.
h
#endif
#define SDRAM_BASE 0xA0000000
/* CS0 */
#define EXT_SDRAM_BEGIN 0xA0000000
/* CS0 */
#define EXT_SDRAM_END (EXT_SDRAM_BEGIN + EXT_SDRAM_SIZE)
void
lpc_sdram_hw
_init
(
void
);
void
rt_hw_sdram
_init
(
void
);
#endif
#endif
/* DRV_SDRAM_H__ */
bsp/lpc408x/drivers/drv_uart.c
浏览文件 @
01671090
...
...
@@ -8,12 +8,12 @@
* 2013-05-18 Bernard The first version for LPC40xx
*/
#include <rthw.h>
#include <rtthread.h>
#include <rtdevice.h>
#include "board.h"
#ifdef RT_USING_SERIAL
struct
lpc_uart
{
LPC_UART_TypeDef
*
UART
;
...
...
@@ -48,7 +48,6 @@ static rt_err_t lpc_configure(struct rt_serial_device *serial, struct serial_con
/*enable and reset FIFO*/
uart
->
UART
->
FCR
=
0x07
;
return
RT_EOK
;
}
...
...
@@ -104,11 +103,7 @@ static const struct rt_uart_ops lpc_uart_ops =
lpc_getc
,
};
#ifdef RT_USING_UART0
/* UART0 device driver structure */
#if RTTHREAD_VERSION < 20000
/* RT-Thread 1.x */
struct
serial_ringbuffer
uart0_int_rx
;
#endif
#ifdef BSP_USING_UART0
struct
lpc_uart
uart0
=
{
...
...
@@ -128,14 +123,9 @@ void UART0_IRQHandler(void)
IIR
&=
0x0e
;
switch
(
IIR
)
{
case
0x04
:
case
0x0C
:
#if RTTHREAD_VERSION < 20000
rt_hw_serial_isr
(
&
serial0
);
#else
rt_hw_serial_isr
(
&
serial0
,
RT_SERIAL_EVENT_RX_IND
);
#endif
break
;
case
0x06
:
tmp
=
LPC_UART0
->
LSR
;
...
...
@@ -148,11 +138,8 @@ void UART0_IRQHandler(void)
rt_interrupt_leave
();
}
#endif
#ifdef RT_USING_UART2
/* UART2 device driver structure */
#if RTTHREAD_VERSION < 20000
/* RT-Thread 1.x */
struct
serial_ringbuffer
uart2_int_rx
;
#endif
#ifdef BSP_USING_UART2
struct
lpc_uart
uart2
=
{
...
...
@@ -174,11 +161,7 @@ void UART2_IRQHandler(void)
{
case
0x04
:
case
0x0C
:
#if RTTHREAD_VERSION < 20000
rt_hw_serial_isr
(
&
serial2
);
#else
rt_hw_serial_isr
(
&
serial2
,
RT_SERIAL_EVENT_RX_IND
);
#endif
break
;
case
0x06
:
tmp
=
LPC_UART2
->
LSR
;
...
...
@@ -193,66 +176,19 @@ void UART2_IRQHandler(void)
}
#endif
#ifdef RT_USING_UART4
/* UART4 device driver structure */
#if RTTHREAD_VERSION < 20000
/* RT-Thread 1.x */
struct
serial_ringbuffer
uart4_int_rx
;
#endif
struct
lpc_uart
uart4
=
{
LPC_UART4
,
UART4_IRQn
,
};
struct
rt_serial_device
serial4
;
void
UART4_IRQHandler
(
void
)
{
volatile
uint32_t
IIR
,
tmp
;
/* enter interrupt */
rt_interrupt_enter
();
IIR
=
LPC_UART4
->
IIR
;
IIR
&=
0x0e
;
switch
(
IIR
)
{
case
0x04
:
case
0x0C
:
#if RTTHREAD_VERSION < 20000
rt_hw_serial_isr
(
&
serial4
);
#else
rt_hw_serial_isr
(
&
serial4
,
RT_SERIAL_EVENT_RX_IND
);
#endif
break
;
case
0x06
:
tmp
=
LPC_UART4
->
LSR
;
break
;
default
:
tmp
=
LPC_UART4
->
LSR
;
break
;
}
/* leave interrupt */
rt_interrupt_leave
();
}
#endif
void
rt_hw_uart_init
(
void
)
int
rt_hw_uart_init
(
void
)
{
rt_err_t
ret
=
RT_EOK
;
struct
lpc_uart
*
uart
;
struct
serial_configure
config
=
RT_SERIAL_CONFIG_DEFAULT
;
#ifdef
RT
_USING_UART0
#ifdef
BSP
_USING_UART0
uart
=
&
uart0
;
serial0
.
ops
=
&
lpc_uart_ops
;
serial0
.
config
=
config
;
#if RTTHREAD_VERSION < 20000
serial0
.
int_rx
=
&
uart0_int_rx
;
#endif
serial0
.
parent
.
user_data
=
uart
;
/*
* Initialize UART0 pin connect
* P0.2: U0_TXD
...
...
@@ -273,19 +209,16 @@ void rt_hw_uart_init(void)
NVIC_EnableIRQ
(
uart
->
UART_IRQn
);
/* register UART0 device */
rt_hw_serial_register
(
&
serial0
,
"uart0"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_STREAM
,
uart
);
r
et
=
r
t_hw_serial_register
(
&
serial0
,
"uart0"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_STREAM
,
uart
);
#endif
#ifdef
RT
_USING_UART2
#ifdef
BSP
_USING_UART2
uart
=
&
uart2
;
serial2
.
ops
=
&
lpc_uart_ops
;
serial2
.
config
=
config
;
#if RTTHREAD_VERSION < 20000
serial2
.
int_rx
=
&
uart2_int_rx
;
#endif
serial2
.
parent
.
user_data
=
uart
;
/*
...
...
@@ -307,42 +240,13 @@ void rt_hw_uart_init(void)
NVIC_EnableIRQ
(
uart
->
UART_IRQn
);
/* register UART2 device */
rt_hw_serial_register
(
&
serial2
,
"uart2"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_STREAM
,
uart
);
r
et
=
r
t_hw_serial_register
(
&
serial2
,
"uart2"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_STREAM
,
uart
);
#endif
#ifdef RT_USING_UART4
uart
=
&
uart4
;
serial4
.
ops
=
&
lpc_uart_ops
;
serial4
.
config
=
config
;
#if RTTHREAD_VERSION < 20000
serial4
.
int_rx
=
&
uart4_int_rx
;
#endif
serial4
.
parent
.
user_data
=
uart
;
/*
* Initialize UART2 pin connect
* P5.4: U2_TXD
* P5.3: U2_RXD
*/
LPC_IOCON
->
P5_4
&=
~
0x07
;
LPC_IOCON
->
P5_3
&=
~
0x07
;
LPC_IOCON
->
P5_4
|=
0x04
;
LPC_IOCON
->
P5_3
|=
0x04
;
/* enable the uart4 power and clock */
LPC_SC
->
PCONP
|=
0x01
<<
8
;
/* preemption = 1, sub-priority = 1 */
NVIC_SetPriority
(
uart
->
UART_IRQn
,
((
0x01
<<
3
)
|
0x01
));
/* Enable Interrupt for UART channel */
NVIC_EnableIRQ
(
uart
->
UART_IRQn
);
/* register UART2 device */
rt_hw_serial_register
(
&
serial4
,
"uart4"
,
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_STREAM
,
uart
);
#endif
return
ret
;
}
INIT_BOARD_EXPORT
(
rt_hw_uart_init
);
#endif
/* RT_USING_SERIAL */
bsp/lpc408x/drivers/drv_uart.h
浏览文件 @
01671090
...
...
@@ -8,8 +8,8 @@
* 2014-01-05 NongXiaoming The first version for LPC40xx
*/
#ifndef
_
_UART_H__
#define
_
_UART_H__
#ifndef
DRV
_UART_H__
#define
DRV
_UART_H__
void
rt_hw_uart_init
(
void
);
...
...
bsp/lpc408x/
rtthread-lpc408x.ld
→
bsp/lpc408x/
drivers/linker_scripts/link.lds
浏览文件 @
01671090
...
...
@@ -6,8 +6,8 @@
/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH =
0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH =
0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH =
512k /* 512k flash */
DATA (rw) : ORIGIN = 0x10000000, LENGTH =
64k /* 64k sram */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
...
...
@@ -38,6 +38,7 @@ SECTIONS
__vsymtab_end = .;
. = ALIGN(4);
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
...
...
bsp/lpc408x/
rtthread-lpc408x
.sct
→
bsp/lpc408x/
drivers/linker_scripts/link
.sct
浏览文件 @
01671090
文件已移动
bsp/lpc408x/project.uvopt
浏览文件 @
01671090
...
...
@@ -21,7 +21,7 @@
</DaveTm>
<Target>
<TargetName>
RT-Thread LPC408x
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
...
...
@@ -43,7 +43,7 @@
<PageWidth>
79
</PageWidth>
<PageLength>
66
</PageLength>
<TabStop>
8
</TabStop>
<ListingPath>
.\build\
</ListingPath>
<ListingPath>
.\build\
keil\List\
</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>
1
</CreateCListing>
...
...
@@ -75,17 +75,7 @@
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
<CpuCode>
0
</CpuCode>
<DllOpt>
<SimDllName>
SARMCM3.DLL
</SimDllName>
<SimDllArguments>
-MPU
</SimDllArguments>
<SimDlgDllName>
DCM.DLL
</SimDlgDllName>
<SimDlgDllArguments>
-pCM4
</SimDlgDllArguments>
<TargetDllName>
SARMCM3.DLL
</TargetDllName>
<TargetDllArguments>
-MPU
</TargetDllArguments>
<TargetDlgDllName>
TCM.DLL
</TargetDlgDllName>
<TargetDlgDllArguments>
-pCM4
</TargetDlgDllArguments>
</DllOpt>
<CpuCode>
8
</CpuCode>
<DebugOpt>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
...
...
@@ -97,16 +87,19 @@
<sRfunc>
1
</sRfunc>
<sRbox>
1
</sRbox>
<tLdApp>
1
</tLdApp>
<tGomain>
0
</tGomain>
<tGomain>
1
</tGomain>
<tRbreak>
1
</tRbreak>
<tRwatch>
1
</tRwatch>
<tRmem>
1
</tRmem>
<tRfunc>
0
</tRfunc>
<tRbox>
1
</tRbox>
<tRtrace>
0
</tRtrace>
<sRSysVw>
1
</sRSysVw>
<tRSysVw>
1
</tRSysVw>
<tPdscDbg>
0
</tPdscDbg>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<nTsel>
7
</nTsel>
<nTsel>
6
</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
...
...
@@ -123,7 +116,12 @@
<SetRegEntry>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Name>
-U4294967295 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO11 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000
</Name>
<Name>
-U30000299 -O4303 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000
</Name>
</SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
UL2CM3
</Key>
<Name>
UL2CM3(-O4303 -S0 -C0 -FO7 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000)
</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
...
...
bsp/lpc408x/project.uvoptx
0 → 100644
浏览文件 @
01671090
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"project_optx.xsd"
>
<SchemaVersion>
1.0
</SchemaVersion>
<Header>
### uVision Project, (C) Keil Software
</Header>
<Extensions>
<cExt>
*.c
</cExt>
<aExt>
*.s*; *.src; *.a*
</aExt>
<oExt>
*.obj; *.o
</oExt>
<lExt>
*.lib
</lExt>
<tExt>
*.txt; *.h; *.inc
</tExt>
<pExt>
*.plm
</pExt>
<CppX>
*.cpp
</CppX>
<nMigrate>
0
</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>
0
</dwLowDateTime>
<dwHighDateTime>
0
</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
<CLKADS>
12000000
</CLKADS>
<OPTTT>
<gFlags>
1
</gFlags>
<BeepAtEnd>
1
</BeepAtEnd>
<RunSim>
0
</RunSim>
<RunTarget>
1
</RunTarget>
<RunAbUc>
0
</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>
1
</HexSelection>
<FlashByte>
65535
</FlashByte>
<HexRangeLowAddress>
0
</HexRangeLowAddress>
<HexRangeHighAddress>
0
</HexRangeHighAddress>
<HexOffset>
0
</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>
79
</PageWidth>
<PageLength>
66
</PageLength>
<TabStop>
8
</TabStop>
<ListingPath>
.\build\keil\List\
</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>
1
</CreateCListing>
<CreateAListing>
1
</CreateAListing>
<CreateLListing>
1
</CreateLListing>
<CreateIListing>
0
</CreateIListing>
<AsmCond>
1
</AsmCond>
<AsmSymb>
1
</AsmSymb>
<AsmXref>
0
</AsmXref>
<CCond>
1
</CCond>
<CCode>
0
</CCode>
<CListInc>
0
</CListInc>
<CSymb>
0
</CSymb>
<LinkerCodeListing>
0
</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>
1
</LMap>
<LComments>
1
</LComments>
<LGenerateSymbols>
1
</LGenerateSymbols>
<LLibSym>
1
</LLibSym>
<LLines>
1
</LLines>
<LLocSym>
1
</LLocSym>
<LPubSym>
1
</LPubSym>
<LXref>
0
</LXref>
<LExpSel>
0
</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
<CpuCode>
8
</CpuCode>
<DebugOpt>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
<sLdApp>
1
</sLdApp>
<sGomain>
1
</sGomain>
<sRbreak>
1
</sRbreak>
<sRwatch>
1
</sRwatch>
<sRmem>
1
</sRmem>
<sRfunc>
1
</sRfunc>
<sRbox>
1
</sRbox>
<tLdApp>
1
</tLdApp>
<tGomain>
1
</tGomain>
<tRbreak>
1
</tRbreak>
<tRwatch>
1
</tRwatch>
<tRmem>
1
</tRmem>
<tRfunc>
0
</tRfunc>
<tRbox>
1
</tRbox>
<tRtrace>
1
</tRtrace>
<sRSysVw>
1
</sRSysVw>
<tRSysVw>
1
</tRSysVw>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<bEvRecOn>
1
</bEvRecOn>
<bSchkAxf>
0
</bSchkAxf>
<bTchkAxf>
0
</bTchkAxf>
<nTsel>
4
</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>
Segger\JL2CM3.dll
</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Name>
-U30000299 -O14 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight JTAG-DP") -D00(4BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FCFE0 -FN1 -FF0LPC_IAP_512.FLM -FS00 -FL080000 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
</Name>
</SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
UL2CM3
</Key>
<Name>
UL2CM3(-S0 -C0 -P0 -FN1 -FCFE0 -FD10000000 -FF0LPC_IAP_512 -FL080000 -FS00 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>
0
</THDelay>
</Tracepoint>
<DebugFlag>
<trace>
0
</trace>
<periodic>
0
</periodic>
<aLwin>
0
</aLwin>
<aCover>
0
</aCover>
<aSer1>
0
</aSer1>
<aSer2>
0
</aSer2>
<aPa>
0
</aPa>
<viewmode>
0
</viewmode>
<vrSel>
0
</vrSel>
<aSym>
0
</aSym>
<aTbox>
0
</aTbox>
<AscS1>
0
</AscS1>
<AscS2>
0
</AscS2>
<AscS3>
0
</AscS3>
<aSer3>
0
</aSer3>
<eProf>
0
</eProf>
<aLa>
0
</aLa>
<aPa1>
0
</aPa1>
<AscS4>
0
</AscS4>
<aSer4>
0
</aSer4>
<StkLoc>
0
</StkLoc>
<TrcWin>
0
</TrcWin>
<newCpu>
0
</newCpu>
<uProt>
0
</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>
0
</bLintAuto>
<bAutoGenD>
0
</bAutoGenD>
<LntExFlags>
0
</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</Target>
</ProjectOpt>
bsp/lpc408x/project.uvproj
浏览文件 @
01671090
...
...
@@ -4,7 +4,7 @@
<Header>
### uVision Project, (C) Keil Software
</Header>
<Targets>
<Target>
<TargetName>
RT-Thread LPC408x
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
...
...
@@ -27,6 +27,7 @@
<SLE66AMisc
/>
<SLE66LinkerMisc
/>
<SFDFile>
SFD\NXP\LPC407x_8x_177x_8x\LPC408x_7x.SFR
</SFDFile>
<bCustSvd>
0
</bCustSvd>
<UseEnv>
0
</UseEnv>
<BinPath
/>
<IncludePath
/>
...
...
@@ -40,21 +41,21 @@
<NotGenerated>
0
</NotGenerated>
<InvalidFlash>
1
</InvalidFlash>
</TargetStatus>
<OutputDirectory>
.\build\
</OutputDirectory>
<OutputName>
rtthread
-lpc
</OutputName>
<OutputDirectory>
.\build\
keil\Obj\
</OutputDirectory>
<OutputName>
rtthread
</OutputName>
<CreateExecutable>
1
</CreateExecutable>
<CreateLib>
0
</CreateLib>
<CreateHexFile>
0
</CreateHexFile>
<DebugInformation>
1
</DebugInformation>
<BrowseInformation>
1
</BrowseInformation>
<ListingPath>
.\build\
</ListingPath>
<BrowseInformation>
0
</BrowseInformation>
<ListingPath>
.\build\
keil\List\
</ListingPath>
<HexFormatSelection>
1
</HexFormatSelection>
<Merge32K>
0
</Merge32K>
<CreateBatchFile>
0
</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>
0
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name
/
>
<UserProg1Name
>
fromelf --bin !L --output rtthread.bin
</UserProg1Name
>
<UserProg2Name
/>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
...
...
@@ -94,6 +95,7 @@
<StopOnExitCode>
3
</StopOnExitCode>
<CustomArgument
/>
<IncludeLibraryModules
/>
<ComprImg>
1
</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName>
SARMCM3.DLL
</SimDllName>
...
...
@@ -123,20 +125,23 @@
<RestoreFunctions>
1
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<LimitSpeedToRealTime>
0
</LimitSpeedToRealTime>
<RestoreSysVw>
1
</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>
1
</UseTarget>
<LoadApplicationAtStartup>
1
</LoadApplicationAtStartup>
<RunToMain>
0
</RunToMain>
<RunToMain>
1
</RunToMain>
<RestoreBreakpoints>
1
</RestoreBreakpoints>
<RestoreWatchpoints>
1
</RestoreWatchpoints>
<RestoreMemoryDisplay>
1
</RestoreMemoryDisplay>
<RestoreFunctions>
0
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<RestoreTracepoints>
0
</RestoreTracepoints>
<RestoreSysVw>
1
</RestoreSysVw>
<UsePdscDebugDescription>
0
</UsePdscDebugDescription>
</Target>
<RunDebugAfterBuild>
0
</RunDebugAfterBuild>
<TargetSelection>
7
</TargetSelection>
<TargetSelection>
6
</TargetSelection>
<SimDlls>
<CpuDll
/>
<CpuDllArguments
/>
...
...
@@ -158,14 +163,18 @@
<UseTargetDll>
1
</UseTargetDll>
<UseExternalTool>
0
</UseExternalTool>
<RunIndependent>
0
</RunIndependent>
<UpdateFlashBeforeDebugging>
0
</UpdateFlashBeforeDebugging>
<UpdateFlashBeforeDebugging>
1
</UpdateFlashBeforeDebugging>
<Capability>
1
</Capability>
<DriverSelection>
4099
</DriverSelection>
</Flash1>
<bUseTDR>
0
</bUseTDR>
<bUseTDR>
1
</bUseTDR>
<Flash2>
Segger\JL2CM3.dll
</Flash2>
<Flash3>
"" ()
</Flash3>
<Flash4
/>
<pFcarmOut
/>
<pFcarmGrp
/>
<pFcArmRoot
/>
<FcArmLst>
0
</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
...
...
@@ -344,11 +353,13 @@
<wLevel>
0
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls
/>
<Define>
CORE_M4
, RT_USING_ARM_LIBC
</Define>
<Define>
CORE_M4
</Define>
<Undefine
/>
<IncludePath>
drivers;applications;.;Libraries/Drivers/include;Libraries/Device/NXP/LPC407x_8x_177x_8x/Include;Libraries/CMSIS/Include;../../include;../../libcpu/arm/cortex-m4;../../libcpu/arm/common;../../components/drivers/include;../../components/drivers/include;../../components/drivers/include;../../components/libc/pthreads;../../components/libc/time;../../components/libc/compilers/armlibc;../../components/
finsh
</IncludePath>
<IncludePath>
.;..\..\include;applications;.;drivers;Libraries\Device\NXP\LPC407x_8x_177x_8x\Include;Libraries\CMSIS\Include;Libraries\Drivers\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\
finsh
</IncludePath>
</VariousControls>
</Cads>
<Aads>
...
...
@@ -360,6 +371,7 @@
<SwStkChk>
0
</SwStkChk>
<NoWarn>
0
</NoWarn>
<uSurpInc>
0
</uSurpInc>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls
/>
<Define
/>
...
...
@@ -376,10 +388,11 @@
<useFile>
0
</useFile>
<TextAddressRange>
0x00000000
</TextAddressRange>
<DataAddressRange>
0x10000000
</DataAddressRange>
<pXoBase
/>
<ScatterFile
/>
<IncludeLibs
/>
<IncludeLibsPath
/>
<Misc>
--keep *.o(.rti_fn.*) --keep *.o(FSymTab)
--keep *.o(VSymTab)
</Misc>
<Misc>
--keep *.o(.rti_fn.*) --keep *.o(FSymTab)
</Misc>
<LinkerInputFile
/>
<DisabledWarnings
/>
</LDads>
...
...
@@ -387,621 +400,492 @@
</TargetOption>
<Groups>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_hwtimer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers/drv_hwtimer.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_led.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers/drv_led.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_lpccan.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers/drv_lpccan.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_sdram.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers/drv_sdram.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers/drv_uart.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Applications
</GroupName>
<Files>
<File>
<FileName>
application.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications/application.c
</FilePath>
</File>
</Files>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
board
.c
</FileName>
<FileName>
clock
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications/board
.c
</FilePath>
<FilePath>
..\..\src\clock
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
c
anapp
.c
</FileName>
<FileName>
c
omponents
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications/canapp
.c
</FilePath>
<FilePath>
..\..\src\components
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
sram
.c
</FileName>
<FileName>
cpu
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications/sram
.c
</FilePath>
<FilePath>
..\..\src\cpu
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
startup
.c
</FileName>
<FileName>
device
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications/startup
.c
</FilePath>
<FilePath>
..\..\src\device
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
lpc_adc
.c
</FileName>
<FileName>
idle
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_adc
.c
</FilePath>
<FilePath>
..\..\src\idle
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_bod
.c
</FileName>
<FileName>
ipc
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_bod
.c
</FilePath>
<FilePath>
..\..\src\ipc
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_can
.c
</FileName>
<FileName>
irq
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_can
.c
</FilePath>
<FilePath>
..\..\src\irq
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_clkpwr
.c
</FileName>
<FileName>
kservice
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_clkpwr
.c
</FilePath>
<FilePath>
..\..\src\kservice
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_crc
.c
</FileName>
<FileName>
memheap
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_crc
.c
</FilePath>
<FilePath>
..\..\src\memheap
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_dac
.c
</FileName>
<FileName>
mempool
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_dac
.c
</FilePath>
<FilePath>
..\..\src\mempool
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_eeprom
.c
</FileName>
<FileName>
object
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_eeprom
.c
</FilePath>
<FilePath>
..\..\src\object
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_emc
.c
</FileName>
<FileName>
scheduler
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_emc
.c
</FilePath>
<FilePath>
..\..\src\scheduler
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_exti
.c
</FileName>
<FileName>
signal
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_exti
.c
</FilePath>
<FilePath>
..\..\src\signal
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_gpdma
.c
</FileName>
<FileName>
thread
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_gpdma
.c
</FilePath>
<FilePath>
..\..\src\thread
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_gpio
.c
</FileName>
<FileName>
timer
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_gpio
.c
</FilePath>
<FilePath>
..\..\src\timer
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Applications
</GroupName>
<Files>
<File>
<FileName>
lpc_i2c
.c
</FileName>
<FileName>
main
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_i2c
.c
</FilePath>
<FilePath>
applications\main
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
lpc_i2s
.c
</FileName>
<FileName>
board
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_i2s
.c
</FilePath>
<FilePath>
drivers\board
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_iap
.c
</FileName>
<FileName>
drv_uart
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Drivers/source/lpc_iap
.c
</FilePath>
<FilePath>
drivers\drv_uart
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
lpc_lcd
.c
</FileName>
<FileName>
system_LPC407x_8x_177x_8x
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_lcd
.c
</FilePath>
<FilePath>
Libraries
\Device\NXP\LPC407x_8x_177x_8x\Source\Templates\system_LPC407x_8x_177x_8x
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_mcpwm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_mcpwm.c
</FilePath>
<FileName>
startup_LPC407x_8x_177x_8x.s
</FileName>
<FileType>
2
</FileType>
<FilePath>
Libraries
\Device\NXP\LPC407x_8x_177x_8x\Source\Templates\ARM\startup_LPC407x_8x_177x_8x.s
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
nvi
c.c
</FileName>
<FileName>
lpc_
ad
c.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_nvi
c.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_ad
c.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
pinsel
.c
</FileName>
<FileName>
lpc_
bod
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_pinsel
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_bod
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
pwm
.c
</FileName>
<FileName>
lpc_
can
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_pwm
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_can
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
qei
.c
</FileName>
<FileName>
lpc_
clkpwr
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_qei
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_clkpwr
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
rt
c.c
</FileName>
<FileName>
lpc_
cr
c.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_rt
c.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_cr
c.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
ssp
.c
</FileName>
<FileName>
lpc_
dac
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_ssp
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_dac
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
systick
.c
</FileName>
<FileName>
lpc_
eeprom
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_systick
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_eeprom
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
timer
.c
</FileName>
<FileName>
lpc_
emc
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_timer
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_emc
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
uart
.c
</FileName>
<FileName>
lpc_
exti
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_uart
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_exti
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_
wwdt
.c
</FileName>
<FileName>
lpc_
gpdma
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries
/Drivers/source/lpc_wwdt
.c
</FilePath>
<FilePath>
Libraries
\Drivers\source\lpc_gpdma
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
system_LPC407x_8x_177x_8x
.c
</FileName>
<FileName>
lpc_gpio
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries/Device/NXP/LPC407x_8x_177x_8x/Source/Templates/system_LPC407x_8x_177x_8x.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
startup_LPC407x_8x_177x_8x.s
</FileName>
<FileType>
2
</FileType>
<FilePath>
Libraries/Device/NXP/LPC407x_8x_177x_8x/Source/Templates/ARM/startup_LPC407x_8x_177x_8x.s
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_gpio.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
clock
.c
</FileName>
<FileName>
lpc_i2c
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/clock
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_i2c
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
component
s.c
</FileName>
<FileName>
lpc_i2
s.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/component
s.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_i2
s.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
device
.c
</FileName>
<FileName>
lpc_iap
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/device
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_iap
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
idle
.c
</FileName>
<FileName>
lpc_lcd
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/idle
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_lcd
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ipc
.c
</FileName>
<FileName>
lpc_mcpwm
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/ipc
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_mcpwm
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
irq
.c
</FileName>
<FileName>
lpc_nvic
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/irq
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_nvic
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
kservice
.c
</FileName>
<FileName>
lpc_pinsel
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/kservice
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_pinsel
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
me
m.c
</FileName>
<FileName>
lpc_pw
m.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/me
m.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_pw
m.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
memheap
.c
</FileName>
<FileName>
lpc_qei
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/memheap
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_qei
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
mempool
.c
</FileName>
<FileName>
lpc_rtc
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/mempool
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_rtc
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
object
.c
</FileName>
<FileName>
lpc_ssp
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/object
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_ssp
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
scheduler
.c
</FileName>
<FileName>
lpc_systick
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/scheduler
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_systick
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
signal
.c
</FileName>
<FileName>
lpc_timer
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/signal
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_timer
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
thread
.c
</FileName>
<FileName>
lpc_uart
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/thread
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_uart
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
timer
.c
</FileName>
<FileName>
lpc_wwdt
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../src/timer
.c
</FilePath>
<FilePath>
Libraries\Drivers\source\lpc_wwdt
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
CORTEX-M4
</GroupName>
<Files>
<File>
<FileName>
cpuport.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../libcpu/arm/cortex-m4/cpuport.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
context_rvds.S
</FileName>
<FileType>
2
</FileType>
<FilePath>
../../libcpu/arm/cortex-m4/context_rvds.S
</FilePath>
</File>
</Files>
<GroupName>
cpu
</GroupName>
<Files>
<File>
<FileName>
backtrace.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../libcpu/arm/common/
backtrace.c
</FilePath>
<FilePath>
..
\..\libcpu\arm\common\
backtrace.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
div0.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../libcpu/arm/common/
div0.c
</FilePath>
<FilePath>
..
\..\libcpu\arm\common\
div0.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
showmem.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../libcpu/arm/common/showmem.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
DeviceDrivers
</GroupName>
<Files>
<File>
<FileName>
serial.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/serial/serial.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
can.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/can/can.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
completion.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/src/completion.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dataqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/src/dataqueue.c
</FilePath>
<FilePath>
..\..\libcpu\arm\common\showmem.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pipe.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/src/pipe.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ringbuffer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/drivers/src/ringbuffer.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
waitqueue.c
</FileName>
<FileName>
cpuport.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/drivers/src/waitqueue
.c
</FilePath>
<FilePath>
..
\..\libcpu\arm\cortex-m4\cpuport
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
workqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/drivers/src/workqueue.c
</FilePath>
<FileName>
context_rvds.S
</FileName>
<FileType>
2
</FileType>
<FilePath>
..
\..\libcpu\arm\cortex-m4\context_rvds.S
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
pthreads
</GroupName>
<Files>
<File>
<FileName>
mqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/libc/pthreads/mqueue.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/libc/pthreads/pthread.c
</FilePath>
</File>
</Files>
<GroupName>
Filesystem
</GroupName>
<Files>
<File>
<FileName>
pthread_attr
.c
</FileName>
<FileName>
dfs
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_attr
.c
</FilePath>
<FilePath>
..
\..\components\dfs\src\dfs
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_barrier
.c
</FileName>
<FileName>
dfs_file
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_barrier
.c
</FilePath>
<FilePath>
..
\..\components\dfs\src\dfs_file
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_cond
.c
</FileName>
<FileName>
dfs_fs
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_cond
.c
</FilePath>
<FilePath>
..
\..\components\dfs\src\dfs_fs
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_mute
x.c
</FileName>
<FileName>
dfs_posi
x.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_mute
x.c
</FilePath>
<FilePath>
..
\..\components\dfs\src\dfs_posi
x.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_rwlock
.c
</FileName>
<FileName>
devfs
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_rwlock
.c
</FilePath>
<FilePath>
..
\..\components\dfs\filesystems\devfs\devfs
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_spin
.c
</FileName>
<FileName>
dfs_elm
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/pthread_spin
.c
</FilePath>
<FilePath>
..
\..\components\dfs\filesystems\elmfat\dfs_elm
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pthread_tls
.c
</FileName>
<FileName>
ff
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/libc/pthreads/pthread_tls.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
sched.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/libc/pthreads/sched.c
</FilePath>
<FilePath>
..\..\components\dfs\filesystems\elmfat\ff.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
DeviceDrivers
</GroupName>
<Files>
<File>
<FileName>
semaphore
.c
</FileName>
<FileName>
pin
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/pthreads/semaphore
.c
</FilePath>
<FilePath>
..
\..\components\drivers\misc\pin
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
clock_time
.c
</FileName>
<FileName>
serial
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/time/clock_time
.c
</FilePath>
<FilePath>
..
\..\components\drivers\serial\serial
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
posix_sleep
.c
</FileName>
<FileName>
completion
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/time/posix_sleep
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\completion
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
libc
</GroupName>
<Files>
<File>
<FileName>
libc
.c
</FileName>
<FileName>
dataqueue
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/libc
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\dataqueue
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
libc_syms
.c
</FileName>
<FileName>
pipe
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/libc_syms
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\pipe
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
mem_std
.c
</FileName>
<FileName>
ringblk_buf
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/mem_std
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\ringblk_buf
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
stdio
.c
</FileName>
<FileName>
ringbuffer
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/stdio
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\ringbuffer
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
stubs
.c
</FileName>
<FileName>
waitqueue
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/stubs
.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\waitqueue
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
tim
e.c
</FileName>
<FileName>
workqueu
e.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/libc/compilers/armlibc/tim
e.c
</FilePath>
<FilePath>
..
\..\components\drivers\src\workqueu
e.c
</FilePath>
</File>
</Files>
</Group>
...
...
@@ -1011,112 +895,42 @@
<File>
<FileName>
shell.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/finsh/
shell.c
</FilePath>
<FilePath>
..
\..\components\finsh\
shell.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
symbol.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/finsh/
symbol.c
</FilePath>
<FilePath>
..
\..\components\finsh\
symbol.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
cmd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/finsh/
cmd.c
</FilePath>
<FilePath>
..
\..\components\finsh\
cmd.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
msh.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/finsh/
msh.c
</FilePath>
<FilePath>
..
\..\components\finsh\
msh.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
msh_cmd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..
/../components/finsh/
msh_cmd.c
</FilePath>
<FilePath>
..
\..\components\finsh\
msh_cmd.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
msh_file.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/msh_file.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_compiler.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_compiler.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_error.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_error.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_heap.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_heap.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_init.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_init.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_node.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_node.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_ops.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_ops.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_parser.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_parser.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_var.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_var.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_vm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_vm.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
finsh_token.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
../../components/finsh/finsh_token.c
</FilePath>
<FilePath>
..\..\components\finsh\msh_file.c
</FilePath>
</File>
</Files>
</Group>
...
...
bsp/lpc408x/project.uvprojx
浏览文件 @
01671090
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"project_projx.xsd"
>
<SchemaVersion>
2.1
</SchemaVersion>
<Header>
### uVision Project, (C) Keil Software
</Header>
<Targets>
<Target>
<TargetName>
RT-Thread LPC408X
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<pCCUsed>
5060422::V5.06 update 4 (build 422)::ARMCC
</pCCUsed>
<pCCUsed>
5060528::V5.06 update 5 (build 528)::ARMCC
</pCCUsed>
<uAC6>
0
</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>
ARMCM4
</Device>
<Vendor>
ARM
</Vendor>
<PackID>
ARM.CMSIS.5.0
.0
</PackID>
<Device>
LPC4088FET208
</Device>
<Vendor>
NXP
</Vendor>
<PackID>
Keil.LPC4000_DFP.2.1
.0
</PackID>
<PackURL>
http://www.keil.com/pack/
</PackURL>
<Cpu>
IRAM(0x
20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M4") CLOCK(12000000) ESEL
ELITTLE
</Cpu>
<FlashUtilSpec
></FlashUtilSpec
>
<StartupFile
></StartupFile
>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD
20000000 -FC1000
)
</FlashDriverDll>
<Cpu>
IRAM(0x
10000000,0x10000) IRAM2(0x20000000,0x8000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000)
ELITTLE
</Cpu>
<FlashUtilSpec
/
>
<StartupFile
/
>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD
10000000 -FCFE0 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
)
</FlashDriverDll>
<DeviceId>
0
</DeviceId>
<RegisterFile>
$$Device:
ARMCM4$Device\ARM\ARMCM4\Include\ARMCM4
.h
</RegisterFile>
<MemoryEnv
></MemoryEnv
>
<Cmp
></Cmp
>
<Asm
></Asm
>
<Linker
></Linker
>
<OHString
></OHString
>
<InfinionOptionDll
></InfinionOptionDll
>
<SLE66CMisc
></SLE66CMisc
>
<SLE66AMisc
></SLE66AMisc
>
<SLE66LinkerMisc
></SLE66LinkerMisc
>
<SFDFile>
$$Device:
ARMCM4$Device\ARM\SVD\ARMCM4
.svd
</SFDFile>
<RegisterFile>
$$Device:
LPC4088FET208$Device\Include\LPC407x_8x_177x_8x
.h
</RegisterFile>
<MemoryEnv
/
>
<Cmp
/
>
<Asm
/
>
<Linker
/
>
<OHString
/
>
<InfinionOptionDll
/
>
<SLE66CMisc
/
>
<SLE66AMisc
/
>
<SLE66LinkerMisc
/
>
<SFDFile>
$$Device:
LPC4088FET208$SVD\LPC408x_7x
.svd
</SFDFile>
<bCustSvd>
0
</bCustSvd>
<UseEnv>
0
</UseEnv>
<BinPath
></BinPath
>
<IncludePath
></IncludePath
>
<LibPath
></LibPath
>
<RegisterFilePath
></RegisterFilePath
>
<DBRegisterFilePath
></DBRegisterFilePath
>
<BinPath
/
>
<IncludePath
/
>
<LibPath
/
>
<RegisterFilePath
/
>
<DBRegisterFilePath
/
>
<TargetStatus>
<Error>
0
</Error>
<ExitCodeStop>
0
</ExitCodeStop>
...
...
@@ -47,22 +45,22 @@
<NotGenerated>
0
</NotGenerated>
<InvalidFlash>
1
</InvalidFlash>
</TargetStatus>
<OutputDirectory>
.\build\
</OutputDirectory>
<OutputDirectory>
.\build\
keil\Obj\
</OutputDirectory>
<OutputName>
rtthread
</OutputName>
<CreateExecutable>
1
</CreateExecutable>
<CreateLib>
0
</CreateLib>
<CreateHexFile>
0
</CreateHexFile>
<DebugInformation>
1
</DebugInformation>
<BrowseInformation>
0
</BrowseInformation>
<ListingPath>
.\build\
</ListingPath>
<ListingPath>
.\build\
keil\List\
</ListingPath>
<HexFormatSelection>
1
</HexFormatSelection>
<Merge32K>
0
</Merge32K>
<CreateBatchFile>
0
</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>
0
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name
></UserProg1Name
>
<UserProg2Name
></UserProg2Name
>
<UserProg1Name
/
>
<UserProg2Name
/
>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
<nStopU1X>
0
</nStopU1X>
...
...
@@ -71,8 +69,8 @@
<BeforeMake>
<RunUserProg1>
0
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name
></UserProg1Name
>
<UserProg2Name
></UserProg2Name
>
<UserProg1Name
/
>
<UserProg2Name
/
>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
<nStopB1X>
0
</nStopB1X>
...
...
@@ -81,15 +79,15 @@
<AfterMake>
<RunUserProg1>
1
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name>
fromelf --bin !L --output rtthread
-mdk
.bin
</UserProg1Name>
<UserProg2Name
></UserProg2Name
>
<UserProg1Name>
fromelf --bin !L --output rtthread.bin
</UserProg1Name>
<UserProg2Name
/
>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
<nStopA1X>
0
</nStopA1X>
<nStopA2X>
0
</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>
0
</SelectedForBatchBuild>
<SVCSIdString
></SVCSIdString
>
<SVCSIdString
/
>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>
0
</UseCPPCompiler>
...
...
@@ -103,8 +101,8 @@
<AssembleAssemblyFile>
0
</AssembleAssemblyFile>
<PublicsOnly>
0
</PublicsOnly>
<StopOnExitCode>
3
</StopOnExitCode>
<CustomArgument
></CustomArgument
>
<IncludeLibraryModules
></IncludeLibraryModules
>
<CustomArgument
/
>
<IncludeLibraryModules
/
>
<ComprImg>
1
</ComprImg>
</CommonProperty>
<DllOption>
...
...
@@ -138,10 +136,10 @@
<bUseTDR>
1
</bUseTDR>
<Flash2>
BIN\UL2CM3.DLL
</Flash2>
<Flash3>
"" ()
</Flash3>
<Flash4
></Flash4
>
<pFcarmOut
></pFcarmOut
>
<pFcarmGrp
></pFcarmGrp
>
<pFcArmRoot
></pFcArmRoot
>
<Flash4
/
>
<pFcarmOut
/
>
<pFcarmGrp
/
>
<pFcArmRoot
/
>
<FcArmLst>
0
</FcArmLst>
</Utilities>
<TargetArmAds>
...
...
@@ -174,7 +172,7 @@
<RvctClst>
0
</RvctClst>
<GenPPlst>
0
</GenPPlst>
<AdsCpuType>
"Cortex-M4"
</AdsCpuType>
<RvctDeviceName
></RvctDeviceName
>
<RvctDeviceName
/
>
<mOS>
0
</mOS>
<uocRom>
0
</uocRom>
<uocRam>
0
</uocRam>
...
...
@@ -182,16 +180,16 @@
<hadIRAM>
1
</hadIRAM>
<hadXRAM>
0
</hadXRAM>
<uocXRam>
0
</uocXRam>
<RvdsVP>
0
</RvdsVP>
<hadIRAM2>
0
</hadIRAM2>
<RvdsVP>
2
</RvdsVP>
<hadIRAM2>
1
</hadIRAM2>
<hadIROM2>
0
</hadIROM2>
<StupSel>
8
</StupSel>
<useUlib>
0
</useUlib>
<EndSel>
1
</EndSel>
<EndSel>
0
</EndSel>
<uLtcg>
0
</uLtcg>
<nSecure>
0
</nSecure>
<RoSelD>
3
</RoSelD>
<RwSelD>
3
</RwSelD>
<RwSelD>
4
</RwSelD>
<CodeSel>
0
</CodeSel>
<OptFeed>
0
</OptFeed>
<NoZi1>
0
</NoZi1>
...
...
@@ -208,7 +206,7 @@
<Ra2Chk>
0
</Ra2Chk>
<Ra3Chk>
0
</Ra3Chk>
<Im1Chk>
1
</Im1Chk>
<Im2Chk>
0
</Im2Chk>
<Im2Chk>
1
</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>
0
</Type>
...
...
@@ -242,13 +240,13 @@
</Ocm6>
<IRAM>
<Type>
0
</Type>
<StartAddress>
0x
2
0000000
</StartAddress>
<Size>
0x
2
0000
</Size>
<StartAddress>
0x
1
0000000
</StartAddress>
<Size>
0x
1
0000
</Size>
</IRAM>
<IROM>
<Type>
1
</Type>
<StartAddress>
0x0
</StartAddress>
<Size>
0x
4
0000
</Size>
<Size>
0x
8
0000
</Size>
</IROM>
<XRAM>
<Type>
0
</Type>
...
...
@@ -302,11 +300,11 @@
</OCR_RVCT9>
<OCR_RVCT10>
<Type>
0
</Type>
<StartAddress>
0x0
</StartAddress>
<Size>
0x0
</Size>
<StartAddress>
0x
2000000
0
</StartAddress>
<Size>
0x
800
0
</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector
></RvctStartVector
>
<RvctStartVector
/
>
</ArmAdsMisc>
<Cads>
<interw>
1
</interw>
...
...
@@ -333,9 +331,9 @@
<v6Rtti>
0
</v6Rtti>
<VariousControls>
<MiscControls>
--library_interface=armcc --library_type=standardlib --diag_suppress=66,1296,186
</MiscControls>
<Define>
CORE_M4
, RT_USING_ARM_LIBC
</Define>
<Undefine
></Undefine
>
<IncludePath>
applications;.;drivers;Libraries\Device\NXP\LPC407x_8x_177x_8x\Include;Libraries\CMSIS\Include;Libraries\Drivers\include;..\..\include;..\..\libcpu\arm\cortex-m4;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\pthreads;..\..\components\libc\time
</IncludePath>
<Define>
CORE_M4
</Define>
<Undefine
/
>
<IncludePath>
.;..\..\include;applications;.;drivers;Libraries\Device\NXP\LPC407x_8x_177x_8x\Include;Libraries\CMSIS\Include;Libraries\Drivers\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m4;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh
</IncludePath>
</VariousControls>
</Cads>
<Aads>
...
...
@@ -350,10 +348,10 @@
<useXO>
0
</useXO>
<uClangAs>
0
</uClangAs>
<VariousControls>
<MiscControls
></MiscControls
>
<Define
></Define
>
<Undefine
></Undefine
>
<IncludePath
></IncludePath
>
<MiscControls
/
>
<Define
/
>
<Undefine
/
>
<IncludePath
/
>
</VariousControls>
</Aads>
<LDads>
...
...
@@ -365,70 +363,145 @@
<useFile>
0
</useFile>
<TextAddressRange>
0x00000000
</TextAddressRange>
<DataAddressRange>
0x10000000
</DataAddressRange>
<pXoBase
></pXoBase
>
<ScatterFile>
.\
rtthread-lpc408x
.sct
</ScatterFile>
<IncludeLibs
></IncludeLibs
>
<IncludeLibsPath
></IncludeLibsPath
>
<Misc>
--keep *.o(
FSymTab) --keep *.o(VSymTab)
</Misc>
<LinkerInputFile
></LinkerInputFile
>
<DisabledWarnings
></DisabledWarnings
>
<pXoBase
/
>
<ScatterFile>
.\
drivers\linker_scripts\link
.sct
</ScatterFile>
<IncludeLibs
/
>
<IncludeLibsPath
/
>
<Misc>
--keep *.o(
.rti_fn.*) --keep *.o(FSymTab)
</Misc>
<LinkerInputFile
/
>
<DisabledWarnings
/
>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>
Applications
</GroupName>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
application
.c
</FileName>
<FileName>
clock
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\application
.c
</FilePath>
<FilePath>
..\..\src\clock
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
board
.c
</FileName>
<FileName>
components
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\board
.c
</FilePath>
<FilePath>
..\..\src\components
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
c
anapp
.c
</FileName>
<FileName>
c
pu
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\canapp
.c
</FilePath>
<FilePath>
..\..\src\cpu
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
sram
.c
</FileName>
<FileName>
device
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\sram
.c
</FilePath>
<FilePath>
..\..\src\device
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
startup
.c
</FileName>
<FileName>
idle
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\startup.c
</FilePath>
<FilePath>
..\..\src\idle.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ipc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\ipc.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_hwtimer
.c
</FileName>
<FileName>
irq
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_hwtimer
.c
</FilePath>
<FilePath>
..\..\src\irq
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_led
.c
</FileName>
<FileName>
kservice
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_led
.c
</FilePath>
<FilePath>
..\..\src\kservice
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_lpccan
.c
</FileName>
<FileName>
memheap
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_lpccan
.c
</FilePath>
<FilePath>
..\..\src\memheap
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
mempool.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\mempool.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
object.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\object.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
scheduler.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\scheduler.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
signal.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\signal.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
thread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\thread.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\timer.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Applications
</GroupName>
<Files>
<File>
<FileName>
main.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
applications\main.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_sdram
.c
</FileName>
<FileName>
board
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\
drv_sdram
.c
</FilePath>
<FilePath>
drivers\
board
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -444,136 +517,190 @@
<FileType>
1
</FileType>
<FilePath>
Libraries\Device\NXP\LPC407x_8x_177x_8x\Source\Templates\system_LPC407x_8x_177x_8x.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
startup_LPC407x_8x_177x_8x.s
</FileName>
<FileType>
2
</FileType>
<FilePath>
Libraries\Device\NXP\LPC407x_8x_177x_8x\Source\Templates\ARM\startup_LPC407x_8x_177x_8x.s
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_adc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_adc.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_bod.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_bod.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_can.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_can.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_clkpwr.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_clkpwr.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_crc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_crc.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_dac.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_dac.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_eeprom.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_eeprom.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_emc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_emc.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_exti.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_exti.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_gpdma.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_gpdma.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_gpio.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_i2c.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_i2c.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_i2s.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_i2s.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_iap.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_iap.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_lcd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_lcd.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_mcpwm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_mcpwm.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_nvic.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_nvic.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_pinsel.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_pinsel.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_pwm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_pwm.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_qei.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_qei.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_rtc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_rtc.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_ssp.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_ssp.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_systick.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_systick.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_timer.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
Libraries\Drivers\source\lpc_uart.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
lpc_wwdt.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -582,108 +709,41 @@
</Files>
</Group>
<Group>
<GroupName>
Kernel
</GroupName>
<GroupName>
cpu
</GroupName>
<Files>
<File>
<FileName>
clock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\clock.c
</FilePath>
</File>
<File>
<FileName>
device.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\device.c
</FilePath>
</File>
<File>
<FileName>
idle.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\idle.c
</FilePath>
</File>
<File>
<FileName>
ipc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\ipc.c
</FilePath>
</File>
<File>
<FileName>
irq.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\irq.c
</FilePath>
</File>
<File>
<FileName>
kservice.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\kservice.c
</FilePath>
</File>
<File>
<FileName>
mem.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\mem.c
</FilePath>
</File>
<File>
<FileName>
memheap.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\memheap.c
</FilePath>
</File>
<File>
<FileName>
mempool.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\mempool.c
</FilePath>
</File>
<File>
<FileName>
object.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\object.c
</FilePath>
</File>
<File>
<FileName>
scheduler.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\scheduler.c
</FilePath>
</File>
<File>
<FileName>
signal.c
</FileName>
<FileName>
backtrace.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\
src\signal
.c
</FilePath>
<FilePath>
..\..\
libcpu\arm\common\backtrace
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
thread
.c
</FileName>
<FileName>
div0
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\
src\thread
.c
</FilePath>
<FilePath>
..\..\
libcpu\arm\common\div0
.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
timer
.c
</FileName>
<FileName>
showmem
.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\
src\timer
.c
</FilePath>
<FilePath>
..\..\
libcpu\arm\common\showmem
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
CORTEX-M4
</GroupName>
<Files>
<File>
<FileName>
cpuport.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\libcpu\arm\cortex-m4\cpuport.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
context_rvds.S
</FileName>
<FileType>
2
</FileType>
<FilePath>
..\..\libcpu\arm\cortex-m4\context_rvds.S
</FilePath>
</File>
<File>
<FileName>
backtrace.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\libcpu\arm\common\backtrace.c
</FilePath>
</File>
<File>
<FileName>
div0.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\libcpu\arm\common\div0.c
</FilePath>
</File>
<File>
<FileName>
showmem.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\libcpu\arm\common\showmem.c
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
@@ -694,41 +754,43 @@
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\dfs.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dfs_file.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\dfs_file.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dfs_fs.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\dfs_fs.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dfs_posix.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\dfs_posix.c
</FilePath>
</File>
<File>
<FileName>
poll.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\poll.c
</FilePath>
</File>
<File>
<FileName>
select.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\src\select.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
devfs.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\filesystems\devfs\devfs.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dfs_elm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\dfs\filesystems\elmfat\dfs_elm.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ff.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -739,46 +801,62 @@
<Group>
<GroupName>
DeviceDrivers
</GroupName>
<Files>
<File>
<FileName>
can.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\can\can.c
</FilePath>
</File>
<File>
<FileName>
pin.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\misc\pin.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
serial.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\serial\serial.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
completion.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\completion.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
dataqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\dataqueue.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
pipe.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\pipe.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ringblk_buf.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\ringblk_buf.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
ringbuffer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\ringbuffer.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
waitqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\drivers\src\waitqueue.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
workqueue.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -794,198 +872,49 @@
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\shell.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
symbol.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\symbol.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
cmd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\cmd.c
</FilePath>
</File>
</Files>
<Files>
<File>
<FileName>
msh.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\msh.c
</FilePath>
</File>
<File>
<FileName>
msh_cmd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\msh_cmd.c
</FilePath>
</File>
<File>
<FileName>
msh_file.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\msh_file.c
</FilePath>
</File>
<File>
<FileName>
finsh_compiler.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_compiler.c
</FilePath>
</File>
<File>
<FileName>
finsh_error.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_error.c
</FilePath>
</File>
<File>
<FileName>
finsh_heap.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_heap.c
</FilePath>
</File>
<File>
<FileName>
finsh_init.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_init.c
</FilePath>
</File>
<File>
<FileName>
finsh_node.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_node.c
</FilePath>
</File>
<File>
<FileName>
finsh_ops.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_ops.c
</FilePath>
</File>
<File>
<FileName>
finsh_parser.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_parser.c
</FilePath>
</File>
<File>
<FileName>
finsh_var.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_var.c
</FilePath>
</File>
<File>
<FileName>
finsh_vm.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_vm.c
</FilePath>
</File>
<File>
<FileName>
finsh_token.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\finsh\finsh_token.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
libc
</GroupName>
<Files>
<File>
<FileName>
libc.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\libc.c
</FilePath>
</File>
<File>
<FileName>
mem_std.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\mem_std.c
</FilePath>
</File>
<File>
<FileName>
stdio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\stdio.c
</FilePath>
</File>
<File>
<FileName>
stubs.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\stubs.c
</FilePath>
</File>
<File>
<FileName>
time.c
</FileName>
<FileName>
msh_cmd.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\
libc\compilers\armlibc\time
.c
</FilePath>
<FilePath>
..\..\components\
finsh\msh_cmd
.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
pthreads
</GroupName>
<Files>
<File>
<FileName>
mqueue.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\mqueue.c
</FilePath>
</File>
<File>
<FileName>
pthread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread.c
</FilePath>
</File>
<File>
<FileName>
pthread_attr.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_attr.c
</FilePath>
</File>
<File>
<FileName>
pthread_barrier.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_barrier.c
</FilePath>
</File>
<File>
<FileName>
pthread_cond.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_cond.c
</FilePath>
</File>
<File>
<FileName>
pthread_mutex.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_mutex.c
</FilePath>
</File>
<File>
<FileName>
pthread_rwlock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_rwlock.c
</FilePath>
</File>
<File>
<FileName>
pthread_spin.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_spin.c
</FilePath>
</File>
<File>
<FileName>
pthread_tls.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\pthread_tls.c
</FilePath>
</File>
<File>
<FileName>
sched.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\sched.c
</FilePath>
</File>
<File>
<FileName>
semaphore.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\pthreads\semaphore.c
</FilePath>
</File>
<File>
<FileName>
clock_time.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\time\clock_time.c
</FilePath>
</File>
<File>
<FileName>
posix_sleep.c
</FileName>
<FileName>
msh_file.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\
libc\time\posix_sleep
.c
</FilePath>
<FilePath>
..\..\components\
finsh\msh_file
.c
</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<components>
<component
Cclass=
"CMSIS"
Cgroup=
"CORE"
Cvendor=
"ARM"
Cversion=
"5.0.2"
condition=
"ARMv6_7_8-M Device"
>
<package
name=
"CMSIS"
schemaVersion=
"1.3"
url=
"http://www.keil.com/pack/"
vendor=
"ARM"
version=
"5.1.0"
/>
<targetInfos>
<targetInfo
name=
"RT-Thread IMXRT1052"
/>
</targetInfos>
</component>
</components>
<files/>
<apis
/>
<components
/>
<files
/>
</RTE>
</Project>
bsp/lpc408x/rtconfig.h
浏览文件 @
01671090
...
...
@@ -8,19 +8,16 @@
#define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 4
/* RT_THREAD_PRIORITY_8 is not set */
#define RT_THREAD_PRIORITY_32
/* RT_THREAD_PRIORITY_256 is not set */
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 100
#define RT_DEBUG
#define RT_DEBUG_COLOR
#define RT_TICK_PER_SECOND 1000
#define RT_USING_OVERFLOW_CHECK
#define RT_DEBUG_INIT 0
#define RT_DEBUG_THREAD 0
#define RT_USING_HOOK
#define IDLE_THREAD_STACK_SIZE 512
/* RT_USING_TIMER_SOFT is not set */
#define RT_USING_IDLE_HOOK
#define RT_IDEL_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 256
#define RT_DEBUG
#define RT_DEBUG_COLOR
/* Inter-Thread communication */
...
...
@@ -29,38 +26,34 @@
#define RT_USING_EVENT
#define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE
/* RT_USING_SIGNALS is not set */
/* Memory Management */
#define RT_USING_MEMPOOL
#define RT_USING_MEMHEAP
/* RT_USING_NOHEAP is not set */
#define RT_USING_SMALL_MEM
/* RT_USING_SLAB is not set */
/* RT_USING_MEMHEAP_AS_HEAP is not set */
/* RT_USING_MEMTRACE is not set */
#define RT_USING_MEMHEAP_AS_HEAP
#define RT_USING_HEAP
/* Kernel Device Object */
#define RT_USING_DEVICE
/* RT_USING_INTERRUPT_INFO is not set */
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart0"
/* RT_USING_MODULE is not set */
#define RT_VER_NUM 0x40001
#define ARCH_ARM
#define ARCH_ARM_CORTEX_M
#define ARCH_ARM_CORTEX_M4
/* RT-Thread Components */
/* RT_USING_COMPONENTS_INIT is not set */
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
#define RT_MAIN_THREAD_STACK_SIZE 2048
#define RT_MAIN_THREAD_PRIORITY 10
/* C++ features */
/* RT_USING_CPLUSPLUS is not set */
/* Command shell */
...
...
@@ -73,10 +66,10 @@
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 4096
#define FINSH_CMD_SIZE 80
/* FINSH_USING_AUTH is not set */
#define FINSH_USING_MSH
#define FINSH_USING_MSH_DEFAULT
/* FINSH_USING_MSH_ONLY is not set */
#define FINSH_USING_MSH_ONLY
#define FINSH_ARG_MAX 10
/* Device virtual file system */
...
...
@@ -92,152 +85,108 @@
#define RT_DFS_ELM_CODE_PAGE 936
#define RT_DFS_ELM_WORD_ACCESS
#define RT_DFS_ELM_USE_LFN_0
/* RT_DFS_ELM_USE_LFN_1 is not set */
/* RT_DFS_ELM_USE_LFN_2 is not set */
/* RT_DFS_ELM_USE_LFN_3 is not set */
#define RT_DFS_ELM_USE_LFN 0
#define RT_DFS_ELM_MAX_LFN 255
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
/* RT_DFS_ELM_USE_ERASE is not set */
#define RT_DFS_ELM_REENTRANT
#define RT_USING_DFS_DEVFS
/* RT_USING_DFS_NET is not set */
/* RT_USING_DFS_ROMFS is not set */
/* RT_USING_DFS_RAMFS is not set */
/* RT_USING_DFS_UFFS is not set */
/* RT_USING_DFS_JFFS2 is not set */
/* RT_USING_DFS_NFS is not set */
/* Device Drivers */
#define RT_USING_DEVICE_IPC
#define RT_PIPE_BUFSZ 512
#define RT_USING_SERIAL
#define RT_SERIAL_USING_DMA
#define RT_USING_CAN
/* RT_USING_HWTIMER is not set */
/* RT_USING_CPUTIME is not set */
/* RT_USING_I2C is not set */
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
/* RT_USING_MTD_NOR is not set */
/* RT_USING_MTD_NAND is not set */
/* RT_USING_RTC is not set */
/* RT_USING_SDIO is not set */
/* RT_USING_SPI is not set */
/* RT_USING_WDT is not set */
/* RT_USING_WIFI is not set */
/* Using WiFi */
/* Using USB */
/* RT_USING_USB_HOST is not set */
/* RT_USING_USB_DEVICE is not set */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_USING_PTHREADS
#define RT_USING_POSIX
/* RT_USING_POSIX_MMAP is not set */
/* RT_USING_POSIX_TERMIOS is not set */
/* RT_USING_POSIX_AIO is not set */
/* HAVE_SYS_SIGNALS is not set */
/* Network stack */
/* Network */
/* Socket abstraction layer */
/* light weight TCP/IP stack */
/* RT_USING_LWIP is not set */
/* Modbus master and slave stack */
/* RT_USING_MODBUS is not set */
/* AT commands */
/* VBUS(Virtual Software BUS) */
/* RT_USING_VBUS is not set */
/* Utilities */
/* RT_USING_LOGTRACE is not set */
/* RT_USING_RYM is not set */
/* ARM CMSIS */
/* RT_USING_CMSIS_OS is not set */
/* RT_USING_RTT_CMSIS is not set */
/* RT-Thread online packages */
/* system packages */
/* RT-Thread GUI Engine */
/* PKG_USING_GUIENGINE is not set */
/* PKG_USING_PERSIMMON is not set */
/* PKG_USING_LWEXT4 is not set */
/* PKG_USING_PARTITION is not set */
/* PKG_USING_SQLITE is not set */
/* PKG_USING_RTI is not set */
/* IoT - internet of things */
/* PKG_USING_PAHOMQTT is not set */
/* PKG_USING_WEBCLIENT is not set */
/* PKG_USING_MONGOOSE is not set */
/* PKG_USING_WEBTERMINAL is not set */
/* PKG_USING_CJSON is not set */
/* PKG_USING_LJSON is not set */
/* PKG_USING_EZXML is not set */
/* PKG_USING_NANOPB is not set */
/* PKG_USING_GAGENT_CLOUD is not set */
/* Wi-Fi */
/* Marvell WiFi */
/* PKG_USING_WLANMARVELL is not set */
/* Wiced WiFi */
/* PKG_USING_WLAN_WICED is not set */
/* PKG_USING_COAP is not set */
/* PKG_USING_NOPOLL is not set */
/* PKG_USING_NETUTILS is not set */
/* IoT Cloud */
/* security packages */
/* PKG_USING_MBEDTLS is not set */
/* PKG_USING_libsodium is not set */
/* PKG_USING_TINYCRYPT is not set */
/* language packages */
/* PKG_USING_JERRYSCRIPT is not set */
/* PKG_USING_MICROPYTHON is not set */
/* multimedia packages */
/* PKG_USING_OPENMV is not set */
/* tools packages */
/* PKG_USING_CMBACKTRACE is not set */
/* PKG_USING_EASYLOGGER is not set */
/* PKG_USING_SYSTEMVIEW is not set */
/* PKG_USING_IPERF is not set */
/* system packages */
/* peripheral libraries and drivers */
/* miscellaneous packages */
/* PKG_USING_FASTLZ is not set */
/* PKG_USING_MINILZO is not set */
/* PKG_USING_QUICKLZ is not set */
/*
example package: hello
*/
/*
samples: kernel and components samples
*/
/* PKG_USING_HELLO is not set */
/* PKG_USING_MULTIBUTTON is not set */
#define SOC_LPC4088
/* RT_USING_UART0 is not set */
#define RT_USING_UART1
/* Hardware Drivers Config */
/* On-chip Peripheral Drivers */
/* UART Drivers */
#define BSP_USING_UART0
/* Onboard Peripheral Drivers */
/* Offboard Peripheral Drivers */
#endif
bsp/lpc408x/rtconfig.py
浏览文件 @
01671090
...
...
@@ -4,14 +4,13 @@ import os
ARCH
=
'arm'
CPU
=
'cortex-m4'
CROSS_TOOL
=
'keil'
BOARD_NAME
=
'lpc408x'
if
os
.
getenv
(
'RTT_CC'
):
CROSS_TOOL
=
os
.
getenv
(
'RTT_CC'
)
if
CROSS_TOOL
==
'gcc'
:
PLATFORM
=
'gcc'
EXEC_PATH
=
r
'D:/
Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin
'
EXEC_PATH
=
r
'D:/
xxx
'
elif
CROSS_TOOL
==
'keil'
:
PLATFORM
=
'armcc'
EXEC_PATH
=
'D:/Keil'
...
...
@@ -33,17 +32,18 @@ if PLATFORM == 'gcc':
CXX
=
PREFIX
+
'g++'
AS
=
PREFIX
+
'gcc'
AR
=
PREFIX
+
'ar'
LINK
=
PREFIX
+
'g
++
'
LINK
=
PREFIX
+
'g
cc
'
TARGET_EXT
=
'elf'
SIZE
=
PREFIX
+
'size'
OBJDUMP
=
PREFIX
+
'objdump'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=
cortex-m4 -mthumb
'
DEVICE
=
' -mcpu=
'
+
CPU
+
' -mthumb
'
CFLAGS
=
DEVICE
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread-'
+
BOARD_NAME
+
'.map,-cref,-u,Reset_Handler -T rtthread-'
+
BOARD_NAME
+
'.ld'
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T drivers/linker_scripts/link.lds'
CXXFLAGS
=
CFLAGS
CPATH
=
''
LPATH
=
''
...
...
@@ -53,8 +53,6 @@ if PLATFORM == 'gcc':
else
:
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
...
...
@@ -66,17 +64,16 @@ elif PLATFORM == 'armcc':
LINK
=
'armlink'
TARGET_EXT
=
'axf'
DEVICE
=
' --cpu Cortex-M4.fp'
CFLAGS
=
DEVICE
+
' --apcs=interwork'
AFLAGS
=
DEVICE
LFLAGS
=
DEVICE
+
' --info sizes --info totals --info unused --info veneers --list rtthread_'
+
\
BOARD_NAME
+
'.map --scatter rtthread-'
+
BOARD_NAME
+
'.sct'
DEVICE
=
' --cpu '
+
CPU
+
'.fp '
CFLAGS
=
'-c '
+
DEVICE
+
' --apcs=interwork'
AFLAGS
=
DEVICE
+
' --apcs=interwork '
LFLAGS
=
DEVICE
+
' --scatter "drivers/linker_scripts/link.sct" --info sizes --info totals --info unused --info veneers --list rtthread.map --strict'
CFLAGS
+=
' -I'
+
EXEC_PATH
+
'/ARM/
RV31
/INC'
LFLAGS
+=
' --libpath '
+
EXEC_PATH
+
'/ARM/
RV31
/LIB'
CFLAGS
+=
' -I'
+
EXEC_PATH
+
'/ARM/
ARMCC
/INC'
LFLAGS
+=
' --libpath '
+
EXEC_PATH
+
'/ARM/
ARMCC
/LIB'
CXXFLAGS
=
CFLAGS
EXEC_PATH
+=
'/arm/
bin40
/'
EXEC_PATH
+=
'/arm/
armcc/bin
/'
if
BUILD
==
'debug'
:
CFLAGS
+=
' -g -O0'
...
...
bsp/lpc408x/template.uvopt
浏览文件 @
01671090
...
...
@@ -21,7 +21,7 @@
</DaveTm>
<Target>
<TargetName>
RT-Thread LPC408x
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
...
...
@@ -43,7 +43,7 @@
<PageWidth>
79
</PageWidth>
<PageLength>
66
</PageLength>
<TabStop>
8
</TabStop>
<ListingPath>
.\build\
</ListingPath>
<ListingPath>
.\build\
keil\List\
</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>
1
</CreateCListing>
...
...
@@ -75,17 +75,7 @@
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
<CpuCode>
0
</CpuCode>
<DllOpt>
<SimDllName>
SARMCM3.DLL
</SimDllName>
<SimDllArguments>
-MPU
</SimDllArguments>
<SimDlgDllName>
DCM.DLL
</SimDlgDllName>
<SimDlgDllArguments>
-pCM4
</SimDlgDllArguments>
<TargetDllName>
SARMCM3.DLL
</TargetDllName>
<TargetDllArguments>
-MPU
</TargetDllArguments>
<TargetDlgDllName>
TCM.DLL
</TargetDlgDllName>
<TargetDlgDllArguments>
-pCM4
</TargetDlgDllArguments>
</DllOpt>
<CpuCode>
8
</CpuCode>
<DebugOpt>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
...
...
@@ -97,16 +87,19 @@
<sRfunc>
1
</sRfunc>
<sRbox>
1
</sRbox>
<tLdApp>
1
</tLdApp>
<tGomain>
0
</tGomain>
<tGomain>
1
</tGomain>
<tRbreak>
1
</tRbreak>
<tRwatch>
1
</tRwatch>
<tRmem>
1
</tRmem>
<tRfunc>
0
</tRfunc>
<tRbox>
1
</tRbox>
<tRtrace>
0
</tRtrace>
<sRSysVw>
1
</sRSysVw>
<tRSysVw>
1
</tRSysVw>
<tPdscDbg>
0
</tPdscDbg>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<nTsel>
7
</nTsel>
<nTsel>
6
</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
...
...
@@ -123,7 +116,12 @@
<SetRegEntry>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Name>
-U4294967295 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO11 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000
</Name>
<Name>
-U30000299 -O4303 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000
</Name>
</SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
UL2CM3
</Key>
<Name>
UL2CM3(-O4303 -S0 -C0 -FO7 -FD10000000 -FC800 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000)
</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
...
...
bsp/lpc408x/template.uvoptx
0 → 100644
浏览文件 @
01671090
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"project_optx.xsd"
>
<SchemaVersion>
1.0
</SchemaVersion>
<Header>
### uVision Project, (C) Keil Software
</Header>
<Extensions>
<cExt>
*.c
</cExt>
<aExt>
*.s*; *.src; *.a*
</aExt>
<oExt>
*.obj; *.o
</oExt>
<lExt>
*.lib
</lExt>
<tExt>
*.txt; *.h; *.inc
</tExt>
<pExt>
*.plm
</pExt>
<CppX>
*.cpp
</CppX>
<nMigrate>
0
</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>
0
</dwLowDateTime>
<dwHighDateTime>
0
</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
<CLKADS>
12000000
</CLKADS>
<OPTTT>
<gFlags>
1
</gFlags>
<BeepAtEnd>
1
</BeepAtEnd>
<RunSim>
0
</RunSim>
<RunTarget>
1
</RunTarget>
<RunAbUc>
0
</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>
1
</HexSelection>
<FlashByte>
65535
</FlashByte>
<HexRangeLowAddress>
0
</HexRangeLowAddress>
<HexRangeHighAddress>
0
</HexRangeHighAddress>
<HexOffset>
0
</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>
79
</PageWidth>
<PageLength>
66
</PageLength>
<TabStop>
8
</TabStop>
<ListingPath>
.\build\keil\List\
</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>
1
</CreateCListing>
<CreateAListing>
1
</CreateAListing>
<CreateLListing>
1
</CreateLListing>
<CreateIListing>
0
</CreateIListing>
<AsmCond>
1
</AsmCond>
<AsmSymb>
1
</AsmSymb>
<AsmXref>
0
</AsmXref>
<CCond>
1
</CCond>
<CCode>
0
</CCode>
<CListInc>
0
</CListInc>
<CSymb>
0
</CSymb>
<LinkerCodeListing>
0
</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>
1
</LMap>
<LComments>
1
</LComments>
<LGenerateSymbols>
1
</LGenerateSymbols>
<LLibSym>
1
</LLibSym>
<LLines>
1
</LLines>
<LLocSym>
1
</LLocSym>
<LPubSym>
1
</LPubSym>
<LXref>
0
</LXref>
<LExpSel>
0
</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>
0
</tvExp>
<tvExpOptDlg>
0
</tvExpOptDlg>
<IsCurrentTarget>
1
</IsCurrentTarget>
</OPTFL>
<CpuCode>
8
</CpuCode>
<DebugOpt>
<uSim>
0
</uSim>
<uTrg>
1
</uTrg>
<sLdApp>
1
</sLdApp>
<sGomain>
1
</sGomain>
<sRbreak>
1
</sRbreak>
<sRwatch>
1
</sRwatch>
<sRmem>
1
</sRmem>
<sRfunc>
1
</sRfunc>
<sRbox>
1
</sRbox>
<tLdApp>
1
</tLdApp>
<tGomain>
1
</tGomain>
<tRbreak>
1
</tRbreak>
<tRwatch>
1
</tRwatch>
<tRmem>
1
</tRmem>
<tRfunc>
0
</tRfunc>
<tRbox>
1
</tRbox>
<tRtrace>
1
</tRtrace>
<sRSysVw>
1
</sRSysVw>
<tRSysVw>
1
</tRSysVw>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<bEvRecOn>
1
</bEvRecOn>
<bSchkAxf>
0
</bSchkAxf>
<bTchkAxf>
0
</bTchkAxf>
<nTsel>
4
</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>
Segger\JL2CM3.dll
</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
JL2CM3
</Key>
<Name>
-U30000299 -O14 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight JTAG-DP") -D00(4BA00477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FCFE0 -FN1 -FF0LPC_IAP_512.FLM -FS00 -FL080000 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
</Name>
</SetRegEntry>
<SetRegEntry>
<Number>
0
</Number>
<Key>
UL2CM3
</Key>
<Name>
UL2CM3(-S0 -C0 -P0 -FN1 -FCFE0 -FD10000000 -FF0LPC_IAP_512 -FL080000 -FS00 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>
0
</THDelay>
</Tracepoint>
<DebugFlag>
<trace>
0
</trace>
<periodic>
0
</periodic>
<aLwin>
0
</aLwin>
<aCover>
0
</aCover>
<aSer1>
0
</aSer1>
<aSer2>
0
</aSer2>
<aPa>
0
</aPa>
<viewmode>
0
</viewmode>
<vrSel>
0
</vrSel>
<aSym>
0
</aSym>
<aTbox>
0
</aTbox>
<AscS1>
0
</AscS1>
<AscS2>
0
</AscS2>
<AscS3>
0
</AscS3>
<aSer3>
0
</aSer3>
<eProf>
0
</eProf>
<aLa>
0
</aLa>
<aPa1>
0
</aPa1>
<AscS4>
0
</AscS4>
<aSer4>
0
</aSer4>
<StkLoc>
0
</StkLoc>
<TrcWin>
0
</TrcWin>
<newCpu>
0
</newCpu>
<uProt>
0
</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>
0
</bLintAuto>
<bAutoGenD>
0
</bAutoGenD>
<LntExFlags>
0
</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</Target>
</ProjectOpt>
bsp/lpc408x/template.uvproj
浏览文件 @
01671090
...
...
@@ -7,7 +7,7 @@
<Targets>
<Target>
<TargetName>
RT-Thread LPC408x
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<TargetOption>
...
...
@@ -30,6 +30,7 @@
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>
SFD\NXP\LPC407x_8x_177x_8x\LPC408x_7x.SFR
</SFDFile>
<bCustSvd>
0
</bCustSvd>
<UseEnv>
0
</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
...
...
@@ -43,21 +44,21 @@
<NotGenerated>
0
</NotGenerated>
<InvalidFlash>
1
</InvalidFlash>
</TargetStatus>
<OutputDirectory>
.\build\
</OutputDirectory>
<OutputName>
rtthread
-lpc
</OutputName>
<OutputDirectory>
.\build\
keil\Obj\
</OutputDirectory>
<OutputName>
rtthread
</OutputName>
<CreateExecutable>
1
</CreateExecutable>
<CreateLib>
0
</CreateLib>
<CreateHexFile>
0
</CreateHexFile>
<DebugInformation>
1
</DebugInformation>
<BrowseInformation>
1
</BrowseInformation>
<ListingPath>
.\build\
</ListingPath>
<BrowseInformation>
0
</BrowseInformation>
<ListingPath>
.\build\
keil\List\
</ListingPath>
<HexFormatSelection>
1
</HexFormatSelection>
<Merge32K>
0
</Merge32K>
<CreateBatchFile>
0
</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>
0
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg1Name>
fromelf --bin !L --output rtthread.bin
</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
...
...
@@ -97,6 +98,7 @@
<StopOnExitCode>
3
</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>
1
</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName>
SARMCM3.DLL
</SimDllName>
...
...
@@ -126,20 +128,23 @@
<RestoreFunctions>
1
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<LimitSpeedToRealTime>
0
</LimitSpeedToRealTime>
<RestoreSysVw>
1
</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>
1
</UseTarget>
<LoadApplicationAtStartup>
1
</LoadApplicationAtStartup>
<RunToMain>
0
</RunToMain>
<RunToMain>
1
</RunToMain>
<RestoreBreakpoints>
1
</RestoreBreakpoints>
<RestoreWatchpoints>
1
</RestoreWatchpoints>
<RestoreMemoryDisplay>
1
</RestoreMemoryDisplay>
<RestoreFunctions>
0
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<RestoreTracepoints>
0
</RestoreTracepoints>
<RestoreSysVw>
1
</RestoreSysVw>
<UsePdscDebugDescription>
0
</UsePdscDebugDescription>
</Target>
<RunDebugAfterBuild>
0
</RunDebugAfterBuild>
<TargetSelection>
7
</TargetSelection>
<TargetSelection>
6
</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
...
...
@@ -161,14 +166,18 @@
<UseTargetDll>
1
</UseTargetDll>
<UseExternalTool>
0
</UseExternalTool>
<RunIndependent>
0
</RunIndependent>
<UpdateFlashBeforeDebugging>
0
</UpdateFlashBeforeDebugging>
<UpdateFlashBeforeDebugging>
1
</UpdateFlashBeforeDebugging>
<Capability>
1
</Capability>
<DriverSelection>
4099
</DriverSelection>
</Flash1>
<bUseTDR>
0
</bUseTDR>
<bUseTDR>
1
</bUseTDR>
<Flash2>
Segger\JL2CM3.dll
</Flash2>
<Flash3>
"" ()
</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>
0
</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
...
...
@@ -347,6 +356,8 @@
<wLevel>
0
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
...
...
@@ -363,6 +374,7 @@
<SwStkChk>
0
</SwStkChk>
<NoWarn>
0
</NoWarn>
<uSurpInc>
0
</uSurpInc>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
...
...
@@ -379,6 +391,7 @@
<useFile>
0
</useFile>
<TextAddressRange>
0x00000000
</TextAddressRange>
<DataAddressRange>
0x10000000
</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
...
...
bsp/lpc408x/template.uvprojx
浏览文件 @
01671090
...
...
@@ -7,22 +7,23 @@
<Targets>
<Target>
<TargetName>
RT-Thread LPC408X
</TargetName>
<TargetName>
rtthread
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<pCCUsed>
5060528::V5.06 update 5 (build 528)::ARMCC
</pCCUsed>
<uAC6>
0
</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>
ARMCM4
</Device>
<Vendor>
ARM
</Vendor>
<PackID>
ARM.CMSIS.5.0
.0
</PackID>
<Device>
LPC4088FET208
</Device>
<Vendor>
NXP
</Vendor>
<PackID>
Keil.LPC4000_DFP.2.1
.0
</PackID>
<PackURL>
http://www.keil.com/pack/
</PackURL>
<Cpu>
IRAM(0x
20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M4") CLOCK(12000000) ESEL
ELITTLE
</Cpu>
<Cpu>
IRAM(0x
10000000,0x10000) IRAM2(0x20000000,0x8000) IROM(0x00000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000)
ELITTLE
</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD
20000000 -FC1000
)
</FlashDriverDll>
<FlashDriverDll>
UL2CM3(-S0 -C0 -P0 -FD
10000000 -FCFE0 -FN1 -FF0LPC_IAP_512 -FS00 -FL080000 -FP0($$Device:LPC4088FET208$Flash\LPC_IAP_512.FLM)
)
</FlashDriverDll>
<DeviceId>
0
</DeviceId>
<RegisterFile>
$$Device:
ARMCM4$Device\ARM\ARMCM4\Include\ARMCM4
.h
</RegisterFile>
<RegisterFile>
$$Device:
LPC4088FET208$Device\Include\LPC407x_8x_177x_8x
.h
</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
...
...
@@ -32,7 +33,7 @@
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>
$$Device:
ARMCM4$Device\ARM\SVD\ARMCM4
.svd
</SFDFile>
<SFDFile>
$$Device:
LPC4088FET208$SVD\LPC408x_7x
.svd
</SFDFile>
<bCustSvd>
0
</bCustSvd>
<UseEnv>
0
</UseEnv>
<BinPath></BinPath>
...
...
@@ -47,14 +48,14 @@
<NotGenerated>
0
</NotGenerated>
<InvalidFlash>
1
</InvalidFlash>
</TargetStatus>
<OutputDirectory>
.\build\
</OutputDirectory>
<OutputDirectory>
.\build\
keil\Obj\
</OutputDirectory>
<OutputName>
rtthread
</OutputName>
<CreateExecutable>
1
</CreateExecutable>
<CreateLib>
0
</CreateLib>
<CreateHexFile>
0
</CreateHexFile>
<DebugInformation>
1
</DebugInformation>
<BrowseInformation>
0
</BrowseInformation>
<ListingPath>
.\build\
</ListingPath>
<ListingPath>
.\build\
keil\List\
</ListingPath>
<HexFormatSelection>
1
</HexFormatSelection>
<Merge32K>
0
</Merge32K>
<CreateBatchFile>
0
</CreateBatchFile>
...
...
@@ -81,7 +82,7 @@
<AfterMake>
<RunUserProg1>
1
</RunUserProg1>
<RunUserProg2>
0
</RunUserProg2>
<UserProg1Name>
fromelf --bin !L --output rtthread
-mdk
.bin
</UserProg1Name>
<UserProg1Name>
fromelf --bin !L --output rtthread.bin
</UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>
0
</UserProg1Dos16Mode>
<UserProg2Dos16Mode>
0
</UserProg2Dos16Mode>
...
...
@@ -182,16 +183,16 @@
<hadIRAM>
1
</hadIRAM>
<hadXRAM>
0
</hadXRAM>
<uocXRam>
0
</uocXRam>
<RvdsVP>
0
</RvdsVP>
<hadIRAM2>
0
</hadIRAM2>
<RvdsVP>
2
</RvdsVP>
<hadIRAM2>
1
</hadIRAM2>
<hadIROM2>
0
</hadIROM2>
<StupSel>
8
</StupSel>
<useUlib>
0
</useUlib>
<EndSel>
1
</EndSel>
<EndSel>
0
</EndSel>
<uLtcg>
0
</uLtcg>
<nSecure>
0
</nSecure>
<RoSelD>
3
</RoSelD>
<RwSelD>
3
</RwSelD>
<RwSelD>
4
</RwSelD>
<CodeSel>
0
</CodeSel>
<OptFeed>
0
</OptFeed>
<NoZi1>
0
</NoZi1>
...
...
@@ -208,7 +209,7 @@
<Ra2Chk>
0
</Ra2Chk>
<Ra3Chk>
0
</Ra3Chk>
<Im1Chk>
1
</Im1Chk>
<Im2Chk>
0
</Im2Chk>
<Im2Chk>
1
</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>
0
</Type>
...
...
@@ -242,13 +243,13 @@
</Ocm6>
<IRAM>
<Type>
0
</Type>
<StartAddress>
0x
2
0000000
</StartAddress>
<Size>
0x
2
0000
</Size>
<StartAddress>
0x
1
0000000
</StartAddress>
<Size>
0x
1
0000
</Size>
</IRAM>
<IROM>
<Type>
1
</Type>
<StartAddress>
0x0
</StartAddress>
<Size>
0x
4
0000
</Size>
<Size>
0x
8
0000
</Size>
</IROM>
<XRAM>
<Type>
0
</Type>
...
...
@@ -302,8 +303,8 @@
</OCR_RVCT9>
<OCR_RVCT10>
<Type>
0
</Type>
<StartAddress>
0x0
</StartAddress>
<Size>
0x0
</Size>
<StartAddress>
0x
2000000
0
</StartAddress>
<Size>
0x
800
0
</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
...
...
@@ -366,7 +367,7 @@
<TextAddressRange>
0x00000000
</TextAddressRange>
<DataAddressRange>
0x10000000
</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>
.\
rtthread-lpc408x
.sct
</ScatterFile>
<ScatterFile>
.\
drivers\linker_scripts\link
.sct
</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
...
...
@@ -380,14 +381,7 @@
<RTE>
<apis/>
<components>
<component
Cclass=
"CMSIS"
Cgroup=
"CORE"
Cvendor=
"ARM"
Cversion=
"5.0.2"
condition=
"ARMv6_7_8-M Device"
>
<package
name=
"CMSIS"
schemaVersion=
"1.3"
url=
"http://www.keil.com/pack/"
vendor=
"ARM"
version=
"5.1.0"
/>
<targetInfos>
<targetInfo
name=
"RT-Thread IMXRT1052"
/>
</targetInfos>
</component>
</components>
<components/>
<files/>
</RTE>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录