Browse Source

fix minilibc compiling issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@671 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 năm trước cách đây
mục cha
commit
5c2b75cc62
3 tập tin đã thay đổi với 9 bổ sung7 xóa
  1. 1 1
      bsp/mini2440/application.c
  2. 0 2
      bsp/mini2440/rtconfig.h
  3. 8 4
      bsp/mini2440/rtconfig.py

+ 1 - 1
bsp/mini2440/application.c

@@ -48,7 +48,7 @@ void rt_init_thread_entry(void* parameter)
 		/* init the device filesystem */
 		dfs_init();
 
-#ifdef defined(RT_USING_DFS_ELMFAT)
+#if defined(RT_USING_DFS_ELMFAT)
 		/* init the elm chan FatFs filesystam*/
 		elm_init();
 

+ 0 - 2
bsp/mini2440/rtconfig.h

@@ -81,8 +81,6 @@
 /* a runtime libc library */
 /* #define RT_USING_NEWLIB */
 
-/* SECTION: a mini libc */
-
 /* SECTION: C++ support */
 /* Using C++ support */
 /* #define RT_USING_CPLUSPLUS */

+ 8 - 4
bsp/mini2440/rtconfig.py

@@ -20,9 +20,13 @@ f.close()
 PreProcessor.process_contents(contents)
 rtconfig_ns = PreProcessor.cpp_namespace
 
+# libc options
+if rtconfig_ns.has_key('RT_USING_NEWLIB'):
+    RT_USING_NEWLIB = True
+
 # finsh shell options
 if rtconfig_ns.has_key('RT_USING_FINSH'):
-	RT_USING_FINSH = True
+    RT_USING_FINSH = True
 
 # device virtual filesystem options
 if rtconfig_ns.has_key('RT_USING_DFS'):
@@ -77,9 +81,9 @@ if PLATFORM == 'gcc':
     OBJCPY = PREFIX + 'objcopy'
 
     DEVICE = ' -mcpu=arm920t'
-    CFLAGS = DEVICE + ' -DRT_USING_MINILIBC' + ' -nostdinc -nostdlib -fno-builtin'
+    CFLAGS = DEVICE
     AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
-    LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,_start -T mini2440_ram.ld' + ' -Ttext ' + TextBase
+    LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_mini2440.map,-cref,-u,_start -T mini2440_ram.ld' + ' -Ttext ' + TextBase
 
     CPATH = ''
     LPATH = ''
@@ -92,7 +96,7 @@ if PLATFORM == 'gcc':
 
     if RT_USING_WEBSERVER:
         CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
-    RT_USING_MINILIBC = True
+
     POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
 
 elif PLATFORM == 'armcc':