2015-08-16 02:16 AM
Guys,
I want to try the example from : STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA and I follow from readme.txt par How to use it ? In order to make the program work, you must do the following : - Copy all source files from this example folder to the template folder under Project\STM32F10x_StdPeriph_Template - Open your preferred toolchain - Rebuild all files and load your image into target memory - Run the example but I get this error on MDK-ARM : stm32f10x_rcc.c: Error: &sharp5: cannot open source input file ''..\..\..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c'': No such file or directory From which directory can I get that ? Which main.c will I use ? from the SPI_DMA directory or from ''user'' directory ? Thanks #know-your-tools2015-08-16 06:48 AM
Wouldn't it be in
STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_rcc.c ? Keil projects typically store the paths to files in a relative form. If you copy the Template project you'll need to copy it at the same directory depth, or adjust up/down the paths to the files in the project meta data. As I recall you can adjust the path by right clicking the file in the project windows, and editing the properties, or deleting the file, and ''Add Existing'' to browse the tree and add them back.2015-08-16 07:36 AM
This is the way I do...
I copy the files from SPI DMA example onto STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\DMA directory... Then I add that directory inside Keil directory structure and compile it... Am I right until this step ? I recompile it and it doesn't give me any errors..... Main.c is from SPI_DMA Example STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA I'm not using main.c from the original STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template Thanks2015-08-16 07:52 AM
That doesn't sound like it's the same depth, now does it?
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template Needs to go to something like (the files and directories under it) STM32F10x_StdPeriph_Lib_V3.5.0\Project\MySPIDMA (the same level) And pull in the files/subdirectories from STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA (which is obviously two levels deeper than the template is) If you change the depths, you have to address that in the meta-data for ALL the files in the project.2015-08-16 12:52 PM
I made :
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1 and pull all the files from STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA into : STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\DMA Do you mean, I must make : STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\SPI\DMA ? I have compiled that project and it works, but is it correct already ? main.c from STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA is inside STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\DMA Is the compiler using ''main.c'' from it ? Thanks2015-08-16 01:39 PM
The files from
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template AND STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\DMA Go into STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1NOT STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\DMA or STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\SPI\DMA You need to maintain the same tree depth as the template, is this really that complicated? ie ONE level off the Project directoryIs the compiler using ''main.c'' from it ? Right Click on the file and LOOK at the properties about where the file is coming from. Edit the file and puts something in your recognize, and then view it with your preferred file manager of the directories and files.2015-08-17 03:02 AM
So it will be like this :
2015-08-17 06:19 AM
Looks reasonable. Right click propertiesof the file (options for file) in the project should confirm it's location
2015-08-17 06:24 AM
The log... µVision Build Log
Project: C:\Users\antonius\Documents\STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_SPI DMA V1\MDK-ARM\Project.uvproj Project File Date: 08/16/2015 Output: Rebuild target 'STM32100E-EVAL' compiling stm32f10x_rcc.c... compiling stm32f10x_gpio.c... compiling misc.c... compiling stm32f10x_exti.c... compiling stm32f10x_spi.c... compiling stm32f10x_fsmc.c... compiling stm32f10x_usart.c... compiling stm32f10x_sdio.c... compiling stm32f10x_dma.c... compiling stm32f10x_i2c.c... compiling stm32f10x_adc.c... compiling stm32f10x_bkp.c... compiling stm32f10x_can.c... compiling stm32f10x_cec.c... compiling stm32f10x_crc.c... compiling stm32f10x_dac.c... compiling stm32f10x_dbgmcu.c... compiling stm32f10x_flash.c... compiling stm32f10x_iwdg.c... compiling stm32f10x_pwr.c... compiling stm32f10x_rtc.c... compiling stm32f10x_tim.c... compiling stm32f10x_wwdg.c... compiling main.c... compiling stm32f10x_it.c... compiling core_cm3.c... compiling system_stm32f10x.c... compiling stm32_eval.c... compiling stm32_eval_spi_sd.c... compiling stm32_eval_i2c_tsensor.c... compiling stm32_eval_spi_flash.c... compiling stm32100e_eval_lcd.c... compiling stm32100e_eval_ioe.c... compiling stm32100e_eval_cec.c... compiling stm32100e_eval_fsmc_onenand.c... compiling stm32100e_eval_fsmc_sram.c... assembling startup_stm32f10x_hd_vl.s... linking... Program Size: Code=1504 RO-data=340 RW-data=36 ZI-data=1124 FromELF: creating hex file... ''.\STM32100E-EVAL\STM32100E-EVAL.axf'' - 0 Error(s), 0 Warning(s). Do you mean this option ?2015-08-17 06:51 AM
Yes, so one level above the MDK-ARM directory the project file is in..