STM32 Std Peripherals Examples Missing

Comments

5 comments

  • Avatar
    Michael Johnson

    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.

    0
    Comment actions Permalink
  • Avatar
    Albert McGilvra

    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.

    0
    Comment actions Permalink
  • Avatar
    Albert McGilvra

    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.

     

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    I provided a template project file for each board - did you read the package documentation?

    0
    Comment actions Permalink
  • Avatar
    Albert McGilvra

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.