diff --git a/bsp/stm32f107/SConscript b/bsp/stm32f107/SConscript index 3acf61424a..a425264923 100644 --- a/bsp/stm32f107/SConscript +++ b/bsp/stm32f107/SConscript @@ -1,19 +1,14 @@ -import rtconfig +# for module compiling +import os Import('RTT_ROOT') -from building import * -src_bsp = ['application.c', 'startup.c', 'board.c', 'stm32f10x_it.c'] -src_drv = ['usart.c', 'serial.c'] +cwd = str(Dir('#')) +objs = [] +list = os.listdir(cwd) -if GetDepend('RT_USING_DFS'): - src_drv += ['msd.c'] +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) -if GetDepend('RT_USING_LWIP'): - src_drv += ['stm32_eth.c'] - -src = src_bsp + src_drv -CPPPATH = [GetCurrentDir()] -CPPDEFINES = [] -group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) - -Return('group') +Return('objs') diff --git a/bsp/stm32f107/SConstruct b/bsp/stm32f107/SConstruct index 8929042d16..26929d1373 100644 --- a/bsp/stm32f107/SConstruct +++ b/bsp/stm32f107/SConstruct @@ -28,10 +28,7 @@ Export('RTT_ROOT') Export('rtconfig') # prepare building environment -objs = PrepareBuilding(env, RTT_ROOT) - -# STM32 firemare library building script -objs = objs + SConscript('Libraries/SConscript', variant_dir='build/bsp/Libraries', duplicate=0) +objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) # build program env.Program(TARGET, objs) diff --git a/bsp/stm32f107/applications/SConscript b/bsp/stm32f107/applications/SConscript new file mode 100644 index 0000000000..591734409c --- /dev/null +++ b/bsp/stm32f107/applications/SConscript @@ -0,0 +1,11 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * + +cwd = os.path.join(str(Dir('#')), 'applications') +src = Glob('*.c') +CPPPATH = [cwd, str(Dir('#'))] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/stm32f107/application.c b/bsp/stm32f107/applications/application.c similarity index 100% rename from bsp/stm32f107/application.c rename to bsp/stm32f107/applications/application.c diff --git a/bsp/stm32f107/startup.c b/bsp/stm32f107/applications/startup.c similarity index 100% rename from bsp/stm32f107/startup.c rename to bsp/stm32f107/applications/startup.c diff --git a/bsp/stm32f107/board.c b/bsp/stm32f107/board.c deleted file mode 100644 index 27da518e4b..0000000000 --- a/bsp/stm32f107/board.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * File : board.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2009 RT-Thread Develop Team - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rt-thread.org/license/LICENSE - * - * Change Logs: - * Date Author Notes - * 2009-01-05 Bernard first implementation - */ - -#include -#include - -#include "stm32f10x.h" -#include "stm32f10x_fsmc.h" -#include "board.h" - -/** - * @addtogroup STM32 - */ - -/*@{*/ - -/******************************************************************************* -* Function Name : NVIC_Configuration -* Description : Configures Vector Table base location. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NVIC_Configuration(void) -{ -#ifdef VECT_TAB_RAM - /* Set the Vector Table base location at 0x20000000 */ - NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); -#else /* VECT_TAB_FLASH */ - /* Set the Vector Table base location at 0x08000000 */ - NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); -#endif -} - -/******************************************************************************* - * Function Name : SysTick_Configuration - * Description : Configures the SysTick for OS tick. - * Input : None - * Output : None - * Return : None - *******************************************************************************/ -void SysTick_Configuration(void) -{ - RCC_ClocksTypeDef rcc_clocks; - rt_uint32_t cnts; - - RCC_GetClocksFreq(&rcc_clocks); - - cnts = (rt_uint32_t)rcc_clocks.HCLK_Frequency / RT_TICK_PER_SECOND; - - SysTick_Config(cnts); - SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK); -} - -#if STM32_EXT_SRAM -void EXT_SRAM_Configuration(void) -{ - FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure; - FSMC_NORSRAMTimingInitTypeDef p; - GPIO_InitTypeDef GPIO_InitStructure; - - RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE); - - RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOG | RCC_APB2Periph_GPIOE | - RCC_APB2Periph_GPIOF, ENABLE); - - /*-- GPIO Configuration ------------------------------------------------------*/ - /* SRAM Data lines configuration */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_8 | GPIO_Pin_9 | - GPIO_Pin_10 | GPIO_Pin_14 | GPIO_Pin_15; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_Init(GPIOD, &GPIO_InitStructure); - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | - GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | - GPIO_Pin_15; - GPIO_Init(GPIOE, &GPIO_InitStructure); - - /* SRAM Address lines configuration */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | - GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_12 | GPIO_Pin_13 | - GPIO_Pin_14 | GPIO_Pin_15; - GPIO_Init(GPIOF, &GPIO_InitStructure); - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | - GPIO_Pin_4 | GPIO_Pin_5; - GPIO_Init(GPIOG, &GPIO_InitStructure); - - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; - GPIO_Init(GPIOD, &GPIO_InitStructure); - - /* NOE and NWE configuration */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4 |GPIO_Pin_5; - GPIO_Init(GPIOD, &GPIO_InitStructure); - - /* NE3 NE4 configuration */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_12; - GPIO_Init(GPIOG, &GPIO_InitStructure); - - /* NBL0, NBL1 configuration */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1; - GPIO_Init(GPIOE, &GPIO_InitStructure); - - /*-- FSMC Configuration ------------------------------------------------------*/ - p.FSMC_AddressSetupTime = 0; - p.FSMC_AddressHoldTime = 0; - p.FSMC_DataSetupTime = 2; - p.FSMC_BusTurnAroundDuration = 0; - p.FSMC_CLKDivision = 0; - p.FSMC_DataLatency = 0; - p.FSMC_AccessMode = FSMC_AccessMode_A; - - FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM3; - FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; - FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM; - FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; - FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; - FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; - FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; - FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; - FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; - FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; - FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; - FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; - - FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); - - /* Enable FSMC Bank1_SRAM Bank */ - FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM3, ENABLE); -} -#endif - -/** - * This is the timer interrupt service routine. - * - */ -void rt_hw_timer_handler(void) -{ - /* enter interrupt */ - rt_interrupt_enter(); - - rt_tick_increase(); - - /* leave interrupt */ - rt_interrupt_leave(); -} - -/** - * This function will initial STM32 board. - */ -void rt_hw_board_init() -{ - /* NVIC Configuration */ - NVIC_Configuration(); - - /* Configure the SysTick */ - SysTick_Configuration(); - -#if STM32_EXT_SRAM - EXT_SRAM_Configuration(); -#endif - - rt_hw_usart_init(); - rt_console_set_device(CONSOLE_DEVICE); -} - -/*@}*/ diff --git a/bsp/stm32f107/drivers/SConscript b/bsp/stm32f107/drivers/SConscript new file mode 100644 index 0000000000..ef01580e52 --- /dev/null +++ b/bsp/stm32f107/drivers/SConscript @@ -0,0 +1,11 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * + +cwd = os.path.join(str(Dir('#')), 'drivers') +src = Glob('*.c') +CPPPATH = [cwd] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/stm32f107/drivers/board.c b/bsp/stm32f107/drivers/board.c new file mode 100644 index 0000000000..664d7222ca --- /dev/null +++ b/bsp/stm32f107/drivers/board.c @@ -0,0 +1,94 @@ +/* + * File : board.c + * This file is part of RT-Thread RTOS + * COPYRIGHT (C) 2009 RT-Thread Develop Team + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rt-thread.org/license/LICENSE + * + * Change Logs: + * Date Author Notes + * 2009-01-05 Bernard first implementation + */ + +#include +#include + +#include "board.h" + +/** + * @addtogroup STM32 + */ + +/*@{*/ + +/******************************************************************************* +* Function Name : NVIC_Configuration +* Description : Configures Vector Table base location. +* Input : None +* Output : None +* Return : None +*******************************************************************************/ +void NVIC_Configuration(void) +{ +#ifdef VECT_TAB_RAM + /* Set the Vector Table base location at 0x20000000 */ + NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); +#else /* VECT_TAB_FLASH */ + /* Set the Vector Table base location at 0x08000000 */ + NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); +#endif +} + +/******************************************************************************* + * Function Name : SysTick_Configuration + * Description : Configures the SysTick for OS tick. + * Input : None + * Output : None + * Return : None + *******************************************************************************/ +void SysTick_Configuration(void) +{ + RCC_ClocksTypeDef rcc_clocks; + rt_uint32_t cnts; + + RCC_GetClocksFreq(&rcc_clocks); + + cnts = (rt_uint32_t)rcc_clocks.HCLK_Frequency / RT_TICK_PER_SECOND; + + SysTick_Config(cnts); + SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK); +} + +/** + * This is the timer interrupt service routine. + * + */ +void rt_hw_timer_handler(void) +{ + /* enter interrupt */ + rt_interrupt_enter(); + + rt_tick_increase(); + + /* leave interrupt */ + rt_interrupt_leave(); +} + +/** + * This function will initial STM32 board. + */ +void rt_hw_board_init() +{ + /* NVIC Configuration */ + NVIC_Configuration(); + + /* Configure the SysTick */ + SysTick_Configuration(); + + rt_hw_usart_init(); + rt_console_set_device(CONSOLE_DEVICE); +} + +/*@}*/ diff --git a/bsp/stm32f107/board.h b/bsp/stm32f107/drivers/board.h similarity index 95% rename from bsp/stm32f107/board.h rename to bsp/stm32f107/drivers/board.h index af644b70d4..ce8d354604 100644 --- a/bsp/stm32f107/board.h +++ b/bsp/stm32f107/drivers/board.h @@ -16,6 +16,8 @@ #ifndef __BOARD_H__ #define __BOARD_H__ +#include "stm32f10x.h" + /* board configuration */ // SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card // Default: 1 diff --git a/bsp/stm32f107/msd.c b/bsp/stm32f107/drivers/msd.c similarity index 100% rename from bsp/stm32f107/msd.c rename to bsp/stm32f107/drivers/msd.c diff --git a/bsp/stm32f107/msd.h b/bsp/stm32f107/drivers/msd.h similarity index 100% rename from bsp/stm32f107/msd.h rename to bsp/stm32f107/drivers/msd.h diff --git a/bsp/stm32f107/serial.c b/bsp/stm32f107/drivers/serial.c similarity index 100% rename from bsp/stm32f107/serial.c rename to bsp/stm32f107/drivers/serial.c diff --git a/bsp/stm32f107/serial.h b/bsp/stm32f107/drivers/serial.h similarity index 100% rename from bsp/stm32f107/serial.h rename to bsp/stm32f107/drivers/serial.h diff --git a/bsp/stm32f107/stm32_eth.c b/bsp/stm32f107/drivers/stm32_eth.c similarity index 100% rename from bsp/stm32f107/stm32_eth.c rename to bsp/stm32f107/drivers/stm32_eth.c diff --git a/bsp/stm32f107/stm32_eth.h b/bsp/stm32f107/drivers/stm32_eth.h similarity index 100% rename from bsp/stm32f107/stm32_eth.h rename to bsp/stm32f107/drivers/stm32_eth.h diff --git a/bsp/stm32f107/stm32f10x_conf.h b/bsp/stm32f107/drivers/stm32f10x_conf.h similarity index 100% rename from bsp/stm32f107/stm32f10x_conf.h rename to bsp/stm32f107/drivers/stm32f10x_conf.h diff --git a/bsp/stm32f107/stm32f10x_it.c b/bsp/stm32f107/drivers/stm32f10x_it.c similarity index 100% rename from bsp/stm32f107/stm32f10x_it.c rename to bsp/stm32f107/drivers/stm32f10x_it.c diff --git a/bsp/stm32f107/stm32f10x_it.h b/bsp/stm32f107/drivers/stm32f10x_it.h similarity index 100% rename from bsp/stm32f107/stm32f10x_it.h rename to bsp/stm32f107/drivers/stm32f10x_it.h diff --git a/bsp/stm32f107/usart.c b/bsp/stm32f107/drivers/usart.c similarity index 100% rename from bsp/stm32f107/usart.c rename to bsp/stm32f107/drivers/usart.c diff --git a/bsp/stm32f107/usart.h b/bsp/stm32f107/drivers/usart.h similarity index 100% rename from bsp/stm32f107/usart.h rename to bsp/stm32f107/drivers/usart.h diff --git a/bsp/stm32f107/project.ewp b/bsp/stm32f107/project.ewp index 80adeb26d1..4c268d3a10 100644 --- a/bsp/stm32f107/project.ewp +++ b/bsp/stm32f107/project.ewp @@ -1,5 +1,3 @@ - - 2 @@ -12,7 +10,7 @@ General 3 - 21 + 18 1 1 - - - - ICCARM 2 - 28 + 26 1 1 @@ -210,15 +190,15 @@ - @@ -439,15 +417,15 @@ @@ -585,7 +563,7 @@ @@ -935,7 +885,7 @@ General 3 - 21 + 18 1 0 - - - - @@ -1082,7 +1014,7 @@ ICCARM 2 - 28 + 26 1 0 - @@ -1362,15 +1292,15 @@ @@ -1508,7 +1438,7 @@ + + Applications + + $PROJ_DIR$\applications\application.c + + + $PROJ_DIR$\applications\startup.c + + + + Drivers + + $PROJ_DIR$\drivers\board.c + + + $PROJ_DIR$\drivers\msd.c + + + $PROJ_DIR$\drivers\serial.c + + + $PROJ_DIR$\drivers\stm32_eth.c + + + $PROJ_DIR$\drivers\stm32f10x_it.c + + + $PROJ_DIR$\drivers\usart.c + + + + STM32_StdPeriph + + $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c + + + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c + + + $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s + + + + Kernel + + $PROJ_DIR$\..\..\src\clock.c + + + $PROJ_DIR$\..\..\src\device.c + + + $PROJ_DIR$\..\..\src\idle.c + + + $PROJ_DIR$\..\..\src\ipc.c + + + $PROJ_DIR$\..\..\src\irq.c + + + $PROJ_DIR$\..\..\src\kservice.c + + + $PROJ_DIR$\..\..\src\mem.c + + + $PROJ_DIR$\..\..\src\mempool.c + + + $PROJ_DIR$\..\..\src\object.c + + + $PROJ_DIR$\..\..\src\scheduler.c + + + $PROJ_DIR$\..\..\src\thread.c + + + $PROJ_DIR$\..\..\src\timer.c + + CORTEX-M3 - $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S - $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c $PROJ_DIR$\..\..\libcpu\arm\common\div0.c @@ -1872,16 +1921,16 @@ $PROJ_DIR$\..\..\components\dfs\src\dfs.c - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c + $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c - $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c + $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c - $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c @@ -1929,45 +1978,6 @@ $PROJ_DIR$\..\..\components\finsh\symbol.c - - Kernel - - $PROJ_DIR$\..\..\src\clock.c - - - $PROJ_DIR$\..\..\src\device.c - - - $PROJ_DIR$\..\..\src\idle.c - - - $PROJ_DIR$\..\..\src\ipc.c - - - $PROJ_DIR$\..\..\src\irq.c - - - $PROJ_DIR$\..\..\src\kservice.c - - - $PROJ_DIR$\..\..\src\mem.c - - - $PROJ_DIR$\..\..\src\mempool.c - - - $PROJ_DIR$\..\..\src\object.c - - - $PROJ_DIR$\..\..\src\scheduler.c - - - $PROJ_DIR$\..\..\src\thread.c - - - $PROJ_DIR$\..\..\src\timer.c - - LwIP @@ -1977,7 +1987,25 @@ $PROJ_DIR$\..\..\components\net\lwip\src\api\api_msg.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c @@ -1989,13 +2017,43 @@ $PROJ_DIR$\..\..\components\net\lwip\src\core\dns.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c - $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c - $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\icmp.c @@ -2009,9 +2067,6 @@ $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet_chksum.c - - $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip.c @@ -2022,165 +2077,13 @@ $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_frag.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c + $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c + $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c $PROJ_DIR$\..\..\components\net\lwip\src\netif\slipif.c - - $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c - - - $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c - - - - Startup - - $PROJ_DIR$\.\application.c - - - $PROJ_DIR$\.\board.c - - - $PROJ_DIR$\.\msd.c - - - $PROJ_DIR$\.\serial.c - - - $PROJ_DIR$\.\startup.c - - - $PROJ_DIR$\.\stm32_eth.c - - - $PROJ_DIR$\.\stm32f10x_it.c - - - $PROJ_DIR$\.\usart.c - - - - STM32_StdPeriph - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c - - - $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c - - - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c - - - $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c - - - diff --git a/bsp/stm32f107/project.uvproj b/bsp/stm32f107/project.uvproj index f68fb49ba6..2f84f1db06 100644 --- a/bsp/stm32f107/project.uvproj +++ b/bsp/stm32f107/project.uvproj @@ -343,7 +343,7 @@ STM32F10X_CL, USE_STDPERIPH_DRIVER - .;..\..\components\dfs;..\..\components\dfs\include;..\..\components\finsh;..\..\components\net\lwip\src;..\..\components\net\lwip\src\arch\include;..\..\components\net\lwip\src\include;..\..\components\net\lwip\src\include\ipv4;..\..\components\net\lwip\src\include\netif;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;Libraries\CMSIS\CM3\CoreSupport;Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x;Libraries\STM32F10x_StdPeriph_Driver\inc + .;..\..\components\CMSIS\Include;..\..\components\dfs;..\..\components\dfs\include;..\..\components\finsh;..\..\components\net\lwip\src;..\..\components\net\lwip\src\arch\include;..\..\components\net\lwip\src\include;..\..\components\net\lwip\src\include\ipv4;..\..\components\net\lwip\src\include\netif;..\..\include;..\..\libcpu\arm\common;..\..\libcpu\arm\cortex-m3;Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x;Libraries\STM32F10x_StdPeriph_Driver\inc;applications;drivers @@ -381,61 +381,242 @@ - Startup + Applications application.c 1 - .\application.c + applications\application.c startup.c 1 - .\startup.c + applications\startup.c + + + Drivers board.c 1 - .\board.c - - - - - stm32f10x_it.c - 1 - .\stm32f10x_it.c - - - - - usart.c - 1 - .\usart.c - - - - - serial.c - 1 - .\serial.c + drivers\board.c msd.c 1 - .\msd.c + drivers\msd.c + + + + + serial.c + 1 + drivers\serial.c stm32_eth.c 1 - .\stm32_eth.c + drivers\stm32_eth.c + + + + + stm32f10x_it.c + 1 + drivers\stm32f10x_it.c + + + + + usart.c + 1 + drivers\usart.c + + + + + STM32_StdPeriph + + + system_stm32f10x.c + 1 + Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c + + + + + stm32f10x_crc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c + + + + + stm32f10x_rcc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c + + + + + stm32f10x_wwdg.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c + + + + + stm32f10x_pwr.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c + + + + + stm32f10x_exti.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c + + + + + stm32f10x_bkp.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c + + + + + stm32f10x_i2c.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c + + + + + stm32f10x_adc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c + + + + + stm32f10x_dac.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c + + + + + stm32f10x_rtc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c + + + + + stm32f10x_fsmc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c + + + + + stm32f10x_tim.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c + + + + + stm32f10x_iwdg.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c + + + + + stm32f10x_spi.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c + + + + + stm32f10x_flash.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c + + + + + stm32f10x_sdio.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c + + + + + stm32f10x_gpio.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c + + + + + stm32f10x_usart.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c + + + + + stm32f10x_dbgmcu.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c + + + + + stm32f10x_dma.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c + + + + + stm32f10x_can.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c + + + + + stm32f10x_cec.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c + + + + + misc.c + 1 + Libraries\STM32F10x_StdPeriph_Driver\src\misc.c + + + + + startup_stm32f10x_cl.s + 2 + Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s @@ -490,13 +671,6 @@ ..\..\src\mem.c - - - memheap.c - 1 - ..\..\src\memheap.c - - mempool.c @@ -958,191 +1132,6 @@ - - STM32_StdPeriph - - - core_cm3.c - 1 - Libraries\CMSIS\CM3\CoreSupport\core_cm3.c - - - - - system_stm32f10x.c - 1 - Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c - - - - - stm32f10x_crc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c - - - - - stm32f10x_rcc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c - - - - - stm32f10x_wwdg.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c - - - - - stm32f10x_pwr.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c - - - - - stm32f10x_exti.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c - - - - - stm32f10x_bkp.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c - - - - - stm32f10x_i2c.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c - - - - - stm32f10x_adc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c - - - - - stm32f10x_dac.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c - - - - - stm32f10x_rtc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c - - - - - stm32f10x_fsmc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c - - - - - stm32f10x_tim.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c - - - - - stm32f10x_iwdg.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c - - - - - stm32f10x_spi.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c - - - - - stm32f10x_flash.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c - - - - - stm32f10x_sdio.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c - - - - - stm32f10x_gpio.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c - - - - - stm32f10x_usart.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c - - - - - stm32f10x_dbgmcu.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c - - - - - stm32f10x_dma.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c - - - - - stm32f10x_can.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c - - - - - stm32f10x_cec.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c - - - - - misc.c - 1 - Libraries\STM32F10x_StdPeriph_Driver\src\misc.c - - - - - startup_stm32f10x_cl.s - 2 - Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s - - - diff --git a/bsp/stm32f107/rtconfig.h b/bsp/stm32f107/rtconfig.h index 3d907281a8..7ce8279717 100644 --- a/bsp/stm32f107/rtconfig.h +++ b/bsp/stm32f107/rtconfig.h @@ -75,7 +75,6 @@ /* SECTION: device filesystem */ #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. */