Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
混口饭吃,
rt-thread
提交
9201cbc2
R
rt-thread
项目概览
混口饭吃,
/
rt-thread
与 Fork 源项目一致
Fork自
Mr_Pangza / 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,发现更多精彩内容 >>
提交
9201cbc2
编写于
7月 29, 2015
作者:
A
ardafu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Kernel Init] Add support to use RT_USING_USER_MAIN with IAR
上级
0af2be6b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
8 deletion
+28
-8
src/components.c
src/components.c
+28
-8
未找到文件。
src/components.c
浏览文件 @
9201cbc2
...
...
@@ -25,8 +25,9 @@
* 2013-06-23 Bernard Add the init_call for components initialization.
* 2013-07-05 Bernard Remove initialization feature for MS VC++ compiler
* 2015-02-06 Bernard Remove the MS VC++ support and move to the kernel
* 2015-05
04 Bernard Rename it to components.c because compiling issue
* 2015-05
-04 Bernard Rename it to components.c because compiling issue
* in some IDEs.
* 2015-07-29 Arda.Fu Add support to use RT_USING_USER_MAIN with IAR
*/
#include <rthw.h>
...
...
@@ -128,23 +129,42 @@ void rt_components_init(void)
void
rt_application_init
(
void
);
void
rt_hw_board_init
(
void
);
#ifdef __CC_ARM
extern
int
$
Super
$$
main
(
void
);
int
rtthread_startup
(
void
);
#if defined (__CC_ARM)
extern
int
$
Super
$$
main
(
void
);
/* re-define main function */
int
$
Sub
$$
main
(
void
)
{
rt_hw_interrupt_disable
();
rtthread_startup
();
return
0
;
}
#elif defined(__ICCARM__)
extern
int
main
(
void
);
/* __low_level_init will auto called by IAR cstartup */
extern
void
__iar_data_init3
(
void
);
int
__low_level_init
(
void
)
{
// call IAR table copy function.
__iar_data_init3
();
rt_hw_interrupt_disable
();
rtthread_startup
();
return
0
;
}
#elif defined(__GNUC__)
extern
int
main
(
void
);
/* Add -eentry to arm-none-eabi-gcc argument */
int
entry
(
void
)
{
rt_hw_interrupt_disable
();
rtthread_startup
();
return
0
;
}
#endif
#ifndef RT_USING_HEAP
/* if there is not enble heap, we should use static thread and stack. */
/* if there is not en
a
ble heap, we should use static thread and stack. */
ALIGN
(
8
)
static
rt_uint8_t
main_stack
[
2048
];
struct
rt_thread
main_thread
;
...
...
@@ -160,9 +180,9 @@ void main_thread_entry(void *parameter)
rt_components_init
();
/* invoke system main function */
#if
def __CC_ARM
#if
defined (__CC_ARM)
$
Super
$$
main
();
/* for ARMCC. */
#el
se
#el
if defined(__ICCARM__) || defined(__GNUC__)
main
();
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录