diff --git a/bsp/stm32f10x/Libraries/SConscript b/bsp/stm32f10x/Libraries/SConscript index 5b1415c1d182ce25f7e3e9daba3721f86b4d19ad..44b213e68586b2e0bfa2e198adad0f935da50901 100644 --- a/bsp/stm32f10x/Libraries/SConscript +++ b/bsp/stm32f10x/Libraries/SConscript @@ -2,6 +2,9 @@ import rtconfig Import('RTT_ROOT') from building import * +# get current directory +cwd = GetCurrentDir() + # The set of source files associated with this SConscript file. src = Split(""" CMSIS/CM3/CoreSupport/core_cm3.c @@ -50,9 +53,9 @@ elif rtconfig.CROSS_TOOL == 'keil': elif rtconfig.CROSS_TOOL == 'iar': 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] group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) diff --git a/bsp/stm32f10x/rtconfig.h b/bsp/stm32f10x/rtconfig.h index c48b25d15d2fc1d2b3f3226cda957daef2850f19..111e56b9217b2cd72bd42be751f9f0827d48f32b 100644 --- a/bsp/stm32f10x/rtconfig.h +++ b/bsp/stm32f10x/rtconfig.h @@ -73,28 +73,26 @@ #define FINSH_USING_DESCRIPTION /* 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_DFS_ELM_WORD_ACCESS +/* Reentrancy (thread safe) of the FatFs module. */ #define RT_DFS_ELM_REENTRANT +/* Number of volumes (logical drives) to be used. */ #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 +/* Maximum sector size to be handled. */ #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 /* the max number of mounted filesystem */ #define DFS_FILESYSTEMS_MAX 2 /* the max number of opened files */ #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 */ -//#define RT_USING_LWIP +/* #define RT_USING_LWIP */ /* LwIP uses RT-Thread Memory Management */ #define RT_LWIP_USING_RT_MEM /* Enable ICMP protocol*/ @@ -110,7 +108,7 @@ #define RT_LWIP_TCP_PCB_NUM 5 /* Using DHCP */ -//#define RT_LWIP_DHCP +/* #define RT_LWIP_DHCP */ /* ip address of target*/ #define RT_LWIP_IPADDR0 192 @@ -132,12 +130,12 @@ /* tcp thread options */ #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 /* ethernet if thread options */ #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 #endif diff --git a/bsp/stm32f10x/rtconfig.py b/bsp/stm32f10x/rtconfig.py index 2b85617381f0cfb240c4ba471e974f9c2de3e887..4ff5ccb5807e72351de68e28e086094029cf69e5 100644 --- a/bsp/stm32f10x/rtconfig.py +++ b/bsp/stm32f10x/rtconfig.py @@ -3,15 +3,18 @@ ARCH='arm' CPU='stm32' 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': PLATFORM = 'gcc' - EXEC_PATH = 'D:/SourceryGCC/bin' + EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' - EXEC_PATH = 'C:/Keil' + EXEC_PATH = 'E:/Keil' elif CROSS_TOOL == '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' STM32_TYPE = 'STM32F10X_HD' diff --git a/bsp/stm32f10x/stm32_rom.ld b/bsp/stm32f10x/stm32_rom.ld index eac4d40b11f4744684790b0ef5510d1a1926bf33..a0e9747af20e87971929e07e1a6366341c8c0324 100644 --- a/bsp/stm32f10x/stm32_rom.ld +++ b/bsp/stm32f10x/stm32_rom.ld @@ -77,6 +77,7 @@ SECTIONS _sbss = .; *(.bss) + *(.bss.*) *(COMMON) . = ALIGN(4);