cancel
Showing results for 
Search instead for 
Did you mean: 

Im trying to learn how to use the STM32 Discovery kits, the STM32F469NI DISCO, by the IAR 8.50.1 . I added a code from the internet that should make the leds blink, but i got some errors

Smaud.1
Associate II

Fatal Error[Pe035]: #error directive: "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)" C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\src\flashloader\ST\FlashSTM32F4xx\inc\stm32f4xx.h 80 

i already choose the my kit STM32F469NI in the options and used in the preprocessor the path of the stm32f4xx.h file.

4 REPLIES 4
TDK
Guru

Go look at stm32f4xx.h and see why this error is triggered.

You need to #define STM32F469xx in your preprocessor macros somewhere. Typically this is done by a -DSTM32F469xx argument to the compiler in the options somewhere.

If you feel a post has answered your question, please click "Accept as Solution".
Smaud.1
Associate II

the error is this lines:

#if !defined (STM32F40XX) && !defined (STM32F427X) && !defined (STM32F429X)

 #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"

#endif

as one can see, there is no STM32F469, so that why it got triggered, but why there is no 69 ? and how do i fix it ?

Sounds like the code wasn't meant for your board. Probably each board has different LED pins.
If you feel a post has answered your question, please click "Accept as Solution".
Smaud.1
Associate II

the code ask for:

#include "stm32f4xx.h"

#include "stm32f4xx_rcc.h"

#include "stm32f4xx_gpio.h"

i fought this ,"stm32f4xx.h" , include my kit.