Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
红岛
rt-thread
提交
ce860582
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,发现更多精彩内容 >>
未验证
提交
ce860582
编写于
3月 05, 2021
作者:
mysterywolf
提交者:
GitHub
3月 05, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #24 from RT-Thread/master
pr
上级
034046c3
ea22af57
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
847 addition
and
603 deletion
+847
-603
bsp/maxim/MAX32660_EVSYS/rtconfig.py
bsp/maxim/MAX32660_EVSYS/rtconfig.py
+8
-0
bsp/maxim/tools/sdk_dist.py
bsp/maxim/tools/sdk_dist.py
+21
-0
bsp/smartfusion2/project.uvopt
bsp/smartfusion2/project.uvopt
+171
-171
bsp/smartfusion2/project.uvoptx
bsp/smartfusion2/project.uvoptx
+166
-166
bsp/smartfusion2/project.uvproj
bsp/smartfusion2/project.uvproj
+119
-119
bsp/smartfusion2/project.uvprojx
bsp/smartfusion2/project.uvprojx
+134
-118
bsp/smartfusion2/template.uvopt
bsp/smartfusion2/template.uvopt
+2
-2
bsp/smartfusion2/template.uvproj
bsp/smartfusion2/template.uvproj
+4
-4
bsp/smartfusion2/template.uvprojx
bsp/smartfusion2/template.uvprojx
+18
-2
components/finsh/msh_file.c
components/finsh/msh_file.c
+93
-13
components/libc/compilers/common/time.c
components/libc/compilers/common/time.c
+4
-7
include/rtdef.h
include/rtdef.h
+3
-0
src/memheap.c
src/memheap.c
+102
-1
tools/building.py
tools/building.py
+2
-0
未找到文件。
bsp/maxim/MAX32660_EVSYS/rtconfig.py
浏览文件 @
ce860582
...
...
@@ -133,3 +133,11 @@ elif PLATFORM == 'iar':
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
def
dist_handle
(
BSP_ROOT
,
dist_dir
):
import
sys
cwd_path
=
os
.
getcwd
()
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
BSP_ROOT
),
'tools'
))
from
sdk_dist
import
dist_do_building
dist_do_building
(
BSP_ROOT
,
dist_dir
)
\ No newline at end of file
bsp/maxim/tools/sdk_dist.py
0 → 100644
浏览文件 @
ce860582
import
os
import
sys
import
shutil
cwd_path
=
os
.
getcwd
()
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
cwd_path
),
'rt-thread'
,
'tools'
))
# BSP dist function
def
dist_do_building
(
BSP_ROOT
,
dist_dir
):
from
mkdist
import
bsp_copy_files
import
rtconfig
print
(
"=> copy maxim bsp library"
)
library_dir
=
os
.
path
.
join
(
dist_dir
,
'libraries'
)
library_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
BSP_ROOT
),
'libraries'
)
print
(
"=> copy bsp drivers"
)
bsp_copy_files
(
os
.
path
.
join
(
library_path
,
'HAL_Drivers'
),
os
.
path
.
join
(
library_dir
,
'HAL_Drivers'
))
bsp_copy_files
(
os
.
path
.
join
(
library_path
,
'MAX32660PeriphDriver'
),
os
.
path
.
join
(
library_dir
,
'MAX32660PeriphDriver'
))
\ No newline at end of file
bsp/smartfusion2/project.uvopt
浏览文件 @
ce860582
此差异已折叠。
点击以展开。
bsp/smartfusion2/project.uvoptx
浏览文件 @
ce860582
此差异已折叠。
点击以展开。
bsp/smartfusion2/project.uvproj
浏览文件 @
ce860582
...
...
@@ -139,9 +139,9 @@
<RestoreMemoryDisplay>
1
</RestoreMemoryDisplay>
<RestoreFunctions>
0
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<RestoreTracepoints>
1
</RestoreTracepoints>
<RestoreTracepoints>
0
</RestoreTracepoints>
<RestoreSysVw>
1
</RestoreSysVw>
<UsePdscDebugDescription>
0
</UsePdscDebugDescription>
<UsePdscDebugDescription>
1
</UsePdscDebugDescription>
</Target>
<RunDebugAfterBuild>
0
</RunDebugAfterBuild>
<TargetSelection>
6
</TargetSelection>
...
...
@@ -170,7 +170,7 @@
<Capability>
0
</Capability>
<DriverSelection>
-1
</DriverSelection>
</Flash1>
<bUseTDR>
1
</bUseTDR>
<bUseTDR>
0
</bUseTDR>
<Flash2>
BIN\UL2CM3.DLL
</Flash2>
<Flash3></Flash3>
<Flash4></Flash4>
...
...
@@ -356,13 +356,13 @@
<wLevel>
0
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<uC99>
1
</uC99>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls></MiscControls>
<Define>
RT_USING_ARM_LIBC
</Define>
<Define>
RT_USING_ARM_LIBC
, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND
</Define>
<Undefine></Undefine>
<IncludePath>
.;..\..\include;applications;board;CMSIS;drivers;libraries\sys_config;libraries\mss_gpio;libraries\mss_uart;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common
</IncludePath>
<IncludePath>
applications;board;CMSIS;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;drivers;..\..\components\finsh;.;..\..\include;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common;libraries\sys_config;libraries\mss_gpio;libraries\mss_uart
</IncludePath>
</VariousControls>
</Cads>
<Aads>
...
...
@@ -402,81 +402,6 @@
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
clock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\clock.c
</FilePath>
</File>
<File>
<FileName>
components.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\components.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>
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>
<FileType>
1
</FileType>
<FilePath>
..\..\src\signal.c
</FilePath>
</File>
<File>
<FileName>
thread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\thread.c
</FilePath>
</File>
<File>
<FileName>
timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\timer.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Applications
</GroupName>
<Files>
...
...
@@ -518,42 +443,7 @@
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_uart.c
</FilePath>
</File>
<File>
<FileName>
drv_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_gpio.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
sys_config.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\sys_config\sys_config.c
</FilePath>
</File>
<File>
<FileName>
mss_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_gpio\mss_gpio.c
</FilePath>
</File>
<File>
<FileName>
mss_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_uart\mss_uart.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
cpu
</GroupName>
<GroupName>
CPU
</GroupName>
<Files>
<File>
<FileName>
backtrace.c
</FileName>
...
...
@@ -632,6 +522,21 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_uart.c
</FilePath>
</File>
<File>
<FileName>
drv_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_gpio.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
finsh
</GroupName>
<Files>
...
...
@@ -652,6 +557,76 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
clock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\clock.c
</FilePath>
</File>
<File>
<FileName>
components.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\components.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>
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>
thread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\thread.c
</FilePath>
</File>
<File>
<FileName>
timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\timer.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
libc
</GroupName>
<Files>
...
...
@@ -666,9 +641,14 @@
<FilePath>
..\..\components\libc\compilers\armlibc\mem_std.c
</FilePath>
</File>
<File>
<FileName>
stubs.c
</FileName>
<FileName>
syscalls.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\syscalls.c
</FilePath>
</File>
<File>
<FileName>
stdlib.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\
armlibc\stubs
.c
</FilePath>
<FilePath>
..\..\components\libc\compilers\
common\stdlib
.c
</FilePath>
</File>
<File>
<FileName>
time.c
</FileName>
...
...
@@ -677,6 +657,26 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
sys_config.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\sys_config\sys_config.c
</FilePath>
</File>
<File>
<FileName>
mss_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_gpio\mss_gpio.c
</FilePath>
</File>
<File>
<FileName>
mss_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_uart\mss_uart.c
</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
...
...
bsp/smartfusion2/project.uvprojx
浏览文件 @
ce860582
...
...
@@ -10,7 +10,7 @@
<TargetName>
project
</TargetName>
<ToolsetNumber>
0x4
</ToolsetNumber>
<ToolsetName>
ARM-ADS
</ToolsetName>
<pCCUsed>
5060750::V5.06 update 6 (build 750)::ARMCC
</pCCUsed>
<pCCUsed>
5060750::V5.06 update 6 (build 750)::
.\
ARMCC
</pCCUsed>
<uAC6>
0
</uAC6>
<TargetOption>
<TargetCommonOption>
...
...
@@ -185,6 +185,7 @@
<uocXRam>
0
</uocXRam>
<RvdsVP>
0
</RvdsVP>
<RvdsMve>
0
</RvdsMve>
<RvdsCdeCp>
0
</RvdsCdeCp>
<hadIRAM2>
0
</hadIRAM2>
<hadIROM2>
0
</hadIROM2>
<StupSel>
8
</StupSel>
...
...
@@ -324,7 +325,7 @@
<wLevel>
2
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<uC99>
1
</uC99>
<uGnu>
0
</uGnu>
<useXO>
0
</useXO>
<v6Lang>
1
</v6Lang>
...
...
@@ -336,9 +337,9 @@
<v6Rtti>
0
</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>
RT_USING_ARM_LIBC
</Define>
<Define>
RT_USING_ARM_LIBC
, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND
</Define>
<Undefine></Undefine>
<IncludePath>
.;..\..\include;applications;board;CMSIS;drivers;libraries\sys_config;libraries\mss_gpio;libraries\mss_uart;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common
</IncludePath>
<IncludePath>
applications;board;CMSIS;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;drivers;..\..\components\finsh;.;..\..\include;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common;libraries\sys_config;libraries\mss_gpio;libraries\mss_uart
</IncludePath>
</VariousControls>
</Cads>
<Aads>
...
...
@@ -351,7 +352,7 @@
<NoWarn>
0
</NoWarn>
<uSurpInc>
0
</uSurpInc>
<useXO>
0
</useXO>
<
uClangAs>
0
</uClangAs
>
<
ClangAsOpt>
4
</ClangAsOpt
>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
...
...
@@ -379,81 +380,6 @@
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
clock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\clock.c
</FilePath>
</File>
<File>
<FileName>
components.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\components.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>
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>
<FileType>
1
</FileType>
<FilePath>
..\..\src\signal.c
</FilePath>
</File>
<File>
<FileName>
thread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\thread.c
</FilePath>
</File>
<File>
<FileName>
timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\timer.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Applications
</GroupName>
<Files>
...
...
@@ -495,42 +421,7 @@
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_uart.c
</FilePath>
</File>
<File>
<FileName>
drv_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_gpio.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
sys_config.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\sys_config\sys_config.c
</FilePath>
</File>
<File>
<FileName>
mss_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_gpio\mss_gpio.c
</FilePath>
</File>
<File>
<FileName>
mss_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_uart\mss_uart.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
cpu
</GroupName>
<GroupName>
CPU
</GroupName>
<Files>
<File>
<FileName>
backtrace.c
</FileName>
...
...
@@ -609,6 +500,21 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Drivers
</GroupName>
<Files>
<File>
<FileName>
drv_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_uart.c
</FilePath>
</File>
<File>
<FileName>
drv_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
drivers\drv_gpio.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
finsh
</GroupName>
<Files>
...
...
@@ -629,6 +535,76 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Kernel
</GroupName>
<Files>
<File>
<FileName>
clock.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\clock.c
</FilePath>
</File>
<File>
<FileName>
components.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\components.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>
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>
thread.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\thread.c
</FilePath>
</File>
<File>
<FileName>
timer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\src\timer.c
</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>
libc
</GroupName>
<Files>
...
...
@@ -643,9 +619,14 @@
<FilePath>
..\..\components\libc\compilers\armlibc\mem_std.c
</FilePath>
</File>
<File>
<FileName>
s
tub
s.c
</FileName>
<FileName>
s
yscall
s.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\armlibc\stubs.c
</FilePath>
<FilePath>
..\..\components\libc\compilers\armlibc\syscalls.c
</FilePath>
</File>
<File>
<FileName>
stdlib.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\components\libc\compilers\common\stdlib.c
</FilePath>
</File>
<File>
<FileName>
time.c
</FileName>
...
...
@@ -654,6 +635,26 @@
</File>
</Files>
</Group>
<Group>
<GroupName>
Libraries
</GroupName>
<Files>
<File>
<FileName>
sys_config.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\sys_config\sys_config.c
</FilePath>
</File>
<File>
<FileName>
mss_gpio.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_gpio\mss_gpio.c
</FilePath>
</File>
<File>
<FileName>
mss_uart.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
libraries\mss_uart\mss_uart.c
</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
...
...
@@ -664,4 +665,19 @@
<files/>
</RTE>
<LayerInfo>
<Layers>
<Layer>
<LayName>
<
Project Info
>
</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>
0
</LayTarg>
<LayPrjMark>
1
</LayPrjMark>
</Layer>
</Layers>
</LayerInfo>
</Project>
bsp/smartfusion2/template.uvopt
浏览文件 @
ce860582
...
...
@@ -110,10 +110,10 @@
<tRmem>
1
</tRmem>
<tRfunc>
0
</tRfunc>
<tRbox>
1
</tRbox>
<tRtrace>
1
</tRtrace>
<tRtrace>
0
</tRtrace>
<sRSysVw>
1
</sRSysVw>
<tRSysVw>
1
</tRSysVw>
<tPdscDbg>
0
</tPdscDbg>
<tPdscDbg>
1
</tPdscDbg>
<sRunDeb>
0
</sRunDeb>
<sLrtime>
0
</sLrtime>
<nTsel>
6
</nTsel>
...
...
bsp/smartfusion2/template.uvproj
浏览文件 @
ce860582
...
...
@@ -139,9 +139,9 @@
<RestoreMemoryDisplay>
1
</RestoreMemoryDisplay>
<RestoreFunctions>
0
</RestoreFunctions>
<RestoreToolbox>
1
</RestoreToolbox>
<RestoreTracepoints>
1
</RestoreTracepoints>
<RestoreTracepoints>
0
</RestoreTracepoints>
<RestoreSysVw>
1
</RestoreSysVw>
<UsePdscDebugDescription>
0
</UsePdscDebugDescription>
<UsePdscDebugDescription>
1
</UsePdscDebugDescription>
</Target>
<RunDebugAfterBuild>
0
</RunDebugAfterBuild>
<TargetSelection>
6
</TargetSelection>
...
...
@@ -170,7 +170,7 @@
<Capability>
0
</Capability>
<DriverSelection>
-1
</DriverSelection>
</Flash1>
<bUseTDR>
1
</bUseTDR>
<bUseTDR>
0
</bUseTDR>
<Flash2>
BIN\UL2CM3.DLL
</Flash2>
<Flash3></Flash3>
<Flash4></Flash4>
...
...
@@ -356,7 +356,7 @@
<wLevel>
0
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<uC99>
1
</uC99>
<useXO>
0
</useXO>
<VariousControls>
<MiscControls></MiscControls>
...
...
bsp/smartfusion2/template.uvprojx
浏览文件 @
ce860582
...
...
@@ -185,6 +185,7 @@
<uocXRam>
0
</uocXRam>
<RvdsVP>
0
</RvdsVP>
<RvdsMve>
0
</RvdsMve>
<RvdsCdeCp>
0
</RvdsCdeCp>
<hadIRAM2>
0
</hadIRAM2>
<hadIROM2>
0
</hadIROM2>
<StupSel>
8
</StupSel>
...
...
@@ -324,7 +325,7 @@
<wLevel>
2
</wLevel>
<uThumb>
0
</uThumb>
<uSurpInc>
0
</uSurpInc>
<uC99>
0
</uC99>
<uC99>
1
</uC99>
<uGnu>
0
</uGnu>
<useXO>
0
</useXO>
<v6Lang>
1
</v6Lang>
...
...
@@ -351,7 +352,7 @@
<NoWarn>
0
</NoWarn>
<uSurpInc>
0
</uSurpInc>
<useXO>
0
</useXO>
<
uClangAs>
0
</uClangAs
>
<
ClangAsOpt>
4
</ClangAsOpt
>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
...
...
@@ -392,4 +393,19 @@
<files/>
</RTE>
<LayerInfo>
<Layers>
<Layer>
<LayName>
<
Project Info
>
</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>
0
</LayTarg>
<LayPrjMark>
1
</LayPrjMark>
</Layer>
</Layers>
</LayerInfo>
</Project>
components/finsh/msh_file.c
浏览文件 @
ce860582
...
...
@@ -101,7 +101,7 @@ int msh_exec_script(const char *cmd_line, int size)
int
length
;
line_buf
=
(
char
*
)
rt_malloc
(
RT_CONSOLEBUF_SIZE
);
if
(
line_buf
==
RT_NULL
)
if
(
line_buf
==
RT_NULL
)
{
close
(
fd
);
return
-
RT_ENOMEM
;
...
...
@@ -295,7 +295,7 @@ static void directory_delete_for_msh(const char *pathname, char f, char v)
if
(
dirent
==
RT_NULL
)
break
;
if
(
rt_strcmp
(
"."
,
dirent
->
d_name
)
!=
0
&&
rt_strcmp
(
".."
,
dirent
->
d_name
)
!=
0
)
rt_strcmp
(
".."
,
dirent
->
d_name
)
!=
0
)
{
rt_sprintf
(
full_path
,
"%s/%s"
,
pathname
,
dirent
->
d_name
);
if
(
dirent
->
d_type
==
DT_REG
)
...
...
@@ -347,13 +347,20 @@ int cmd_rm(int argc, char **argv)
{
switch
(
argv
[
1
][
n
])
{
case
'f'
:
f
=
1
;
break
;
case
'r'
:
r
=
1
;
break
;
case
'v'
:
v
=
1
;
break
;
case
'-'
:
break
;
default:
rt_kprintf
(
"Error: Bad option: %c
\n
"
,
argv
[
1
][
n
]);
return
0
;
case
'f'
:
f
=
1
;
break
;
case
'r'
:
r
=
1
;
break
;
case
'v'
:
v
=
1
;
break
;
case
'-'
:
break
;
default:
rt_kprintf
(
"Error: Bad option: %c
\n
"
,
argv
[
1
][
n
]);
return
0
;
}
}
argc
-=
1
;
...
...
@@ -363,7 +370,7 @@ int cmd_rm(int argc, char **argv)
for
(
index
=
1
;
index
<
argc
;
index
++
)
{
struct
stat
s
;
if
(
stat
(
argv
[
index
],
&
s
)
==
0
)
if
(
stat
(
argv
[
index
],
&
s
)
==
0
)
{
if
(
s
.
st_mode
&
S_IFDIR
)
{
...
...
@@ -469,8 +476,81 @@ int cmd_mkfs(int argc, char **argv)
}
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_mkfs
,
__cmd_mkfs
,
format
disk
with
file
system
);
extern
struct
dfs_filesystem
filesystem_table
[];
int
cmd_mount
(
int
argc
,
char
*
argv
[])
{
if
(
argc
==
1
)
{
struct
dfs_filesystem
*
iter
;
/* display the mount history */
rt_kprintf
(
"filesystem device mountpoint
\n
"
);
rt_kprintf
(
"---------- ------ ----------
\n
"
);
for
(
iter
=
&
filesystem_table
[
0
];
iter
<
&
filesystem_table
[
DFS_FILESYSTEMS_MAX
];
iter
++
)
{
if
((
iter
!=
NULL
)
&&
(
iter
->
path
!=
NULL
))
{
rt_kprintf
(
"%-10s %-6s %-s
\n
"
,
iter
->
ops
->
name
,
iter
->
dev_id
->
parent
.
name
,
iter
->
path
);
}
}
return
0
;
}
else
if
(
argc
==
4
)
{
char
*
device
=
argv
[
1
];
char
*
path
=
argv
[
2
];
char
*
fstype
=
argv
[
3
];
/* mount a filesystem to the specified directory */
rt_kprintf
(
"mount device %s(%s) onto %s ... "
,
device
,
fstype
,
path
);
if
(
dfs_mount
(
device
,
path
,
fstype
,
0
,
0
)
==
0
)
{
rt_kprintf
(
"succeed!
\n
"
);
return
0
;
}
else
{
rt_kprintf
(
"failed!
\n
"
);
return
-
1
;
}
}
else
{
rt_kprintf
(
"Usage: mount <device> <mountpoint> <fstype>.
\n
"
);
return
-
1
;
}
}
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_mount
,
__cmd_mount
,
mount
<
device
>
<
mountpoint
>
<
fstype
>
);
/* unmount the filesystem from the specified mountpoint */
int
cmd_umount
(
int
argc
,
char
*
argv
[])
{
char
*
path
=
argv
[
1
];
if
(
argc
!=
2
)
{
rt_kprintf
(
"Usage: unmount <mountpoint>.
\n
"
);
return
-
1
;
}
rt_kprintf
(
"unmount %s ... "
,
path
);
if
(
dfs_unmount
(
path
)
<
0
)
{
rt_kprintf
(
"failed!
\n
"
);
return
-
1
;
}
else
{
rt_kprintf
(
"succeed!
\n
"
);
return
0
;
}
}
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_umount
,
__cmd_umount
,
Unmount
device
from
file
system
);
extern
int
df
(
const
char
*
path
);
int
cmd_df
(
int
argc
,
char
**
argv
)
int
cmd_df
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
{
...
...
@@ -492,7 +572,7 @@ int cmd_df(int argc, char** argv)
}
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_df
,
__cmd_df
,
disk
free
);
int
cmd_echo
(
int
argc
,
char
**
argv
)
int
cmd_echo
(
int
argc
,
char
**
argv
)
{
if
(
argc
==
2
)
{
...
...
@@ -505,7 +585,7 @@ int cmd_echo(int argc, char** argv)
fd
=
open
(
argv
[
2
],
O_RDWR
|
O_APPEND
|
O_CREAT
,
0
);
if
(
fd
>=
0
)
{
write
(
fd
,
argv
[
1
],
strlen
(
argv
[
1
]));
write
(
fd
,
argv
[
1
],
strlen
(
argv
[
1
]));
close
(
fd
);
}
else
...
...
components/libc/compilers/common/time.c
浏览文件 @
ce860582
...
...
@@ -12,7 +12,6 @@
* 2021-02-08 Meco Man add settimeofday() stime()
* 2021-02-10 Meco Man add ctime_r() and re-implement ctime()
* 2021-02-11 Meco Man fix bug #3183 - align days[] and months[] to 4 bytes
* add difftime()
* 2021-02-12 Meco Man add errno
* 2012-12-08 Bernard <clock_time.c> fix the issue of _timevalue.tv_usec initialization,
* which found by Rob <rdent@iinet.net.au>
...
...
@@ -177,12 +176,6 @@ char* ctime(const time_t *tim_p)
}
RTM_EXPORT
(
ctime
);
double
difftime
(
time_t
tim1
,
time_t
tim2
)
{
return
(
double
)(
tim1
-
tim2
);
}
RTM_EXPORT
(
difftime
);
/**
* Returns the current time.
*
...
...
@@ -372,6 +365,10 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
}
RTM_EXPORT
(
settimeofday
);
/* inherent in the toolchain */
RTM_EXPORT
(
difftime
);
RTM_EXPORT
(
strftime
);
#ifdef RT_USING_POSIX
static
struct
timeval
_timevalue
;
static
int
clock_time_system_init
()
...
...
include/rtdef.h
浏览文件 @
ce860582
...
...
@@ -802,6 +802,9 @@ struct rt_memheap_item
struct
rt_memheap_item
*
next_free
;
/**< next free memheap item */
struct
rt_memheap_item
*
prev_free
;
/**< prev free memheap item */
#ifdef RT_USING_MEMTRACE
rt_uint8_t
owner_thread_name
[
4
];
/**< owner thread name */
#endif
};
/**
...
...
src/memheap.c
浏览文件 @
ce860582
...
...
@@ -85,6 +85,10 @@ rt_err_t rt_memheap_init(struct rt_memheap *memheap,
item
->
next_free
=
item
;
item
->
prev_free
=
item
;
#ifdef RT_USING_MEMTRACE
rt_memset
(
item
->
owner_thread_name
,
' '
,
sizeof
(
item
->
owner_thread_name
));
#endif
item
->
next
=
(
struct
rt_memheap_item
*
)
((
rt_uint8_t
*
)
item
+
memheap
->
available_size
+
RT_MEMHEAP_SIZE
);
item
->
prev
=
item
->
next
;
...
...
@@ -206,6 +210,10 @@ void *rt_memheap_alloc(struct rt_memheap *heap, rt_size_t size)
/* put the pool pointer into the new block. */
new_ptr
->
pool_ptr
=
heap
;
#ifdef RT_USING_MEMTRACE
rt_memset
(
new_ptr
->
owner_thread_name
,
' '
,
sizeof
(
new_ptr
->
owner_thread_name
));
#endif
/* break down the block list */
new_ptr
->
prev
=
header_ptr
;
new_ptr
->
next
=
header_ptr
->
next
;
...
...
@@ -257,6 +265,13 @@ void *rt_memheap_alloc(struct rt_memheap *heap, rt_size_t size)
/* Mark the allocated block as not available. */
header_ptr
->
magic
|=
RT_MEMHEAP_USED
;
#ifdef RT_USING_MEMTRACE
if
(
rt_thread_self
())
rt_memcpy
(
header_ptr
->
owner_thread_name
,
rt_thread_self
()
->
name
,
sizeof
(
header_ptr
->
owner_thread_name
));
else
rt_memcpy
(
header_ptr
->
owner_thread_name
,
"NONE"
,
sizeof
(
header_ptr
->
owner_thread_name
));
#endif
/* release lock */
rt_sem_release
(
&
(
heap
->
lock
));
...
...
@@ -381,6 +396,10 @@ void *rt_memheap_realloc(struct rt_memheap *heap, void *ptr, rt_size_t newsize)
/* put the pool pointer into the new block. */
next_ptr
->
pool_ptr
=
heap
;
#ifdef RT_USING_MEMTRACE
rt_memset
(
next_ptr
->
owner_thread_name
,
' '
,
sizeof
(
next_ptr
->
owner_thread_name
));
#endif
next_ptr
->
prev
=
header_ptr
;
next_ptr
->
next
=
header_ptr
->
next
;
header_ptr
->
next
->
prev
=
next_ptr
;
...
...
@@ -445,6 +464,10 @@ void *rt_memheap_realloc(struct rt_memheap *heap, void *ptr, rt_size_t newsize)
/* put the pool pointer into the new block. */
new_ptr
->
pool_ptr
=
heap
;
#ifdef RT_USING_MEMTRACE
rt_memset
(
new_ptr
->
owner_thread_name
,
' '
,
sizeof
(
new_ptr
->
owner_thread_name
));
#endif
/* break down the block list */
new_ptr
->
prev
=
header_ptr
;
new_ptr
->
next
=
header_ptr
->
next
;
...
...
@@ -590,6 +613,10 @@ void rt_memheap_free(void *ptr)
header_ptr
->
next_free
,
header_ptr
->
prev_free
));
}
#ifdef RT_USING_MEMTRACE
rt_memset
(
header_ptr
->
owner_thread_name
,
' '
,
sizeof
(
header_ptr
->
owner_thread_name
));
#endif
/* release lock */
rt_sem_release
(
&
(
heap
->
lock
));
}
...
...
@@ -728,4 +755,78 @@ void rt_memory_info(rt_uint32_t *total,
#endif
#endif
#ifdef RT_USING_MEMTRACE
void
dump_used_memheap
(
struct
rt_memheap
*
mh
)
{
struct
rt_memheap_item
*
header_ptr
;
rt_uint32_t
block_size
;
rt_kprintf
(
"
\n
memory heap address:
\n
"
);
rt_kprintf
(
"heap_ptr: 0x%08x
\n
"
,
mh
->
start_addr
);
rt_kprintf
(
"free : 0x%08x
\n
"
,
mh
->
available_size
);
rt_kprintf
(
"max_used: 0x%08x
\n
"
,
mh
->
max_used_size
);
rt_kprintf
(
"size : 0x%08x
\n
"
,
mh
->
pool_size
);
rt_kprintf
(
"
\n
--memory used information --
\n
"
);
header_ptr
=
mh
->
block_list
;
while
(
header_ptr
->
next
!=
mh
->
block_list
)
{
if
((
header_ptr
->
magic
&
RT_MEMHEAP_MASK
)
!=
RT_MEMHEAP_MAGIC
)
{
rt_kprintf
(
"[0x%08x - incorrect magic: 0x%08x
\n
"
,
header_ptr
,
header_ptr
->
magic
);
break
;
}
/* get current memory block size */
block_size
=
MEMITEM_SIZE
(
header_ptr
);
if
(
block_size
<
0
)
break
;
if
(
RT_MEMHEAP_IS_USED
(
header_ptr
))
{
/* dump information */
rt_kprintf
(
"[0x%08x - %d - %c%c%c%c] used
\n
"
,
header_ptr
,
block_size
,
header_ptr
->
owner_thread_name
[
0
],
header_ptr
->
owner_thread_name
[
1
],
header_ptr
->
owner_thread_name
[
2
],
header_ptr
->
owner_thread_name
[
3
]);
}
else
{
/* dump information */
rt_kprintf
(
"[0x%08x - %d - %c%c%c%c] free
\n
"
,
header_ptr
,
block_size
,
header_ptr
->
owner_thread_name
[
0
],
header_ptr
->
owner_thread_name
[
1
],
header_ptr
->
owner_thread_name
[
2
],
header_ptr
->
owner_thread_name
[
3
]);
}
/* move to next used memory block */
header_ptr
=
header_ptr
->
next
;
}
}
void
memtrace_heap
()
{
struct
rt_object_information
*
info
;
struct
rt_list_node
*
list
;
struct
rt_memheap
*
mh
;
struct
rt_list_node
*
node
;
info
=
rt_object_get_information
(
RT_Object_Class_MemHeap
);
list
=
&
info
->
object_list
;
for
(
node
=
list
->
next
;
node
!=
list
;
node
=
node
->
next
)
{
mh
=
(
struct
rt_memheap
*
)
rt_list_entry
(
node
,
struct
rt_object
,
list
);
dump_used_memheap
(
mh
);
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
MSH_CMD_EXPORT
(
memtrace_heap
,
dump
memory
trace
for
heap
);
#endif
/* end of RT_USING_FINSH */
#endif
/* end of RT_USING_MEMTRACE */
#endif
/* end of RT_USING_MEMHEAP */
tools/building.py
浏览文件 @
ce860582
...
...
@@ -626,6 +626,8 @@ def DefineGroup(name, src, depend, **parameters):
group
[
'name'
]
=
name
group
[
'path'
]
=
group_path
if
type
(
src
)
==
type
([]):
# remove duplicate elements from list
src
=
list
(
set
(
src
))
group
[
'src'
]
=
File
(
src
)
else
:
group
[
'src'
]
=
src
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录