Skip to main content
hossein hosseini
Associate III
October 16, 2017
Question

why should i write somethings in Defined symbols in IAR(?)

  • October 16, 2017
  • 1 reply
  • 862 views
Posted on October 16, 2017 at 10:28

Hi;

i have a problem in my mind , that's i cant understand why should we

define

somethings like 'USE_STDPERIPH_DRIVER

STM32F103xE' in the Defined symbols box?!!

http://cttf.ir/wp-content/uploads/2017/06/IAR-Create-Project-jpg

and whydont we define this definition , our code give us many Error s ??

and if i want to see others Definition where can i found them??

so thanks.

iar defined-symbols

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
October 16, 2017
Posted on October 16, 2017 at 10:44

It is just a standard method used by compilers to allow us to use the same set of read-only library source across a broad range of parts and code styles without requiring external file dependancies. 

ST allows project specific defines in an stm32xyz_conf.h file which gets pulled if USE_STDPERIPH_DRIVER  is defined. A selection of other defines and include files get pulled in by that.

You could review the pre-processor output to see what the compiler is working with.

It is instructive to review the template projects and the meta data used by your chosen tool chain.

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