瀏覽代碼

[BSP] fix GCC compiling issue in LPC408x bsp

Bernard Xiong 10 年之前
父節點
當前提交
fdfb4dad79
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 2 1
      bsp/lpc408x/applications/application.c
  2. 6 0
      bsp/lpc408x/rtthread-lpc408x.ld

+ 2 - 1
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)

+ 6 - 0
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.*)))