Skip to main content
LOKESH VASHISHTH
Associate III
May 19, 2018
Question

''Select first the target'' error

  • May 19, 2018
  • 2 replies
  • 5808 views
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

    This topic has been closed for replies.

    2 replies

    Nigel Meijer
    Associate
    May 19, 2018
    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.

    Tesla DeLorean
    Guru
    May 19, 2018
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..