From fdfb4dad79c62d30db14d0614bc5b4dc373c41ee Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sat, 1 Nov 2014 23:17:04 +0800 Subject: [PATCH] [BSP] fix GCC compiling issue in LPC408x bsp --- bsp/lpc408x/applications/application.c | 3 ++- bsp/lpc408x/rtthread-lpc408x.ld | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bsp/lpc408x/applications/application.c b/bsp/lpc408x/applications/application.c index 854777b1f..91a59bcea 100644 --- a/bsp/lpc408x/applications/application.c +++ b/bsp/lpc408x/applications/application.c @@ -15,8 +15,9 @@ #include #include +#ifdef RT_USING_COMPONENTS_INIT #include - +#endif /* thread phase init */ void rt_init_thread_entry(void *parameter) diff --git a/bsp/lpc408x/rtthread-lpc408x.ld b/bsp/lpc408x/rtthread-lpc408x.ld index adcfa03c3..746f3948e 100644 --- a/bsp/lpc408x/rtthread-lpc408x.ld +++ b/bsp/lpc408x/rtthread-lpc408x.ld @@ -38,6 +38,12 @@ SECTIONS __vsymtab_end = .; . = ALIGN(4); + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + . = ALIGN(4); + PROVIDE(__ctors_start__ = .); /* old GCC version uses .ctors */ KEEP(*(SORT(.ctors.*)))