2014-08-30 09:52 PM
hi every body
i have some question about creating a new project becouse of my serious problems with it:
in version 4 we copy header files of mcu &cmsis library to the projects folder,& i saw some learning cources do this in version 5 ! but unless dosent keil copy this files automaticaly ?
for a simple cmsis project with stm32f103 which files need to copy ? from where?
in option of the project window/c++ tab:
in define why we must type words like this?
USE_STDPERIPH_DRIVER,STM32F10X_MDwhat does they do ?
in include path : when we must define folder ? some project do this & some dont !
for using spi what setting we must do ?(except selecting at first ?)
WBR
#keil #stm32f1032014-08-31 02:31 AM
Wouldn't Keil 5 load an old project template?
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template\MDK-ARM The compiler needs to know where, and what order, the directories containing include files might be situated. Normally it will look in the current directory (of the source file doing the #include), and then whatever defaults Keil has set up, like C:\Keil\ARM\RV31\INC The above template has ..\; ..\..\..\Libraries\CMSIS\CM3\CoreSupport; ..\..\..\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x; ..\..\..\Libraries\STM32F10x_StdPeriph_Driver\inc; ..\..\..\Utilities\STM32_EVAL; ..\..\..\Utilities\STM32_EVAL\STM32100E_EVAL; ..\..\..\Utilities\STM32_EVAL\Common The defines are pass to the compiler command line, they impact how the preprocessor deals with the include files and what functions, enumerations, and vectors etc. If project structure conforms to the Standard Library model, ie stm32f10x.h will try and include a project specific stm32f10x_conf.h Different chips also have more or less Interrupt Vectors and NVIC channels, so values defined within the include files differ, and you would need an appropriate startup_stm32f10x_??.s source file in your project. These things aren't materially specific to Keil or ST, all compilers/linkers and toolchains, expect these types of settings to control the behaviour and processing of files in a predictable way.2014-08-31 02:36 AM
For SPI you'd need to add the SPI library source file to your project, along with files handling RCC and GPIO, and whatever others are needed to achieve linkage.
STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_spi.c and the include paths must include STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\STM32F10x_StdPeriph_Driver\inc so stm32f10x_spi.h is findable.2014-08-31 09:34 AM
have you a simple spi project in keil 5.11a?
and a technical note of initialing and description of spi functions?tnks2014-08-31 10:46 AM
I don't, you'd want to install the STM32F1 standard peripheral library, and review the example projects/template.
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template\MDK-ARM STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\SPI\Simplex_Interrupt\readme.txt2014-09-02 11:55 AM
ex cuse me but i dont undrestand your mind
i can find that directoryi only need a good example of initialing spi in stm32f103 in keil 5 based on CMSIS libraryhow i can find a example or technical notes of initialing spi & its function with comments & decriptiontnks u2014-09-02 12:42 PM
Look, I don't provide the specific things you seek, you're going to have to review the available documentation for the tool chain you have chosen, contact their technical support for support/training available. You have access to the same internet search engines as I do, Google some topics, look at the API functions and locate some assorted examples and use cases that serve your needs.
The documentation for the ST Standard Peripheral Library comes in the form of a Microsoft Help file. STM32F10x_StdPeriph_Lib_V3.5.0\stm32f10x_stdperiph_lib_um.chm ST provides several firmware libraries, and evaluation boards for which they have a number of examples.http://www.cs.indiana.edu/~geobrown/book.pdf