Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
786b296a
R
rt-thread
项目概览
2345VOR
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
786b296a
编写于
9月 18, 2018
作者:
L
lida
提交者:
leihang
9月 18, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32f40x]add main.c to file applications ,delete application.c and startup.c
上级
1abe8353
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
46 addition
and
171 deletion
+46
-171
bsp/stm32f40x/applications/application.c
bsp/stm32f40x/applications/application.c
+0
-59
bsp/stm32f40x/applications/main.c
bsp/stm32f40x/applications/main.c
+31
-0
bsp/stm32f40x/applications/startup.c
bsp/stm32f40x/applications/startup.c
+0
-111
bsp/stm32f40x/drivers/board.c
bsp/stm32f40x/drivers/board.c
+4
-0
bsp/stm32f40x/drivers/board.h
bsp/stm32f40x/drivers/board.h
+11
-0
bsp/stm32f40x/drivers/stm32f4xx_conf.h
bsp/stm32f40x/drivers/stm32f4xx_conf.h
+0
-1
未找到文件。
bsp/stm32f40x/applications/application.c
已删除
100644 → 0
浏览文件 @
1abe8353
/*
* File : application.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2009-01-05 Bernard the first version
* 2014-04-27 Bernard make code cleanup.
*/
#include <board.h>
#include <rtthread.h>
#ifdef RT_USING_LWIP
#include <lwip/sys.h>
#include <lwip/api.h>
#include <netif/ethernetif.h>
#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
void
rt_init_thread_entry
(
void
*
parameter
)
{
/* initialization RT-Thread Components */
rt_components_init
();
/* GDB STUB */
#ifdef RT_USING_GDB
gdb_set_device
(
"uart6"
);
gdb_start
();
#endif
}
int
rt_application_init
()
{
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/stm32f40x/applications/main.c
0 → 100644
浏览文件 @
786b296a
/*
* File : main.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team
*
* 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
*
* Change Logs:
* Date Author Notes
* 2006-08-31 Bernard first implementation
* 2011-06-05 Bernard modify for STM32F107 version
*/
#include <rthw.h>
#include <rtthread.h>
/**
* @addtogroup STM32
*/
/*@{*/
int
main
(
void
)
{
/* user app entry */
return
0
;
}
/*@}*/
bsp/stm32f40x/applications/startup.c
已删除
100644 → 0
浏览文件 @
1abe8353
/*
* File : startup.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006, RT-Thread Develop Team
*
* 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
*
* Change Logs:
* Date Author Notes
* 2006-08-31 Bernard first implementation
* 2011-06-05 Bernard modify for STM32F107 version
*/
#include <rthw.h>
#include <rtthread.h>
#include "stm32f4xx.h"
#include "board.h"
/**
* @addtogroup STM32
*/
/*@{*/
extern
int
rt_application_init
(
void
);
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
#define STM32_SRAM_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define STM32_SRAM_BEGIN (__segment_end("HEAP"))
#else
extern
int
__bss_end
;
#define STM32_SRAM_BEGIN (&__bss_end)
#endif
/*******************************************************************************
* Function Name : assert_failed
* Description : Reports the name of the source file and the source line number
* where the assert error has occurred.
* Input : - file: pointer to the source file name
* - line: assert error line source number
* Output : None
* Return : None
*******************************************************************************/
void
assert_failed
(
u8
*
file
,
u32
line
)
{
rt_kprintf
(
"
\n\r
Wrong parameter value detected on
\r\n
"
);
rt_kprintf
(
" file %s
\r\n
"
,
file
);
rt_kprintf
(
" line %d
\r\n
"
,
line
);
while
(
1
)
;
}
/**
* This function will startup RT-Thread RTOS.
*/
void
rtthread_startup
(
void
)
{
/* init board */
rt_hw_board_init
();
/* show version */
rt_show_version
();
/* init tick */
rt_system_tick_init
();
/* init kernel object */
rt_system_object_init
();
/* init timer system */
rt_system_timer_init
();
rt_system_heap_init
((
void
*
)
STM32_SRAM_BEGIN
,
(
void
*
)
STM32_SRAM_END
);
/* init scheduler system */
rt_system_scheduler_init
();
/* init application */
rt_application_init
();
/* init timer thread */
rt_system_timer_thread_init
();
/* init 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/stm32f40x/drivers/board.c
浏览文件 @
786b296a
...
...
@@ -93,6 +93,10 @@ void rt_hw_board_init()
/* Configure the SysTick */
SysTick_Configuration
();
#ifdef RT_USING_HEAP
rt_system_heap_init
((
void
*
)
STM32_SRAM_BEGIN
,
(
void
*
)
STM32_SRAM_END
);
#endif
rt_components_board_init
();
#ifdef RT_USING_CONSOLE
...
...
bsp/stm32f40x/drivers/board.h
浏览文件 @
786b296a
...
...
@@ -46,6 +46,17 @@ extern char __ICFEDIT_region_RAM_end__;
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
#endif
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
#define STM32_SRAM_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define STM32_SRAM_BEGIN (__segment_end("HEAP"))
#else
extern
int
__bss_end
;
#define STM32_SRAM_BEGIN (&__bss_end)
#endif
void
rt_hw_board_init
(
void
);
#endif
...
...
bsp/stm32f40x/drivers/stm32f4xx_conf.h
浏览文件 @
786b296a
...
...
@@ -69,7 +69,6 @@
/* Uncomment the line below to expanse the "assert_param" macro in the
Standard Peripheral Library drivers code */
#define USE_FULL_ASSERT 1
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录