소스 검색

[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.*)))