summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2014-11-02 09:38:22 +0800
committerBernard Xiong <[email protected]>2014-11-02 09:38:22 +0800
commitcbf02c076e5df956f9254b5108a3dfc81a4deb11 (patch)
tree1181262b2bfd7d02f98debe45f85a14185c26c9c /bsp
parent21c39a3681c713a47684d56382fd62fc8eba08f6 (diff)
parentfdfb4dad79c62d30db14d0614bc5b4dc373c41ee (diff)
Merge pull request #365 from BernardXiong/master
[BSP] fix GCC compiling issue in LPC408x bsp
Diffstat (limited to 'bsp')
-rw-r--r--bsp/lpc408x/applications/application.c3
-rw-r--r--bsp/lpc408x/rtthread-lpc408x.ld6
2 files changed, 8 insertions, 1 deletions
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 <rtthread.h>
#include <board.h>
+#ifdef RT_USING_COMPONENTS_INIT
#include <components.h>
-
+#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.*)))