summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-09-15 09:35:42 +0800
committerGitHub <[email protected]>2019-09-15 09:35:42 +0800
commit6db1bd45162043a6366bac0422e2c463479f374f (patch)
treefb56edf7dcab9856f4469997c8b779b6ce84c370 /src
parent6e0369b1fe68cf60bbc7595ac14c7059eedbbdb9 (diff)
parent1ef33e66cd6ca01cf7d595731342e6899eab5ac4 (diff)
Merge pull request #3062 from yangjie11/yj_kconfig_com
[bsp]解除组件初始化与使用user main的依赖,并修改相应的 Kconfig
Diffstat (limited to 'src')
-rw-r--r--src/SConscript3
-rw-r--r--src/components.c7
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