STM32 Std Peripherals Examples Missing
I have installed the following packages:
Generic ARM CPU Support Package 1.2
STMicroelectronics STM32 CPU Support Package 2.0
STMicroelectronics STM32F10x CPU Support Package 1.11
STMicroelectronics STM32F10x Standard Peripherals Library Updates 1.0
STMicroelectronics STM32F10x-EVAL Board Support Package 1.3
When I open STM3210E-EVAL.hzp it shows dozens of projects for excersising all the peripherals, great. But only a small set of these projects have source files. In other words, there are only four (Lib_DEBUG, NVIC, RTC, and USART) file folders in the STM32F10x_StdPeriph_Examples file folder. Where are the rest or have I done something incorrectly? Thanks.
-
The STM32F10x CPU and STM32F10x-EVAL Board support packages are for 1.x.
The STM32 CPU and STM32F10x Standard Peripherals Library Updates support packages are for 2.x. You need to install the Standard Peripherals Library from the ST website - the updates just add project files into the ST distribution.
-
Ok, I have seen where the package update puts the project files into the ST distribution. The problem is, the project files assume all example source files reside in the same file folder as the project itself. In fact, they exist in individual folders within the src folder, which is a sibling to the Projects folder that CW inserts.
A more global solution would be to reference the example source files absolutely using the $(STM32F10X_STDPERIPH_LIB) macro as is done with the "non-example" (i.e., std periph) source files. Take a look at the STM3210e-EVAL.hzp file, source folders section and you will see what I mean.
-
Scratch that, an absolute file reference would be dumb for an example because one is likely to move the example into their own folder as a starter for their own project. There is still an issue in that the CW STM3210E-EVAL.hzp example project will not build "out of the box". What we need is a CW readme explaining the steps to get to a buildable example project. Here are the steps I took:
Copy STM3210E-EVAL.hzp into MyProjectFolder
Edit STM3210E-EVAL-hzp with a text editor and remove all projects except those of interest. I kept only the SDIO project.
Copy the source files from $(STM32F10X_STDPERIPH_LIB)\Project\STM32F10x_StdPeriph_Examples\SDIO to MyProjectFolder\SDIO (again, SDIO was just my case)
Build it.
NOTE: If you want to to rename the solution, you can rename it CW, close the solution, then rename the .hzp file to match, then reopen it in CW with no ill effects.
-
Yes I have read the package documentation and it does gives some indication of what I ended up doing but not nearly enough detail. For one thing, there are example project source files in the stm32f10x_stdperiph_lib\Project folder and then there are std periph files in the stm32f10x_stdperiph_lib\Libraries folder. You don't want to move the std periph ones, just the project source files. It's a good way you structured the STM32-EVAL project files and I am new to Crossworks so things that aren't spelled out take me a bit longer to figure out. I mainly just wanted to document here, for other new users, the specific steps required. Thanks.
Please sign in to leave a comment.
Comments
5 comments