diff options
| author | armink <[email protected]> | 2019-12-17 20:11:46 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-12-17 20:11:46 +0800 |
| commit | 4875ee8a3ab95c4fbf1e09941d3f44d99a9a632b (patch) | |
| tree | 15c596c04a842bac747bbcf05a703b8da76f8eac /src/components.c | |
| parent | fa46d6ac861f26b472d62abdf1278c445431ce4c (diff) | |
Sync from master (75a3f3dd3a930eab1dc58fa0258a9d1605a0ac11)
Diffstat (limited to 'src/components.c')
| -rw-r--r-- | src/components.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components.c b/src/components.c index 67658afde5..8280056153 100644 --- a/src/components.c +++ b/src/components.c @@ -125,6 +125,7 @@ void rt_components_init(void) } #endif } +#endif /* RT_USING_COMPONENTS_INIT */ #ifdef RT_USING_USER_MAIN @@ -152,7 +153,6 @@ int __low_level_init(void) return 0; } #elif defined(__GNUC__) -extern int main(void); /* Add -eentry to arm-none-eabi-gcc argument */ int entry(void) { @@ -173,10 +173,11 @@ void main_thread_entry(void *parameter) { extern int main(void); extern int $Super$$main(void); - + +#ifdef RT_USING_COMPONENTS_INIT /* RT-Thread components initialization */ rt_components_init(); - +#endif /* invoke system main function */ #if defined(__CC_ARM) || defined(__CLANG_ARM) $Super$$main(); /* for ARMCC. */ @@ -200,7 +201,7 @@ void rt_application_init(void) result = rt_thread_init(tid, "main", main_thread_entry, RT_NULL, main_stack, sizeof(main_stack), RT_MAIN_THREAD_PRIORITY, 20); RT_ASSERT(result == RT_EOK); - + /* if not define RT_USING_HEAP, using to eliminate the warning */ (void)result; #endif @@ -247,4 +248,3 @@ int rtthread_startup(void) return 0; } #endif -#endif |
