Here's a newbie question. I'm doing the the example program that's listed in the gcc AVR libc documentation. I'm using the STK500 dev. board with a ATMEGA8515 and AVR Studio. The example provides a file iocompat.h that defines some device specific stuff. Here's a exerpt:
#if defined(__AVR_AT90S2313__) # define OC1 PB3 # define OCR OCR1 # define DDROC DDRB # define TIMER1_OVF_vect TIMER1_OVF1_vect #elif defined(__AVR_AT90S2333__) || defined(__AVR_AT90S4433__) # define OC1 PB1 # define DDROC DDRB # define OCR OCR1 #elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || \ defined(__AVR_AT90S4434__) || defined(__AVR_AT90S8535__) || \ defined(__AVR_ATmega163__) || defined(__AVR_ATmega8515__) || \ defined(__AVR_ATmega8535__) || \ defined(__AVR_ATmega164P__) || defined(__AVR_ATmega324P__) || \ defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__)
My question, where are these device constants defined? For example, I think (__AVR_AT90S8515__) is defined somewhere for my project but where. I've searched all the include headers that come with gcc and can't find it. Can a makefile define this somehow? Does AVR studio do it somehow by knowing I'm using a 8515? Is it getting built by some algorithm somewhere and that's why I can't find this string?
I'm baffled. Any insight is appreciated.