From e7cb38c9c30c288a9d26038712420254783be575 Mon Sep 17 00:00:00 2001 From: yangjie Date: Wed, 11 Sep 2019 12:01:24 +0800 Subject: [PATCH] =?UTF-8?q?[src]=E8=A7=A3=E9=99=A4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=8E=E4=BD=BF=E7=94=A8user=20ma?= =?UTF-8?q?in=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SConscript | 3 --- src/components.c | 7 ++++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/SConscript b/src/SConscript index 7f448725a2..ea6e19318f 100644 --- a/src/SConscript +++ b/src/SConscript @@ -6,9 +6,6 @@ src = Glob('*.c') CPPPATH = [RTT_ROOT + '/include'] -if GetDepend('RT_USING_COMPONENTS_INIT') == False: - SrcRemove(src, ['components.c']) - if GetDepend('RT_USING_MODULE') == False: SrcRemove(src, ['module.c']) diff --git a/src/components.c b/src/components.c index b9fc4c178c..df3e0f0fb3 100644 --- a/src/components.c +++ b/src/components.c @@ -126,6 +126,7 @@ void rt_components_init(void) } #endif } +#endif /* RT_USING_COMPONENTS_INIT */ #ifdef RT_USING_USER_MAIN @@ -173,10 +174,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 #ifdef RT_USING_SMP rt_hw_secondary_cpu_up(); #endif @@ -254,4 +256,3 @@ int rtthread_startup(void) return 0; } #endif -#endif