Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
nix61
rt-thread
提交
b0bff836
R
rt-thread
项目概览
nix61
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b0bff836
编写于
12月 08, 2017
作者:
B
Bernard Xiong
提交者:
GitHub
12月 08, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1085 from BernardXiong/master
[BSP] fix the finsh_system_init issue in BSP
上级
4ad62107
f74cde04
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
148 addition
and
186 deletion
+148
-186
bsp/lpc178x/applications/application.c
bsp/lpc178x/applications/application.c
+10
-0
bsp/lpc178x/applications/startup.c
bsp/lpc178x/applications/startup.c
+0
-10
bsp/lpc2148/applications/application.c
bsp/lpc2148/applications/application.c
+39
-15
bsp/lpc2148/applications/startup.c
bsp/lpc2148/applications/startup.c
+3
-32
bsp/lpc2478/applications/application.c
bsp/lpc2478/applications/application.c
+11
-1
bsp/lpc2478/applications/startup.c
bsp/lpc2478/applications/startup.c
+43
-58
bsp/lpc5410x/applications/application.c
bsp/lpc5410x/applications/application.c
+2
-2
bsp/lpc5410x/applications/startup.c
bsp/lpc5410x/applications/startup.c
+1
-1
bsp/stm32f0x/applications/startup.c
bsp/stm32f0x/applications/startup.c
+0
-4
bsp/stm32f20x/applications/application.c
bsp/stm32f20x/applications/application.c
+20
-0
bsp/stm32f20x/applications/startup.c
bsp/stm32f20x/applications/startup.c
+0
-21
bsp/stm32f40x/applications/application.c
bsp/stm32f40x/applications/application.c
+10
-2
bsp/stm32f40x/applications/startup.c
bsp/stm32f40x/applications/startup.c
+0
-10
bsp/stm32f429-apollo/applications/startup.c
bsp/stm32f429-apollo/applications/startup.c
+0
-4
bsp/stm32f429-disco/applications/application.c
bsp/stm32f429-disco/applications/application.c
+9
-0
bsp/stm32f429-disco/applications/startup.c
bsp/stm32f429-disco/applications/startup.c
+0
-9
bsp/stm32f429_armfly/applications/startup.c
bsp/stm32f429_armfly/applications/startup.c
+0
-5
bsp/stm32l072/app/startup.c
bsp/stm32l072/app/startup.c
+0
-4
bsp/stm32l475-iot-disco/applications/startup.c
bsp/stm32l475-iot-disco/applications/startup.c
+0
-4
bsp/stm32l476-nucleo/applications/startup.c
bsp/stm32l476-nucleo/applications/startup.c
+0
-4
未找到文件。
bsp/lpc178x/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -35,6 +35,11 @@
#include <rtgui/driver.h>
#endif
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
/* thread phase init */
void
rt_init_thread_entry
(
void
*
parameter
)
{
...
...
@@ -97,6 +102,11 @@ void rt_init_thread_entry(void *parameter)
}
}
#endif
#ifdef RT_USING_FINSH
/* initialize finsh */
finsh_system_init
();
#endif
}
// init led
...
...
bsp/lpc178x/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -20,10 +20,6 @@
#include "board.h"
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -81,12 +77,6 @@ void rtthread_startup(void)
/* initialize application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* initialize finsh */
finsh_system_init
();
finsh_set_device
(
FINSH_DEVICE_NAME
);
#endif
/* initialize timer */
rt_system_timer_init
();
...
...
bsp/lpc2148/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -19,6 +19,11 @@
*/
/*@{*/
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
#ifdef RT_USING_DFS
/* dfs init */
#include <dfs.h>
...
...
@@ -41,16 +46,31 @@
/* thread phase init */
void
rt_init_thread_entry
(
void
*
parameter
)
{
#ifdef RT_USING_DEVICE
#ifdef RT_USING_DFS
/* init sd card */
rt_hw_sdcard_init
();
#endif
#ifdef RT_USING_LWIP
eth_system_device_init
();
/* init ethernetif device */
rt_hw_dm9000_init
();
#endif
/* init hardware serial device */
rt_hw_serial_init
();
#endif
/* Filesystem Initialization */
#ifdef RT_USING_DFS
{
/* init the device filesystem */
dfs_init
();
/* init the efsl filesystam*/
efsl_init
();
elm_init
();
/* mount sd card fat partition 1 as root directory */
if
(
dfs_mount
(
"sd0"
,
"/"
,
"e
fs
"
,
0
,
0
)
==
0
)
if
(
dfs_mount
(
"sd0"
,
"/"
,
"e
lm
"
,
0
,
0
)
==
0
)
rt_kprintf
(
"File System initialized!
\n
"
);
else
rt_kprintf
(
"File System init failed!
\n
"
);
...
...
@@ -67,6 +87,10 @@ void rt_init_thread_entry(void *parameter)
rt_kprintf
(
"TCP/IP initialized!
\n
"
);
}
#endif
#ifdef RT_USING_FINSH
finsh_system_init
();
#endif
}
/************** LED BLINK *******************/
...
...
@@ -78,53 +102,53 @@ void rt_init_thread_entry(void *parameter)
ALIGN
(
4
)
char
thread_led1_stack
[
512
];
struct
rt_thread
thread_led1
;
void
thread_led1_entry
(
void
*
parameter
)
void
thread_led1_entry
(
void
*
parameter
)
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
IO1DIR
|=
LED1
;
while
(
1
)
while
(
1
)
{
/* led1 on */
IO1CLR
=
LED1
;
#ifndef RT_USING_FINSH
rt_kprintf
(
"led1 on, count : %d
\r\n
"
,
count
);
rt_kprintf
(
"led1 on, count : %d
\r\n
"
,
count
);
#endif
count
++
;
rt_thread_delay
(
RT_TICK_PER_SECOND
/
3
);
/* delay 0.3s */
rt_thread_delay
(
RT_TICK_PER_SECOND
/
3
);
/* delay 0.3s */
/* led1 off */
IO1SET
=
LED1
;
#ifndef RT_USING_FINSH
rt_kprintf
(
"led1 off
\r\n
"
);
#endif
rt_thread_delay
(
RT_TICK_PER_SECOND
/
3
);
rt_thread_delay
(
RT_TICK_PER_SECOND
/
3
);
}
}
ALIGN
(
4
)
char
thread_led2_stack
[
512
];
struct
rt_thread
thread_led2
;
void
thread_led2_entry
(
void
*
parameter
)
void
thread_led2_entry
(
void
*
parameter
)
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
IO1DIR
|=
LED2
;
while
(
1
)
while
(
1
)
{
/* led2 on */
IO1CLR
=
LED2
;
#ifndef RT_USING_FINSH
rt_kprintf
(
"led2 on, count : %d
\r\n
"
,
count
);
rt_kprintf
(
"led2 on, count : %d
\r\n
"
,
count
);
#endif
count
++
;
rt_thread_delay
(
RT_TICK_PER_SECOND
/
2
);
/* delay 0.5s */
rt_thread_delay
(
RT_TICK_PER_SECOND
/
2
);
/* delay 0.5s */
/* led2 off */
IO1SET
=
LED2
;
#ifndef RT_USING_FINSH
rt_kprintf
(
"led1 off
\r\n
"
);
#endif
rt_thread_delay
(
RT_TICK_PER_SECOND
/
2
);
rt_thread_delay
(
RT_TICK_PER_SECOND
/
2
);
}
}
/************** LED BLINK *******************/
...
...
bsp/lpc2148/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -33,18 +33,11 @@
/*@{*/
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
#endif
extern
int
rt_application_init
(
void
);
extern
void
rt_show_version
(
void
);
#ifdef RT_USING_DEVICE
extern
rt_err_t
rt_hw_serial_init
(
void
);
#endif
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -76,41 +69,19 @@ void rtthread_startup(void)
#ifdef RT_USING_HEAP
#ifdef __CC_ARM
rt_system_heap_init
((
void
*
)
&
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
,
(
void
*
)
0x40008000
);
rt_system_heap_init
((
void
*
)
&
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
,
(
void
*
)
0x40008000
);
#else
/* init memory system */
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
void
*
)
0x40008000
);
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
void
*
)
0x40008000
);
#endif
#endif
/* init scheduler system */
rt_system_scheduler_init
();
#ifdef RT_USING_DEVICE
#ifdef RT_USING_DFS
/* init sd card */
rt_hw_sdcard_init
();
#endif
#ifdef RT_USING_LWIP
eth_system_device_init
();
/* init ethernetif device */
rt_hw_dm9000_init
();
#endif
/* init hardware serial device */
rt_hw_serial_init
();
#endif
/* init application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
finsh_set_device
(
"uart1"
);
#endif
/* init idle thread */
rt_thread_idle_init
();
...
...
@@ -121,7 +92,7 @@ void rtthread_startup(void)
return
;
}
int
main
(
void
)
int
main
(
void
)
{
/* invoke rtthread_startup */
rtthread_startup
();
...
...
bsp/lpc2478/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -14,13 +14,23 @@
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
/**
* @addtogroup LPC2478
*/
/*@{*/
int
rt_application_init
()
{
return
0
;
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
#endif
return
0
;
}
/*@}*/
bsp/lpc2478/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -10,19 +10,13 @@
* Change Logs:
* Date Author Notes
* 2008-12-11 xuxinming first version
* 2010-4-3 LiJin add init soft timer thread
* 2010-4-3 LiJin add init soft timer thread
*/
#include <rthw.h>
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <finsh.h>
extern
int
finsh_system_init
(
void
);
#endif
#include <LPC24xx.h>
#include <board.h>
/**
* @addtogroup LPC2478
...
...
@@ -30,9 +24,6 @@ extern int finsh_system_init(void);
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_DEVICE
extern
rt_err_t
rt_hw_serial_init
(
void
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -45,67 +36,61 @@ extern int __bss_end;
*/
void
rtthread_startup
(
void
)
{
/* init hardware interrupt */
rt_hw_interrupt_init
();
/* init board */
rt_hw_board_init
();
/* init tick */
rt_system_tick_init
();
/* init kernel object */
rt_system_object_init
();
rt_show_version
();
/* init timer system */
rt_system_timer_init
();
/* init memory system */
/* init hardware interrupt */
rt_hw_interrupt_init
();
/* init board */
rt_hw_board_init
();
/* init tick */
rt_system_tick_init
();
/* init kernel object */
rt_system_object_init
();
rt_show_version
();
/* init timer system */
rt_system_timer_init
();
/* init memory system */
#ifdef RT_USING_HEAP
#ifdef __CC_ARM
rt_system_heap_init
((
void
*
)
&
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
,
(
void
*
)
0x40010000
);
rt_system_heap_init
((
void
*
)
&
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
,
(
void
*
)
0x40010000
);
#else
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
void
*
)
0x40010000
);
rt_system_heap_init
((
void
*
)
&
__bss_end
,
(
void
*
)
0x40010000
);
#endif
#endif
/* init scheduler system */
rt_system_scheduler_init
();
/* init scheduler system */
rt_system_scheduler_init
();
/* init application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
finsh_set_device
(
"uart1"
);
#endif
/* init soft timer thread */
rt_system_timer_thread_init
();
/* init idle thread */
rt_thread_idle_init
();
/* start scheduler */
rt_system_scheduler_start
();
/* never reach here */
return
;
/* init application */
rt_application_init
();
/* init soft timer thread */
rt_system_timer_thread_init
();
/* init idle thread */
rt_thread_idle_init
();
/* start scheduler */
rt_system_scheduler_start
();
/* never reach here */
return
;
}
#ifdef __CC_ARM
int
main
(
void
)
{
/* disable interrupt first */
rt_hw_interrupt_disable
();
/* disable interrupt first */
rt_hw_interrupt_disable
();
/* invoke rtthread_startup */
rtthread_startup
();
/* invoke rtthread_startup */
rtthread_startup
();
return
0
;
return
0
;
}
#endif
...
...
bsp/lpc5410x/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -18,16 +18,16 @@
#include <shell.h>
#endif
extern
int
demo_init
(
void
);
void
rt_init_thread_entry
(
void
*
parameter
)
{
#ifdef RT_USING_FINSH
/* initialization finsh shell Component */
finsh_system_init
();
#endif
demo_init
();
}
int
rt_application_init
()
...
...
bsp/lpc5410x/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -5,7 +5,7 @@
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://
openlab.rt-thread.com
/license/LICENSE
* http://
www.rt-thread.org
/license/LICENSE
*
* Change Logs:
* Date Author Notes
...
...
bsp/stm32f0x/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -25,10 +25,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
bsp/stm32f20x/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -20,6 +20,11 @@
#include <board.h>
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
#ifdef RT_USING_DFS
/* dfs init */
#include <dfs.h>
...
...
@@ -41,6 +46,14 @@ void rt_init_thread_entry(void* parameter)
/* Filesystem Initialization */
#ifdef RT_USING_DFS
{
/* init sdcard driver */
#if STM32_USE_SDIO
rt_hw_sdcard_init
();
#else
rt_hw_msd_init
();
#endif
/* init the device filesystem */
dfs_init
();
...
...
@@ -75,6 +88,13 @@ void rt_init_thread_entry(void* parameter)
rt_kprintf
(
"TCP/IP initialized!
\n
"
);
}
#endif
rt_hw_rtc_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
#endif
}
int
rt_application_init
()
...
...
bsp/stm32f20x/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -25,10 +25,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -96,26 +92,9 @@ void rtthread_startup(void)
/* init scheduler system */
rt_system_scheduler_init
();
#ifdef RT_USING_DFS
/* init sdcard driver */
#if STM32_USE_SDIO
rt_hw_sdcard_init
();
#else
rt_hw_msd_init
();
#endif
#endif
rt_hw_rtc_init
();
/* init application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
finsh_set_device
(
"uart1"
);
#endif
/* init timer thread */
rt_system_timer_thread_init
();
...
...
bsp/stm32f40x/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -23,6 +23,11 @@
#include "stm32f4xx_eth.h"
#endif
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
#ifdef RT_USING_GDB
#include <gdb_stub.h>
#endif
...
...
@@ -50,6 +55,11 @@ void rt_init_thread_entry(void* parameter)
rt_kprintf
(
"TCP/IP initialized!
\n
"
);
}
#endif
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
#endif
}
int
rt_application_init
()
...
...
@@ -65,5 +75,3 @@ int rt_application_init()
return
0
;
}
/*@}*/
bsp/stm32f40x/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -26,10 +26,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -88,12 +84,6 @@ void rtthread_startup(void)
/* init application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
finsh_set_device
(
FINSH_DEVICE_NAME
);
#endif
/* init timer thread */
rt_system_timer_thread_init
();
...
...
bsp/stm32f429-apollo/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -26,10 +26,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
bsp/stm32f429-disco/applications/application.c
浏览文件 @
b0bff836
...
...
@@ -16,6 +16,11 @@
#include <board.h>
#include <rtthread.h>
#ifdef RT_USING_FINSH
#include <shell.h>
#include <finsh.h>
#endif
#ifdef RT_USING_LWIP
#include <lwip/sys.h>
#include <lwip/api.h>
...
...
@@ -50,6 +55,10 @@ void rt_init_thread_entry(void* parameter)
rt_kprintf
(
"TCP/IP initialized!
\n
"
);
}
#endif
#ifdef RT_USING_FINSH
finsh_system_init
();
#endif
}
int
rt_application_init
()
...
...
bsp/stm32f429-disco/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -26,10 +26,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
@@ -92,11 +88,6 @@ void rtthread_startup(void)
/* init application */
rt_application_init
();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init
();
#endif
/* init timer thread */
rt_system_timer_thread_init
();
...
...
bsp/stm32f429_armfly/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -26,11 +26,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
/*******************************************************************************
* Function Name : assert_failed
...
...
bsp/stm32l072/app/startup.c
浏览文件 @
b0bff836
...
...
@@ -25,10 +25,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
bsp/stm32l475-iot-disco/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -26,10 +26,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
bsp/stm32l476-nucleo/applications/startup.c
浏览文件 @
b0bff836
...
...
@@ -36,10 +36,6 @@
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef RT_USING_FINSH
extern
int
finsh_system_init
(
void
);
extern
void
finsh_set_device
(
const
char
*
device
);
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录