Pārlūkot izejas kodu

fix GNU ld script issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1556 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong@gmail.com 14 gadi atpakaļ
vecāks
revīzija
311e669569

+ 6 - 3
bsp/stm32f10x/Libraries/SConscript

@@ -2,6 +2,9 @@ import rtconfig
 Import('RTT_ROOT')
 Import('RTT_ROOT')
 from building import *
 from building import *
 
 
+# get current directory
+cwd = GetCurrentDir()
+
 # The set of source files associated with this SConscript file.
 # The set of source files associated with this SConscript file.
 src = Split("""
 src = Split("""
 CMSIS/CM3/CoreSupport/core_cm3.c
 CMSIS/CM3/CoreSupport/core_cm3.c
@@ -50,9 +53,9 @@ elif rtconfig.CROSS_TOOL == 'keil':
 elif rtconfig.CROSS_TOOL == 'iar':
 elif rtconfig.CROSS_TOOL == 'iar':
     src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/iar/' + startup_scripts[rtconfig.STM32_TYPE]]
     src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/iar/' + startup_scripts[rtconfig.STM32_TYPE]]
 
 
-path = [RTT_ROOT + '/bsp/stm32f10x/Libraries/STM32F10x_StdPeriph_Driver/inc', 
-    RTT_ROOT + '/bsp/stm32f10x/Libraries/CMSIS/CM3/CoreSupport',
-    RTT_ROOT + '/bsp/stm32f10x/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x']
+path = [cwd + '/STM32F10x_StdPeriph_Driver/inc', 
+    cwd + '/CMSIS/CM3/CoreSupport',
+    cwd + '/CMSIS/CM3/DeviceSupport/ST/STM32F10x']
 
 
 CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
 CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
 group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

+ 9 - 11
bsp/stm32f10x/rtconfig.h

@@ -73,28 +73,26 @@
 #define FINSH_USING_DESCRIPTION
 #define FINSH_USING_DESCRIPTION
 
 
 /* SECTION: device filesystem */
 /* SECTION: device filesystem */
-//#define RT_USING_DFS
-/* #define RT_USING_DFS_EFSL */
-/* byte alignment for EFSL */
-#define BYTE_ALIGNMENT
+/* #define RT_USING_DFS */
 
 
 #define RT_USING_DFS_ELMFAT
 #define RT_USING_DFS_ELMFAT
 #define RT_DFS_ELM_WORD_ACCESS
 #define RT_DFS_ELM_WORD_ACCESS
+/* Reentrancy (thread safe) of the FatFs module.  */
 #define RT_DFS_ELM_REENTRANT
 #define RT_DFS_ELM_REENTRANT
+/* Number of volumes (logical drives) to be used. */
 #define RT_DFS_ELM_DRIVES			2
 #define RT_DFS_ELM_DRIVES			2
-//#define RT_DFS_ELM_USE_LFN
+/* #define RT_DFS_ELM_USE_LFN			1 */
 #define RT_DFS_ELM_MAX_LFN			255
 #define RT_DFS_ELM_MAX_LFN			255
+/* Maximum sector size to be handled. */
 #define RT_DFS_ELM_MAX_SECTOR_SIZE  512
 #define RT_DFS_ELM_MAX_SECTOR_SIZE  512
 
 
 /* the max number of mounted filesystem */
 /* the max number of mounted filesystem */
 #define DFS_FILESYSTEMS_MAX			2
 #define DFS_FILESYSTEMS_MAX			2
 /* the max number of opened files 		*/
 /* the max number of opened files 		*/
 #define DFS_FD_MAX					4
 #define DFS_FD_MAX					4
-/* the max number of cached sector 		*/
-#define DFS_CACHE_MAX_NUM   		4
 
 
 /* SECTION: lwip, a lighwight TCP/IP protocol stack */
 /* SECTION: lwip, a lighwight TCP/IP protocol stack */
-//#define RT_USING_LWIP
+/* #define RT_USING_LWIP */
 /* LwIP uses RT-Thread Memory Management */
 /* LwIP uses RT-Thread Memory Management */
 #define RT_LWIP_USING_RT_MEM
 #define RT_LWIP_USING_RT_MEM
 /* Enable ICMP protocol*/
 /* Enable ICMP protocol*/
@@ -110,7 +108,7 @@
 #define RT_LWIP_TCP_PCB_NUM	5
 #define RT_LWIP_TCP_PCB_NUM	5
 
 
 /* Using DHCP */
 /* Using DHCP */
-//#define RT_LWIP_DHCP
+/* #define RT_LWIP_DHCP */
 
 
 /* ip address of target*/
 /* ip address of target*/
 #define RT_LWIP_IPADDR0	192
 #define RT_LWIP_IPADDR0	192
@@ -132,12 +130,12 @@
 
 
 /* tcp thread options */
 /* tcp thread options */
 #define RT_LWIP_TCPTHREAD_PRIORITY		12
 #define RT_LWIP_TCPTHREAD_PRIORITY		12
-#define RT_LWIP_TCPTHREAD_MBOX_SIZE		4
+#define RT_LWIP_TCPTHREAD_MBOX_SIZE		10
 #define RT_LWIP_TCPTHREAD_STACKSIZE		1024
 #define RT_LWIP_TCPTHREAD_STACKSIZE		1024
 
 
 /* ethernet if thread options */
 /* ethernet if thread options */
 #define RT_LWIP_ETHTHREAD_PRIORITY		15
 #define RT_LWIP_ETHTHREAD_PRIORITY		15
-#define RT_LWIP_ETHTHREAD_MBOX_SIZE		4
+#define RT_LWIP_ETHTHREAD_MBOX_SIZE		10
 #define RT_LWIP_ETHTHREAD_STACKSIZE		512
 #define RT_LWIP_ETHTHREAD_STACKSIZE		512
 
 
 #endif
 #endif

+ 6 - 3
bsp/stm32f10x/rtconfig.py

@@ -3,15 +3,18 @@ ARCH='arm'
 CPU='stm32'
 CPU='stm32'
 CROSS_TOOL='keil'
 CROSS_TOOL='keil'
 
 
+# cross_tool provides the cross compiler
+# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
+
 if  CROSS_TOOL == 'gcc':
 if  CROSS_TOOL == 'gcc':
 	PLATFORM 	= 'gcc'
 	PLATFORM 	= 'gcc'
-	EXEC_PATH 	= 'D:/SourceryGCC/bin'
+	EXEC_PATH 	= 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
 elif CROSS_TOOL == 'keil':
 elif CROSS_TOOL == 'keil':
 	PLATFORM 	= 'armcc'
 	PLATFORM 	= 'armcc'
-	EXEC_PATH 	= 'C:/Keil'
+	EXEC_PATH 	= 'E:/Keil'
 elif CROSS_TOOL == 'iar':
 elif CROSS_TOOL == 'iar':
 	PLATFORM 	= 'iar'
 	PLATFORM 	= 'iar'
-	IAR_PATH 	= 'C:/Program Files/IAR Systems/Embedded Workbench 5.4 Evaluation_0'	
+	IAR_PATH 	= 'E:/Program Files/IAR Systems/Embedded Workbench 6.0'
 
 
 BUILD = 'debug'
 BUILD = 'debug'
 STM32_TYPE = 'STM32F10X_HD'
 STM32_TYPE = 'STM32F10X_HD'

+ 1 - 0
bsp/stm32f10x/stm32_rom.ld

@@ -77,6 +77,7 @@ SECTIONS
         _sbss = .;
         _sbss = .;
 
 
         *(.bss)
         *(.bss)
+        *(.bss.*)
         *(COMMON)
         *(COMMON)
 
 
         . = ALIGN(4);
         . = ALIGN(4);