cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F10x StdPeriph SPI DMA ?

antonius
Senior
Posted on August 16, 2015 at 11:16

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-tools
10 REPLIES 10
Posted on August 16, 2015 at 15:48

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 16, 2015 at 16:36

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

Thanks

Posted on August 16, 2015 at 16:52

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 16, 2015 at 21:52

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 ?

Thanks

0690X00000602Z8QAI.jpg

Posted on August 16, 2015 at 22:39

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 V1

NOT

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 directory

Is 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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 17, 2015 at 12:02

So it will be like this :

0690X00000602SqQAI.jpg

0690X00000602W4QAI.jpg

0690X00000602W9QAI.jpg
Posted on August 17, 2015 at 15:19

Looks reasonable. Right click propertiesof the file (options for file) in the project should confirm it's location

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on August 17, 2015 at 15:24

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).  0690X00000602ZMQAY.jpg   Do you mean this option ? 

Posted on August 17, 2015 at 15:51

Yes, so one level above the MDK-ARM directory the project file is in..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..