cancel
Showing results for 
Search instead for 
Did you mean: 

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

hossein hosseini
Associate II
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

1 REPLY 1
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 Venmo Up vote any posts that you find helpful, it shows what's working..