فهرست منبع

support gcc for mini2440 platform(not finished)

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@359 bbd45198-f89e-11dd-88c7-29a3b14d5316
qiuyiuestc 15 سال پیش
والد
کامیت
ef970b36a2

+ 7 - 6
bsp/mini2440/application.c

@@ -74,12 +74,6 @@ void rt_init_thread_entry(void* parameter)
 	}
 #endif
 
-#ifdef RT_USING_RTGUI
-	{
-		rtgui_startup();
-	}
-#endif
-
 /* LwIP Initialization */
 #ifdef RT_USING_LWIP
 	{
@@ -97,6 +91,13 @@ void rt_init_thread_entry(void* parameter)
 		rt_kprintf("TCP/IP initialized!\n");
 	}
 #endif
+
+#ifdef RT_USING_RTGUI
+	{
+		rt_hw_touch_init();
+		rtgui_startup();
+	}
+#endif
 }
 
 void rt_led_thread_entry(void* parameter)

+ 0 - 7
bsp/mini2440/board.c

@@ -155,13 +155,6 @@ void rt_hw_board_init()
 	/* initialize mmu */
 	rt_hw_mmu_init();
 
-	/* initialize console */
-	//rt_console_init(&_rt_hw_framebuffer[0], &asc16_font[0], 2);
-
-#ifdef RT_USING_RTGUI
-	rt_hw_touch_init();
-#endif
-
 	/* initialize timer4 */
 	rt_hw_timer_init();
 }

+ 2 - 2
bsp/mini2440/debug.Opt

@@ -17,9 +17,9 @@ ExtF <E:\SVN-Google-Source\bsp\mini2440\application.c> 49,56,0,{ 44,0,0,0,0,0,0,
 ExtF <E:\SVN-Google-Source\filesystem\dfs\filesystems\efsl\src\fs\vfat\fs.c> 47,54,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,66,0,0,0,87,0,0,0,236,2,0,0,66,1,0,0 }
 ExtF <E:\SVN-Google-Source\bsp\mini2440\sdcard.c> 602,602,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,0,0,0,0,0,0,0,0,57,3,0,0,190,0,0,0 }
 ExtF <E:\SVN-Google-Source\libcpu\arm\s3c24x0\start_rvds.s> 844,848,0,{ 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,66,0,0,0,87,0,0,0,201,2,0,0,128,1,0,0 }
-ExtF <E:\SVN-Google-Source\bsp\mini2440\startup.c> 124,135,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,88,0,0,0,116,0,0,0,223,2,0,0,157,1,0,0 }
+ExtF <E:\SVN-Google-Source\bsp\mini2440\startup.c> 124,136,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,88,0,0,0,116,0,0,0,223,2,0,0,157,1,0,0 }
 ExtF <E:\SVN-Google-Source\src\kservice.h> 80,84,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,44,0,0,0,58,0,0,0,179,2,0,0,82,1,0,0 }
-ExtF <E:\SVN-Google-Source\src\idle.c> 56,66,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,44,0,0,0,58,0,0,0,179,2,0,0,82,1,0,0 }
+ExtF <E:\SVN-Google-Source\src\idle.c> 56,56,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,44,0,0,0,58,0,0,0,179,2,0,0,82,1,0,0 }
 
 TARGOPT 1, (RT-Thread Debug)
  ADSCLK=12000000

+ 10 - 8
bsp/mini2440/rtconfig.py

@@ -26,7 +26,7 @@ CPU='s3c24x0'
 TextBase='0x30000000'
 
 #PLATFORM = 'gcc'
-#EXEC_PATH = 'd:/SourceryGCC/bin'
+#EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
 PLATFORM = 'armcc'
 EXEC_PATH = 'E:/Keil'
 BUILD = 'debug'
@@ -44,9 +44,9 @@ if PLATFORM == 'gcc':
     OBJCPY = PREFIX + 'objcopy'
 
     DEVICE = ' -mcpu=arm920t'
-    CFLAGS = DEVICE + ' -DRT_USING_MINILIBC'
+    CFLAGS = DEVICE + ' -Dsourcerygxx' + ' -nostdinc'
     AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
-    LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,Reset_Handler -T mini2440_rom.ld'
+    LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,Reset_Handler -T mini2440_ram.ld'
 
     CPATH = ''
     LPATH = ''
@@ -57,6 +57,9 @@ if PLATFORM == 'gcc':
     else:
         CFLAGS += ' -O2'
 
+    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'
 
@@ -71,16 +74,13 @@ elif PLATFORM == 'armcc':
     DEVICE = ' --device DARMSS9'
     CFLAGS = DEVICE + ' --apcs=interwork'
     AFLAGS = DEVICE
-    LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-mini2440.map --ro-base 0x30000000 --entry Entry_Point --first Entry_Point'
+    LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list rtthread-mini2440.map --ro-base 0x30000000 --entry Entry_Point --first Entry_Point'
 
     CFLAGS += ' -I"' + EXEC_PATH + '/ARM/RV31/INC"'
     LFLAGS += ' --libpath "' + EXEC_PATH + '/ARM/RV31/LIB"'
 
     EXEC_PATH += '/arm/bin40/'
 
