From 7ce935b601674a395852b8098250dfe6ff906f9b Mon Sep 17 00:00:00 2001 From: wuyangyong Date: Mon, 10 Sep 2012 05:49:55 +0000 Subject: [PATCH] cleanup code. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2286 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/stm32f107/SConscript | 25 +- bsp/stm32f107/SConstruct | 5 +- bsp/stm32f107/applications/SConscript | 11 + .../{ => applications}/application.c | 0 bsp/stm32f107/{ => applications}/startup.c | 0 bsp/stm32f107/board.c | 181 ------ bsp/stm32f107/drivers/SConscript | 11 + bsp/stm32f107/drivers/board.c | 94 +++ bsp/stm32f107/{ => drivers}/board.h | 2 + bsp/stm32f107/{ => drivers}/msd.c | 0 bsp/stm32f107/{ => drivers}/msd.h | 0 bsp/stm32f107/{ => drivers}/serial.c | 0 bsp/stm32f107/{ => drivers}/serial.h | 0 bsp/stm32f107/{ => drivers}/stm32_eth.c | 0 bsp/stm32f107/{ => drivers}/stm32_eth.h | 0 bsp/stm32f107/{ => drivers}/stm32f10x_conf.h | 0 bsp/stm32f107/{ => drivers}/stm32f10x_it.c | 0 bsp/stm32f107/{ => drivers}/stm32f10x_it.h | 0 bsp/stm32f107/{ => drivers}/usart.c | 0 bsp/stm32f107/{ => drivers}/usart.h | 0 bsp/stm32f107/project.ewp | 575 ++++++++---------- bsp/stm32f107/project.uvproj | 399 ++++++------ bsp/stm32f107/rtconfig.h | 1 - 23 files changed, 562 insertions(+), 742 deletions(-) create mode 100644 bsp/stm32f107/applications/SConscript rename bsp/stm32f107/{ => applications}/application.c (100%) rename bsp/stm32f107/{ => applications}/startup.c (100%) delete mode 100644 bsp/stm32f107/board.c create mode 100644 bsp/stm32f107/drivers/SConscript create mode 100644 bsp/stm32f107/drivers/board.c rename bsp/stm32f107/{ => drivers}/board.h (95%) rename bsp/stm32f107/{ => drivers}/msd.c (100%) rename bsp/stm32f107/{ => drivers}/msd.h (100%) rename bsp/stm32f107/{ => drivers}/serial.c (100%) rename bsp/stm32f107/{ => drivers}/serial.h (100%) rename bsp/stm32f107/{ => drivers}/stm32_eth.c (100%) rename bsp/stm32f107/{ => drivers}/stm32_eth.h (100%) rename bsp/stm32f107/{ => drivers}/stm32f10x_conf.h (100%) rename bsp/stm32f107/{ => drivers}/stm32f10x_it.c (100%) rename bsp/stm32f107/{ => drivers}/stm32f10x_it.h (100%) rename bsp/stm32f107/{ => drivers}/usart.c (100%) rename bsp/stm32f107/{ => drivers}/usart.h (100%) diff --git a/bsp/stm32f107/SConscript b/bsp/stm32f107/SConscript index 3acf61424..a42526492 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 8929042d1..26929d137 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 000000000..591734409 --- /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 27da518e4..000000000 --- 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 000000000..ef01580e5 --- /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 000000000..664d7222c --- /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 af644b70d..ce8d35460 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 80adeb26d..4c268d3a1 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 @@ - CORTEX-M3 + Applications - $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c + $PROJ_DIR$\applications\application.c - $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S - - - $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c - - - $PROJ_DIR$\..\..\libcpu\arm\common\div0.c - - - $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + $PROJ_DIR$\applications\startup.c - Filesystem + Drivers - $PROJ_DIR$\..\..\components\dfs\src\dfs.c + $PROJ_DIR$\drivers\board.c - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c + $PROJ_DIR$\drivers\msd.c - $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c + $PROJ_DIR$\drivers\serial.c - $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c + $PROJ_DIR$\drivers\stm32_eth.c - $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c + $PROJ_DIR$\drivers\stm32f10x_it.c - $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c + $PROJ_DIR$\drivers\usart.c - finsh + STM32_StdPeriph - $PROJ_DIR$\..\..\components\finsh\cmd.c + $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c - $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c - $PROJ_DIR$\..\..\components\finsh\finsh_error.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c - $PROJ_DIR$\..\..\components\finsh\finsh_heap.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c - $PROJ_DIR$\..\..\components\finsh\finsh_init.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c - $PROJ_DIR$\..\..\components\finsh\finsh_node.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c - $PROJ_DIR$\..\..\components\finsh\finsh_ops.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c - $PROJ_DIR$\..\..\components\finsh\finsh_parser.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c - $PROJ_DIR$\..\..\components\finsh\finsh_token.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c - $PROJ_DIR$\..\..\components\finsh\finsh_var.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c - $PROJ_DIR$\..\..\components\finsh\finsh_vm.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c - $PROJ_DIR$\..\..\components\finsh\shell.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c - $PROJ_DIR$\..\..\components\finsh\symbol.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c - - - Kernel - $PROJ_DIR$\..\..\src\clock.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c - $PROJ_DIR$\..\..\src\device.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c - $PROJ_DIR$\..\..\src\idle.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c - $PROJ_DIR$\..\..\src\ipc.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c - $PROJ_DIR$\..\..\src\irq.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c - $PROJ_DIR$\..\..\src\kservice.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c - $PROJ_DIR$\..\..\src\mem.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c - $PROJ_DIR$\..\..\src\mempool.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c - $PROJ_DIR$\..\..\src\object.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c - $PROJ_DIR$\..\..\src\scheduler.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c - $PROJ_DIR$\..\..\src\thread.c + $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c - $PROJ_DIR$\..\..\src\timer.c + $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s - LwIP + Kernel - $PROJ_DIR$\..\..\components\net\lwip\src\api\api_lib.c + $PROJ_DIR$\..\..\src\clock.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\api_msg.c + $PROJ_DIR$\..\..\src\device.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c + $PROJ_DIR$\..\..\src\idle.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c + $PROJ_DIR$\..\..\src\ipc.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\dhcp.c + $PROJ_DIR$\..\..\src\irq.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\dns.c + $PROJ_DIR$\..\..\src\kservice.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c + $PROJ_DIR$\..\..\src\mem.c - $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c + $PROJ_DIR$\..\..\src\mempool.c - $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c + $PROJ_DIR$\..\..\src\object.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\icmp.c + $PROJ_DIR$\..\..\src\scheduler.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\igmp.c + $PROJ_DIR$\..\..\src\thread.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet.c + $PROJ_DIR$\..\..\src\timer.c + + + CORTEX-M3 - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet_chksum.c + $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c + $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip.c + $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_addr.c + $PROJ_DIR$\..\..\libcpu\arm\common\div0.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_frag.c + $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c + + + Filesystem - $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c + $PROJ_DIR$\..\..\components\dfs\src\dfs.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c + $PROJ_DIR$\..\..\components\dfs\src\dfs_fs.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c + $PROJ_DIR$\..\..\components\dfs\src\dfs_file.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c + $PROJ_DIR$\..\..\components\dfs\src\dfs_posix.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\dfs_elm.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c + $PROJ_DIR$\..\..\components\dfs\filesystems\elmfat\ff.c + + + finsh - $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c + $PROJ_DIR$\..\..\components\finsh\cmd.c - $PROJ_DIR$\..\..\components\net\lwip\src\netif\slipif.c + $PROJ_DIR$\..\..\components\finsh\finsh_compiler.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c + $PROJ_DIR$\..\..\components\finsh\finsh_error.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c + $PROJ_DIR$\..\..\components\finsh\finsh_heap.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c + $PROJ_DIR$\..\..\components\finsh\finsh_init.c - $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c + $PROJ_DIR$\..\..\components\finsh\finsh_node.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c + $PROJ_DIR$\..\..\components\finsh\finsh_ops.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c + $PROJ_DIR$\..\..\components\finsh\finsh_parser.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c + $PROJ_DIR$\..\..\components\finsh\finsh_token.c - $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c + $PROJ_DIR$\..\..\components\finsh\finsh_var.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c + $PROJ_DIR$\..\..\components\finsh\finsh_vm.c - $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c + $PROJ_DIR$\..\..\components\finsh\shell.c + + + $PROJ_DIR$\..\..\components\finsh\symbol.c - Startup + LwIP - $PROJ_DIR$\.\application.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\api_lib.c - $PROJ_DIR$\.\board.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\api_msg.c - $PROJ_DIR$\.\msd.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\err.c - $PROJ_DIR$\.\serial.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\netbuf.c - $PROJ_DIR$\.\startup.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\netdb.c - $PROJ_DIR$\.\stm32_eth.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\netifapi.c - $PROJ_DIR$\.\stm32f10x_it.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\sockets.c - $PROJ_DIR$\.\usart.c + $PROJ_DIR$\..\..\components\net\lwip\src\api\tcpip.c - - - STM32_StdPeriph - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c + $PROJ_DIR$\..\..\components\net\lwip\src\arch\sys_arch.c - $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s + $PROJ_DIR$\..\..\components\net\lwip\src\core\def.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\dhcp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\dns.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\init.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_cec.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\memp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\netif.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dac.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\pbuf.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dbgmcu.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\raw.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_dma.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\stats.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_exti.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\sys.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_fsmc.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_in.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_gpio.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\tcp_out.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_i2c.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\timers.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_iwdg.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\udp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_pwr.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\autoip.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\icmp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rtc.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\igmp.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_sdio.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\inet_chksum.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_tim.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_usart.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_addr.c - $PROJ_DIR$\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_wwdg.c + $PROJ_DIR$\..\..\components\net\lwip\src\core\ipv4\ip_frag.c - $PROJ_DIR$\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c + $PROJ_DIR$\..\..\components\net\lwip\src\netif\etharp.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\netif\ethernetif.c + + + $PROJ_DIR$\..\..\components\net\lwip\src\netif\slipif.c - - diff --git a/bsp/stm32f107/project.uvproj b/bsp/stm32f107/project.uvproj index f68fb49ba..2f84f1db0 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 + drivers\board.c + + + + + msd.c + 1 + drivers\msd.c + + + + + serial.c + 1 + drivers\serial.c + + + + + stm32_eth.c + 1 + drivers\stm32_eth.c stm32f10x_it.c 1 - .\stm32f10x_it.c + drivers\stm32f10x_it.c usart.c 1 - .\usart.c + drivers\usart.c + + + STM32_StdPeriph - serial.c + system_stm32f10x.c 1 - .\serial.c + Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.c - msd.c + stm32f10x_crc.c 1 - .\msd.c + Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c - stm32_eth.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 - .\stm32_eth.c + 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 3d907281a..7ce827971 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. */ -- GitLab