diff --git a/bsp/lpc408x/applications/application.c b/bsp/lpc408x/applications/application.c index 854777b1fb..91a59bcea1 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 adcfa03c36..746f3948eb 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.*)))