-    if RT_USING_WEBSERVER:
-        CFLAGS +=  ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1'
-
     if BUILD == 'debug':
         CFLAGS += ' -g -O0'
         AFLAGS += ' -g'
@@ -90,6 +90,8 @@ elif PLATFORM == 'armcc':
     RT_USING_MINILIBC = False
     if RT_USING_FINSH:
         LFLAGS += ' --keep __fsym_* --keep __vsym_*'
+    if RT_USING_WEBSERVER:
+        CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
     POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
 
 elif PLATFORM == 'iar':
@@ -101,4 +103,4 @@ elif PLATFORM == 'iar':
 
     CFLAGS = ''
     AFLAGS = ''
-    LFLAGS = ''
+    LFLAGS = ''

+ 2 - 1
bsp/mini2440/startup.c

@@ -48,10 +48,11 @@ extern struct rt_device uart0_device;
 	extern int Image$$ER_ZI$$ZI$$Base;
 	extern int Image$$ER_ZI$$ZI$$Length;
 	extern int Image$$ER_ZI$$ZI$$Limit;
-#elif defined(__GNU_C__)
+#else
 	extern int __bss_end;
 #endif
 
+
 #ifdef RT_USING_FINSH
 extern void finsh_system_init(void);
 #endif

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/base/include/efs.h

@@ -38,7 +38,7 @@
 /*****************************************************************************/
 #include <dfs_fs.h>
 
-#include "types.h"
+#include "etypes.h"
 #include "config.h"
 #include "extract.h"
 #include "partition.h"

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/base/include/extract.h

@@ -37,7 +37,7 @@
 
 /*****************************************************************************/
 #include "config.h"
-#include "types.h"
+#include "etypes.h"
 /*****************************************************************************/
 
 #if !(defined(HOST_LITTLE_ENDIAN)) && !(defined(HOST_BIG_ENDIAN))

+ 2 - 2
filesystem/dfs/filesystems/efsl/src/base/include/partition.h

@@ -38,8 +38,8 @@
 /*****************************************************************************/
 #include "config.h"
 #include "error.h"
-#include "types.h"
-// #include "ioman.h"
+#include "etypes.h"
+// #include "ioman.h"
 #include <dfs_cache.h>
 /*****************************************************************************/
 

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/base/include/plibc.h

@@ -35,7 +35,7 @@
 #define __PLIBC_H__
 
 /*****************************************************************************/
-#include "types.h"
+#include "etypes.h"
 #include "config.h"
 /*****************************************************************************/
 

+ 2 - 2
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/dir.h

@@ -40,8 +40,8 @@
 #include "error.h"
 #include "fat.h"
 #include "plibc.h"
-#include "types.h"
-// #include "ioman.h"
+#include "etypes.h"
+// #include "ioman.h"
 #include "tm.h"
 #include "fs.h"
 #include <dfs_cache.h>

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/fat.h

@@ -39,7 +39,7 @@
 #include "config.h"
 #include "error.h"
 #include "file.h"
-#include "types.h"
+#include "etypes.h"
 /*****************************************************************************/
 
 euint32 fat_getSectorAddressFatEntry(FileSystem *fs,euint32 cluster_addr);

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/file.h

@@ -42,7 +42,7 @@
 #include "fs.h"
 #include "dir.h"
 #include "plibc.h"
-#include "types.h"
+#include "etypes.h"
 #include "fat.h"
 /*****************************************************************************/
 

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/fs.h

@@ -38,7 +38,7 @@
 
 /*****************************************************************************/
 #include "config.h"
-#include "types.h"
+#include "etypes.h"
 #include "error.h"
 #include "partition.h"
 #include "tm.h"

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/mkfs.h

@@ -38,7 +38,7 @@
 #include "partition.h"
 #include "plibc.h"
 #include "debug.h"
-#include "types.h"
+#include "etypes.h"
 #include "extract.h"
 #include "config.h"
 /*****************************************************************************/

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/tm.h

@@ -35,7 +35,7 @@
 #define __TIME_H_
 
 /*****************************************************************************/
-#include "types.h"
+#include "etypes.h"
 /*****************************************************************************/
 
 #ifdef DATE_TIME_SUPPORT

+ 1 - 1
filesystem/dfs/filesystems/efsl/src/fs/vfat/include/ui.h

@@ -37,7 +37,7 @@
 
 /*****************************************************************************/
 #include "fs.h"
-#include "types.h"
+#include "etypes.h"
 #include "fat.h"
 #include "dir.h"
 #include "config.h"

+ 0 - 0
filesystem/dfs/filesystems/efsl/src/include/types.h → filesystem/dfs/filesystems/efsl/src/include/etypes.h


+ 2 - 2
libcpu/arm/s3c24x0/rtc.c

@@ -148,8 +148,6 @@ void rt_hw_rtc_init(void)
 	return;
 }
 
-#ifdef RT_USING_FINSH
-#include <finsh.h>
 time_t time(time_t* t)
 {
 	rt_device_t device;
@@ -170,6 +168,8 @@ time_t time(time_t* t)
 	return time;
 }
 
+#ifdef RT_USING_FINSH
+#include <finsh.h>
 void set_date(rt_uint32_t year, rt_uint32_t month, rt_uint32_t day)
 {
 	struct tm ti;