cancel
Showing results for 
Search instead for 
Did you mean: 

How to build an example from ST distribution?

ozvena
Associate II
Posted on January 14, 2012 at 06:08

When I try to build an example from ST distribution: STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\IO_Toggle

I get an error complaining of missing stm32f4_discovery.h.

This header file is distributed in a folder with other .c .h and libPDMFilter_Keil.lib files. If I copy the missing .h and the corresponding .c file into the project folder, I get new errors…and I keep fixing them by copying of the missing files but it seems that there must be a better way.

What are the general steps for building of the examples? I am using CrossWorks IDE.

Thank you.

12 REPLIES 12
Posted on January 25, 2012 at 17:22

To run at startup :

Make sure that it is targeting FLASH (ie 0x08000000), and that it writes the program into the flash memory. It sounds like you are currently running from RAM.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ozvena
Associate II
Posted on January 25, 2012 at 17:28

That is a good point! Check the PDF from ST that explains how to setup your IDE. I am using IAR and the PDF lists the steps to set it up including the step clive1 mentioned.

mike_k_cook
Associate II
Posted on January 25, 2012 at 17:44

Thanks, I found out, so for anyone else following the thread they will know:-

To make the application startup from reset

Right click on the project node in the project explorer and select Properties...

In the properties window scroll down to the Preprocessor Options section.

Type STARTUP_FROM_RESET into the Preprocessor Definitions property editor.

Do this only in the release proprieties. The board needed a unplug / plug to get over the USB error message, but now it is running when I plug it into power and when I press the reset button.