Skip to main content
Skuma.18
Associate
May 30, 2019
Question

Fatal Error[Pe035]: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)" C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\CMSIS\DSP\Include\stm32f10x.h 96

  • May 30, 2019
  • 1 reply
  • 4611 views

Hi

I am trying to write a code using STM32f103r8t6, i have installed IAR for Arm v8.40.1 i started to create a project but i could not find any library files. and then by downloading an example file i got the library files as i tried to complile i m getting the above error in the preprocessor part i have selected the target

This topic has been closed for replies.

1 reply

YDann.7
Associate III
May 30, 2019

Hi,

I don't use IAR anymore but I will try to help you.

In my memories, IAR is not provided with the libraries. You need to download them on the ST site.

On the view, you you selected a target device but you didn't indicate a symbol to use as preprocessor.

To define a symbol, you need to go to the "C/C++ Compiler" category and add the symbol (STM32F103xB in your case (for STM32F103R8)) in the "preprocessor" tab.

Or you can uncomment the line corresponding to your device in the file "stm32f10x.h".