cancel
Showing results for 
Search instead for 
Did you mean: 

''Select first the target'' error

LOKESH VASHISHTH
Associate II
Posted on May 19, 2018 at 09:50

..\stm32f4 library\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h(122): error:  #35: #error directive: 'Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)'

plezse give me the solution of this error

2 REPLIES 2
Nigel Meijer
Associate II
Posted on May 19, 2018 at 14:35

It means your device is undefined.You need to add a preprocessor symbol to your project.

If you are using keil.

Project ->options for target 'project name' -> c/c++

Then add a symbol STM32F4xx symbol. (Replace the xx with your device type.)

You can look in stm32f4xx.h file for the options.

Posted on May 19, 2018 at 21:58

The STM32F429I-DISCO examples have the following defines in the project

USE_STDPERIPH_DRIVER,STM32F429_439xx,USE_DEFAULT_TIMEOUT_CALLBACK

USE_STDPERIPH_DRIVER,STM32F429_439xx,USE_STM32F429I_DISCO

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..