GCC - option to print all defined macros

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is a branch from topic "how to start writing in the end of an existing file? (SD Card)".

 

skeeve wrote:

IIRC gcc has an option that will tell it to print all defined macros.

 

clawson wrote:

Just for the record it is "-E -dM", but as Lee says, not relevant here.

 

I tried this option in a short program using Atmel Studio 6.2 and got an error (gcc output shown below).

 

Here is the where I set the gcc option:

 

This is the program

/*
 * Blink_Led_1MHz_Clk.c
 *
 * Created: 1/17/2016 10:11:21 PM
 *  Author: C
 *
 *
 * ATmega328P on Arduino Nano
 * 16MHz Ceramic Resonator
 * Reduce F_CPU to 1MHz
 */

 #define F_CPU 1000000UL

 #include <avr/io.h>
 #include <util/delay.h>

 void Blink4(void) {
   for (uint8_t i=0; i<4; i++) {
     PINB = (1<<PINB5);  // Toggle PB5 high/low
     _delay_ms(300);

     PINB = (1<<PINB5);  // Toggle PB5 high/low
     _delay_ms(300);
   }
 }

 int main(void)
 {

    CLKPR = (1<<CLKPCE); // enable clock div change
    CLKPR = (1<<CLKPS2); // set to div by 16

    DDRB |= (1<<PINB5);  // set PB5 as output pin

    while(1)
    {
       Blink4();
       _delay_ms(1500);
    }
 }

 

This is the GCC Build output:

------ Build started: Project: Blink_Led_1MHz_Clk, Configuration: Debug AVR ------
Build started.
Project "Blink_Led_1MHz_Clk.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Compiler.targets" from project "E:\_Files\Programming\Atmel_Studio_Projects\_Studio6\AVR\Blink_Led_1MHz_Clk\Blink_Led_1MHz_Clk.cproj" (target "Build" depends on it):
    Task "RunCompilerTask"
        Shell Utils Path C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils
        C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils\make.exe all
        Building file: .././Blink_Led_1MHz_Clk.c
        Invoking: AVR/GNU C Compiler : 4.8.1
        "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1061\avr8-gnu-toolchain\bin\avr-gcc.exe"  -x c -funsigned-char -funsigned-bitfields -DDEBUG  -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -c -std=gnu99 -E -dM -MD -MP -MF "Blink_Led_1MHz_Clk.d" -MT"Blink_Led_1MHz_Clk.d" -MT"Blink_Led_1MHz_Clk.o"   -o "Blink_Led_1MHz_Clk.o" ".././Blink_Led_1MHz_Clk.c"
        Finished building: .././Blink_Led_1MHz_Clk.c
        Building target: Blink_Led_1MHz_Clk.elf
        Invoking: AVR/GNU Linker : 4.8.1
        "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1061\avr8-gnu-toolchain\bin\avr-gcc.exe" -o Blink_Led_1MHz_Clk.elf  Blink_Led_1MHz_Clk.o   -Wl,-Map="Blink_Led_1MHz_Clk.map" -Wl,--start-group -Wl,-lm  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328p  
        Blink_Led_1MHz_Clk.o: file not recognized: File format not recognized
collect2.exe(0,0): error: ld returned 1 exit status
        make: *** [Blink_Led_1MHz_Clk.elf] Error 1
        The command exited with code 2.
    Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "Blink_Led_1MHz_Clk.cproj" -- FAILED.
Done building project "Blink_Led_1MHz_Clk.cproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

 

I appreciate any help you can provide.

 

Edit:  When I build without the "-E -dM" option, there are no build errors and the firmware runs correctly.

 

Last Edited: Sat. Sep 17, 2016 - 10:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, for one thing: 

-E

-E

 

Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.

 

https://gcc.gnu.org/onlinedocs/g...

 

So the rest of the build is bound to fail, because it's not generating an object file - on which the rest of the build depends!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For "-dM", see "-dCHARS" on this page: https://gcc.gnu.org/onlinedocs/g...

 

Note: when googling, you have to enclose these things in quotes - otherwise google interprets the '-' to mean "ignore"

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil is right: you're build is doomed to failed with -E, try it from the command line instead.
 

ɴᴇᴛɪᴢᴇᴎ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

netizen wrote:
you're build is doomed to failed with -E, try it from the command line instead.

This is what I get with your program:

$ avr-gcc -mmcu=atmega328 -Os -E -dM chuck.c
#define PORT0 0
#define PRIXFAST32 "lX"
#define INT0 0
#define INT1 1
#define __DBL_MIN_EXP__ (-125)
#define __HQ_FBIT__ 15
#define PRADC 0
#define M_SQRT1_2 0.70710678118654752440
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define __UINT_LEAST16_MAX__ 65535U
#define OCF0B 2
#define __ATOMIC_ACQUIRE 2
#define OCF1A 1
#define OCF1B 2
#define __SFRACT_IBIT__ 0
#define __FLT_MIN__ 1.17549435e-38F
#define __GCC_IEC_559_COMPLEX 0
#define __BUILTIN_AVR_SLEEP 1
#define __BUILTIN_AVR_COUNTLSULLK 1
#define __BUILTIN_AVR_COUNTLSULLR 1
#define OCF2B 2
#define __UFRACT_MAX__ 0XFFFFP-16UR
#define __UINT_LEAST8_TYPE__ unsigned char
#define fmaxf fmax
#define WGM20 0
#define INT_LEAST16_MIN INT16_MIN
#define FUSE_BOOTRST (unsigned char)~_BV(0)
#define PRIuPTR PRIu16
#define __DQ_FBIT__ 63
#define __INTMAX_C(c) c ## LL
#define __ULFRACT_FBIT__ 32
#define __SACCUM_EPSILON__ 0x1P-7HK
#define __CHAR_BIT__ 8
#define EEAR _SFR_IO16(0x21)
#define FE0 4
#define __USQ_IBIT__ 0
#define __UINT8_MAX__ 255
#define ACI 4
#define EECR _SFR_IO8(0x1F)
#define __ACCUM_FBIT__ 15
#define INT16_C(value) value
#define __WINT_MAX__ 32767
#define LB_MODE_1 (0xFF)
#define LB_MODE_3 (0xFC)
#define UBRR0_0 0
#define UBRR0_1 1
#define UBRR0_2 2
#define UBRR0_3 3
#define UBRR0_4 4
#define UBRR0_5 5
#define UBRR0_6 6
#define UBRR0_7 7
#define UBRR0_8 0
#define UBRR0_9 1
#define EEDR _SFR_IO8(0x20)
#define INT8_MAX 0x7f
#define EEDR1 1
#define EEDR2 2
#define EEDR3 3
#define EEDR4 4
#define UINT_LEAST64_MAX UINT64_MAX
#define EEDR6 6
#define EEDR7 7
#define ANALOG_COMP_vect _VECTOR(23)
#define FUSE_RSTDISBL (unsigned char)~_BV(7)
#define TIMER0_OVF_vect _VECTOR(16)
#define __USFRACT_FBIT__ 8
#define AVR_STACK_POINTER_HI_ADDR _SFR_IO_ADDR(SPH)
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 65535U
#define SPCR _SFR_IO8(0x2C)
#define FUSE_WDTON (unsigned char)~_BV(4)
#define __WCHAR_MAX__ 32767
#define SPDR _SFR_IO8(0x2E)
#define INT16_MAX 0x7fff
#define M_E 2.7182818284590452354
#define ACBG 6
#define __LACCUM_IBIT__ 32
#define __DBL_DENORM_MIN__ ((double)1.40129846e-45L)
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
#define __GCC_IEC_559 0
#define SLEEP_MODE_STANDBY (0x06<<1)
#define TIMER1_CAPT_vect _VECTOR(10)
#define SREG_C (0)
#define SREG_H (5)
#define SREG_I (7)
#define SREG_N (2)
#define SREG_S (4)
#define SREG_T (6)
#define __FLT_EVAL_METHOD__ 0
#define SREG_V (3)
#define SREG_Z (1)
#define __BUILTIN_AVR_LLKBITS 1
#define __LLACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-47LLK
#define M_PI 3.14159265358979323846
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
#define ISC11 3
#define __BUILTIN_AVR_HKBITS 1
#define SPIE 7
#define SPIF 7
#define INT8_MIN (-INT8_MAX - 1)
#define PORTB0 0
#define PORTB1 1
#define PORTB2 2
#define PORTB3 3
#define PORTB4 4
#define PORTB5 5
#define PORTB6 6
#define PORTB7 7
#define TXB80 0
#define __BUILTIN_AVR_BITSLLK 1
#define __FRACT_FBIT__ 15
#define __BUILTIN_AVR_BITSLLR 1
#define PD3 PORTD3
#define CS00 0
#define CS01 1
#define PORTC0 0
#define PORTC1 1
#define PORTC2 2
#define PORTC3 3
#define PORTC4 4
#define PORTC5 5
#define PORTC6 6
#define CS10 0
#define CS11 1
#define CS12 2
#define PORTD0 0
#define PORTD1 1
#define PORTD2 2
#define __UINT_FAST64_MAX__ 18446744073709551615ULL
#define PORTD4 4
#define PORTD5 5
#define PORTD6 6
#define __SIG_ATOMIC_TYPE__ char
#define ACIC 2
#define ACIE 3
#define __BUILTIN_AVR_UHKBITS 1
#define SELFPRGEN 0
#define __UACCUM_FBIT__ 16
#define __DBL_MIN_10_EXP__ (-37)
#define INT16_MIN (-INT16_MAX - 1)
#define CS20 0
#define CS21 1
#define CS22 2
#define __FINITE_MATH_ONLY__ 0
#define EEPE 1
#define UINTMAX_C(value) __CONCAT(value, ULL)
#define ldexpf ldexp
#define MPCM0 0
#define __FLASH 1
#define TCNT1H4 4
#define TIMER1_CAPT_vect_num 10
#define PRIxPTR PRIx16
#define TCNT1H6 6
#define __LFRACT_IBIT__ 0
#define __GNUC_PATCHLEVEL__ 2
#define EERE 0
#define __AVR_MEGA__ 1
#define __LFRACT_MAX__ 0X7FFFFFFFP-31LR
#define ACME 6
#define __UINT_FAST8_MAX__ 255
#define FUSE_DWEN (unsigned char)~_BV(6)
#define __has_include(STR) __has_include__(STR)
#define PIN0 0
#define PIN1 1
#define PIN2 2
#define PIN3 3
#define PIN4 4
#define PIN5 5
#define PIN6 6
#define PIN7 7
#define PINB _SFR_IO8(0x03)
#define PINC _SFR_IO8(0x06)
#define PIND _SFR_IO8(0x09)
#define INT_FAST8_MAX INT8_MAX
#define __DEC64_MAX_EXP__ 385
#define PCINT1_vect_num 4
#define __INT8_C(c) c
#define SPR0 0
#define SPR1 1
#define TCR2BUB 0
#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
#define E2PAGESIZE 4
#define __SA_FBIT__ 15
#define powf pow
#define _AVR_FUSE_H_ 1
#define BLB0_MODE_1 (0xFF)
#define BLB0_MODE_2 (0xFB)
#define BLB0_MODE_3 (0xF3)
#define BLB0_MODE_4 (0xF7)
#define SPSR _SFR_IO8(0x2D)
#define __SHRT_MAX__ 32767
#define TWSR _SFR_MEM8(0xB9)
#define __LDBL_MAX__ 3.40282347e+38L
#define __FRACT_MAX__ 0X7FFFP-15R
#define fmodf fmod
#define IVCE 0
#define PCINT6 6
#define __UFRACT_FBIT__ 16
#define ACSR _SFR_IO8(0x30)
#define UPM00 4
#define UPM01 5
#define FOC0A 7
#define FOC0B 6
#define USART_TX_vect_num 20
#define SCNd16 "d"
#define __UFRACT_MIN__ 0.0UR
#define __UINT_LEAST8_MAX__ 255
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
#define FOC1A 7
#define FOC1B 6
#define USART_TX_vect _VECTOR(20)
#define sinhf sinh
#define RXEN0 4
#define TWGCE 0
#define __UINTMAX_TYPE__ long long unsigned int
#define FOC2A 7
#define FOC2B 6
#define WDT_vect_num 6
#define __LLFRACT_EPSILON__ 0x1P-63LLR
#define INT_FAST8_MIN INT8_MIN
#define SCNd32 "ld"
#define __BUILTIN_AVR_DELAY_CYCLES 1
#define __DEC32_EPSILON__ 1E-6DF
#define SPI_STC_vect_num 17
#define bit_is_clear(sfr,bit) (!(_SFR_BYTE(sfr) & _BV(bit)))
#define __OPTIMIZE__ 1
#define SCNo16 "o"
#define EIFR _SFR_IO8(0x1C)
#define __UINT32_MAX__ 4294967295UL
#define ICNC1 7
#define __ULFRACT_MAX__ 0XFFFFFFFFP-32ULR
#define __TA_IBIT__ 16
#define TCR2AUB 1
#define EE_READY_vect_num 22
#define __LDBL_MAX_EXP__ 128
#define SCNo32 "lo"
#define _AVR_SFR_DEFS_H_ 1
#define USART_RX_vect _VECTOR(18)
#define SCNuLEAST16 "u"
#define UINT_FAST16_MAX UINT16_MAX
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define PGWRT 2
#define UINT16_C(value) __CONCAT(value, U)
#define SCNuLEAST32 "lu"
#define COM0A0 6
#define COM0A1 7
#define ADATE 5
#define COM0B0 4
#define COM0B1 5
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
#define fminf fmin
#define __ULLFRACT_MIN__ 0.0ULLR
#define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr) + __SFR_OFFSET)
#define __SCHAR_MAX__ 127
#define TIMER0_COMPB_vect_num 15
#define PCINT0 0
#define PCINT1 1
#define PCINT2 2
#define PCINT3 3
#define PCINT4 4
#define PCINT5 5
#define PCINT7 7
#define PCINT8 0
#define PCINT9 1
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define GPIOR20 0
#define SCNxFAST16 "x"
#define __INT64_C(c) c ## LL
#define UCSR0A _SFR_MEM8(0xC0)
#define UCSR0B _SFR_MEM8(0xC1)
#define UCSR0C _SFR_MEM8(0xC2)
#define __DBL_DIG__ 6
#define __AVR_LIBC_VERSION__ 10800UL
#define _AVR_PORTPINS_H_ 1
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
#define SLEEP_MODE_PWR_DOWN (0x02<<1)
#define SCNxFAST32 "lx"
#define __AVR_HAVE_SPH__ 1
#define __LLACCUM_MIN__ (-0X1P15LLK-0X1P15LLK)
#define __BUILTIN_AVR_KBITS 1
#define __AVR_LIBC_DATE_ 20111229UL
#define __BUILTIN_AVR_ABSK 1
#define __BUILTIN_AVR_ABSR 1
#define __SIZEOF_INT__ 2
#define __SIZEOF_POINTER__ 2
#define SPI2X 0
#define WDCE 4
#define PRIuLEAST16 "u"
#define OCF0A 1
#define squaref square
#define __USACCUM_IBIT__ 8
#define PRIuFAST16 "u"
#define __USER_LABEL_PREFIX__
#define EICRA _SFR_MEM8(0x69)
#define PRIuLEAST32 "lu"
#define TCNT2_0 0
#define TCNT2_1 1
#define TCNT2_2 2
#define TCNT2_3 3
#define TCNT2_4 4
#define TCNT2_5 5
#define TCNT2_6 6
#define TCNT2_7 7
#define tanhf tanh
#define PRIuFAST32 "lu"
#define __CONCAT(left,right) __CONCATenate(left, right)
#define UINT8_MAX (__CONCAT(INT8_MAX, U) * 2U + 1U)
#define ISC10 2
#define __STDC_HOSTED__ 1
#define SPI_STC_vect _VECTOR(17)
#define NAN __builtin_nan("")
#define __LDBL_HAS_INFINITY__ 1
#define TOV0 0
#define TOV1 0
#define TOV2 0
#define PINB6 6
#define __AVR_LIBC_MAJOR__ 1
#define EXTRF 1
#define WDIE 6
#define WDIF 7
#define __LFRACT_MIN__ (-0.5LR-0.5LR)
#define __HA_IBIT__ 8
#define EEAR0 0
#define EEAR1 1
#define EEAR2 2
#define EEAR3 3
#define EEAR4 4
#define EEAR5 5
#define EEAR6 6
#define EEAR7 7
#define EEAR8 0
#define EEAR9 1
#define __TQ_IBIT__ 0
#define EEARH _SFR_IO8(0x22)
#define RXB80 1
#define EEARL _SFR_IO8(0x21)
#define __FLT_EPSILON__ 1.19209290e-7F
#define PGERS 1
#define RAMSTART (0x100)
#define SMCR _SFR_IO8(0x33)
#define UDR0_4 4
#define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
#define UDR0_5 5
#define __USFRACT_IBIT__ 0
#define __LDBL_MIN__ 1.17549435e-38L
#define AVR_STATUS_REG SREG
#define __FRACT_MIN__ (-0.5R-0.5R)
#define TIMER0_COMPA_vect _VECTOR(14)
#define __AVR_SFR_OFFSET__ 0x20
#define __DEC32_MAX__ 9.999999E96DF
#define __AVR_HAVE_PRR_PRTIM0
#define __AVR_HAVE_PRR_PRTIM1
#define __AVR_HAVE_PRR_PRTIM2
#define __DA_IBIT__ 32
#define WDP0 0
#define WDP1 1
#define WDP2 2
#define WDP3 5
#define CLKPS0 0
#define LOCKBITS_DEFAULT (0xFF)
#define PCINT0_vect_num 3
#define __AVR_LIBC_VERSION_STRING__ "1.8.0svn"
#define SLEEP_MODE_ADC (0x01<<1)
#define GPIOR00 0
#define GPIOR01 1
#define __INT32_MAX__ 2147483647L
#define GPIOR03 3
#define GPIOR04 4
#define GPIOR06 6
#define GPIOR07 7
#define OCR1BH0 0
#define OCR1BH1 1
#define OCR1BH2 2
#define OCR1BH3 3
#define OCR1BH4 4
#define OCR1BH5 5
#define SCNoLEAST16 "o"
#define OCR1BH7 7
#define WDRF 3
#define __UQQ_FBIT__ 8
#define __SIZEOF_LONG__ 4
#define __UACCUM_MAX__ 0XFFFFFFFFP-16UK
#define GPIOR10 0
#define GPIOR11 1
#define GPIOR12 2
#define GPIOR13 3
#define GPIOR14 4
#define GPIOR15 5
#define GPIOR16 6
#define GPIOR17 7
#define PRIoFAST16 "o"
#define GPIOR21 1
#define __UINT16_C(c) c ## U
#define GPIOR23 3
#define GPIOR24 4
#define GPIOR25 5
#define GPIOR26 6
#define GPIOR27 7
#define M_2_PI 0.63661977236758134308
#define SCNoLEAST32 "lo"
#define ZH r31
#define __DECIMAL_DIG__ 9
#define __LFRACT_EPSILON__ 0x1P-31LR
#define RWWSRE 4
#define CAL1 1
#define CAL3 3
#define CAL4 4
#define CAL5 5
#define CAL6 6
#define CAL7 7
#define __AVR_2_BYTE_PC__ 1
#define SCNdLEAST16 "d"
#define OCR1AH _SFR_MEM8(0x89)
#define PRIoFAST32 "lo"
#define OCR1AL _SFR_MEM8(0x88)
#define __ULFRACT_MIN__ 0.0ULR
#define INT_FAST16_MAX INT16_MAX
#define OCR1BL0 0
#define OCR1BL1 1
#define OCR1BL2 2
#define OCR1BL3 3
#define OCR1BL4 4
#define OCR1BL5 5
#define OCR1BL6 6
#define OCR1BL7 7
#define __has_include_next(STR) __has_include_next__(STR)
#define OCR1BH _SFR_MEM8(0x8B)
#define OCR1BL _SFR_MEM8(0x8A)
#define __ATTR_CONST__ __attribute__((__const__))
#define SIGRD 5
#define ADPS0 0
#define ADPS1 1
#define _VECTOR(N) __vector_ ## N
#define SCNdLEAST32 "ld"
#define __BUILTIN_AVR_ULLRBITS 1
#define PTRDIFF_MAX INT16_MAX
#define TCNT1H _SFR_MEM8(0x85)
#define PRIX8 "X"
#define _AVR_IOXXX_H_ "iom328p.h"
#define __LDBL_HAS_QUIET_NAN__ 1
#define INT64_C(value) __CONCAT(value, LL)
#define PINC0 0
#define _SFR_MEM8(mem_addr) _MMIO_BYTE(mem_addr)
#define __ULACCUM_IBIT__ 32
#define PRIoLEAST16 "o"
#define __UACCUM_EPSILON__ 0x1P-16UK
#define log10f log10
#define PRTWI 7
#define __BUILTIN_AVR_SEI 1
#define __SFR_OFFSET 0x20
#define __GNUC__ 4
#define __ULLACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-48ULLK
#define __HQ_IBIT__ 0
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0)
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1)
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2)
#define __BUILTIN_AVR_SWAP 1
#define OCR0B _SFR_IO8(0x28)
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 4
#define __LOCK_BITS_EXIST
#define PRIoLEAST32 "lo"
#define OCR1A _SFR_MEM16(0x88)
#define OCR1B _SFR_MEM16(0x8A)
#define INTF0 0
#define INTF1 1
#define INT_FAST16_MIN INT16_MIN
#define PRIdLEAST16 "d"
#define OCR2A _SFR_MEM8(0xB3)
#define OCR2B _SFR_MEM8(0xB4)
#define __BIGGEST_ALIGNMENT__ 1
#define PTRDIFF_MIN INT16_MIN
#define loop_until_bit_is_clear(sfr,bit) do { } while (bit_is_set(sfr, bit))
#define TIMER0_COMPA_vect_num 14
#define __UINT24_MAX__ 16777215UL
#define PRIdLEAST32 "ld"
#define EEPM0 4
#define EEPM1 5
#define __BUILTIN_AVR_NOP 1
#define ADCL2 2
#define ICES1 6
#define __DQ_IBIT__ 0
#define TWA0 1
#define TWA1 2
#define TWA2 3
#define TWA3 4
#define TWA4 5
#define TWA5 6
#define TWA6 7
#define __DBL_MAX__ ((double)3.40282347e+38L)
#define TWAR _SFR_MEM8(0xBA)
#define PRIiFAST16 "i"
#define __ULFRACT_IBIT__ 0
#define CAL2 2
#define __INT_FAST32_MAX__ 2147483647L
#define __DBL_HAS_INFINITY__ 1
#define TWBR _SFR_MEM8(0xB8)
#define FUSE_MEMORY_SIZE 3
#define PRId8 "d"
#define PRIiFAST32 "li"
#define TWCR _SFR_MEM8(0xBC)
#define PRIi16 "i"
#define USBS0 3
#define TWD0 0
#define TWD1 1
#define TWD2 2
#define TWD3 3
#define TWD4 4
#define __ACCUM_IBIT__ 16
#define TWD6 6
#define TWD7 7
#define TWDR _SFR_MEM8(0xBB)
#define LOCKMEM __attribute__((__used__, __section__ (".lock")))
#define __DEC32_MIN_EXP__ (-94)
#define TWEA 6
#define TIMER0_COMPB_vect _VECTOR(15)
#define _AVR_COMMON_H
#define __BUILTIN_AVR_UKBITS 1
#define TWEN 2
#define PRIi32 "li"
#define ADCH _SFR_MEM8(0x79)
#define ADCL _SFR_MEM8(0x78)
#define ADCW _SFR_MEM16(0x78)
#define ISC00 0
#define ISC01 1
#define __BUILTIN_AVR_FMULSU 1
#define __LACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-31LK
#define OCF2A 1
#define PINB0 0
#define PINB1 1
#define PINB2 2
#define PINB3 3
#define PINB4 4
#define PINB5 5
#define PINB7 7
#define __INT_FAST16_TYPE__ int
#define MCUCR _SFR_IO8(0x35)
#define _VECTORS_SIZE (26 * 4)
#define ADEN 7
#define lroundf lround
#define PRIi8 "i"
#define PINC1 1
#define PINC2 2
#define PINC3 3
#define PINC4 4
#define PINC5 5
#define PINC6 6
#define AVR_STACK_POINTER_HI_REG SPH
#define UINT_LEAST8_MAX UINT8_MAX
#define __LDBL_HAS_DENORM__ 1
#define OCR1AH1 1
#define PIND0 0
#define PIND1 1
#define PIND2 2
#define PIND3 3
#define SCNiLEAST16 "i"
#define PIND5 5
#define PIND6 6
#define PIND7 7
#define TWIE 0
#define isinff isinf
#define DDC2 2
#define __BUILTIN_AVR_BITSK 1
#define __BUILTIN_AVR_BITSR 1
#define ICIE1 5
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 2147483647L
#define INFINITY __builtin_inf()
#define __USING_SJLJ_EXCEPTIONS__ 1
#define _GCC_WRAP_STDINT_H
#define DDC5 5
#define __DEC32_MIN__ 1E-95DF
#define PIND4 4
#define CPHA 2
#define SCNiLEAST32 "li"
#define __ACCUM_MAX__ 0X7FFFFFFFP-15K
#define ADIE 3
#define ADIF 4
#define AVR_STACK_POINTER_ADDR _SFR_IO_ADDR(SP)
#define SPMEN 0
#define __DBL_MAX_EXP__ 128
#define MUX0 0
#define MUX1 1
#define MUX2 2
#define MUX3 3
#define __USACCUM_EPSILON__ 0x1P-8UHK
#define ICR1L _SFR_MEM8(0x86)
#define UDRIE0 5
#define __AVR_HAVE_PRR ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI))
#define TCCR0A _SFR_IO8(0x24)
#define TCCR0B _SFR_IO8(0x25)
#define __DEC128_EPSILON__ 1E-33DL
#define ADC_vect_num 21
#define UCSZ00 1
#define UCSZ01 2
#define UCSZ02 2
#define AIN0D 0
#define ADCH0 0
#define ADTS2 2
#define __SFRACT_MAX__ 0X7FP-7HR
#define __FRACT_IBIT__ 0
#define TCCR1A _SFR_MEM8(0x80)
#define TCCR1B _SFR_MEM8(0x81)
#define TCCR1C _SFR_MEM8(0x82)
#define PRIo8 "o"
#define __PTRDIFF_MAX__ 32767
#define AIN1D 1
#define __UACCUM_MIN__ 0.0UK
#define TCCR2A _SFR_MEM8(0xB0)
#define TCCR2B _SFR_MEM8(0xB1)
#define OCR0A _SFR_IO8(0x27)
#define __AVR_ENHANCED__ 1
#define SCNdFAST16 "d"
#define __UACCUM_IBIT__ 16
#define SPMIE 7
#define __BUILTIN_AVR_WDR 1
#define PRIx8 "x"
#define AVR_STACK_POINTER_LO_REG SPL
#define SCNdFAST32 "ld"
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define CPOL 3
#define __SIZEOF_SIZE_T__ 2
#define __ULACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULK
#define PRIiLEAST16 "i"
#define OCR2AUB 3
#define SCNiPTR SCNi16
#define TWS3 3
#define TWS4 4
#define TWS5 5
#define TWS6 6
#define TWS7 7
#define TWI_vect_num 24
#define PRIu8 "u"
#define SIZE_MAX (__CONCAT(INT16_MAX, U))
#define __SIZEOF_WINT_T__ 2
#define PRIxLEAST8 "x"
#define UCPOL0 0
#define PRIiLEAST32 "li"
#define UINT64_C(value) __CONCAT(value, ULL)
#define MCUSR _SFR_IO8(0x34)
#define INT32_MIN (-INT32_MAX - 1L)
#define ADSC 6
#define DDB0 0
#define DDB1 1
#define DDB2 2
#define DDB3 3
#define DDB4 4
#define DDB5 5
#define DDB6 6
#define DDB7 7
#define DDC0 0
#define DDC1 1
#define __SA_IBIT__ 16
#define DDC3 3
#define DDC4 4
#define PRIiFAST8 "i"
#define DDC6 6
#define UINTPTR_MAX UINT16_MAX
#define __ULLACCUM_MIN__ 0.0ULLK
#define TWWC 3
#define __BUILTIN_AVR_ROUNDUHK 1
#define __BUILTIN_AVR_ROUNDUHR 1
#define DDD0 0
#define DDD1 1
#define DDD2 2
#define DDD3 3
#define DDD4 4
#define DDD5 5
#define DDD6 6
#define DDD7 7
#define __GXX_ABI_VERSION 1002
#define __INT24_MAX__ 8388607L
#define __UTA_FBIT__ 48
#define WDE 3
#define __FLT_MIN_EXP__ (-125)
#define _AVR_IOM328P_H_ 1
#define _SFR_IO_REG_P(sfr) (_SFR_MEM_ADDR(sfr) < 0x40 + __SFR_OFFSET)
#define __USFRACT_MAX__ 0XFFP-8UHR
#define __UFRACT_IBIT__ 0
#define M_LOG2E 1.4426950408889634074
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
#define __BUILTIN_AVR_ROUNDFX 1
#define __BUILTIN_AVR_ROUNDULK 1
#define __BUILTIN_AVR_ROUNDULR 1
#define TIMER2_COMPB_vect_num 8
#define UDRE0 5
#define USART_UDRE_vect_num 19
#define __BUILTIN_AVR_COUNTLSLLK 1
#define __BUILTIN_AVR_COUNTLSLLR 1
#define __BUILTIN_AVR_ROUNDHK 1
#define __INT_FAST64_TYPE__ long long int
#define __BUILTIN_AVR_ROUNDHR 1
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
#define atan2f atan2
#define _SFR_ASM_COMPAT 0
#define __DBL_MIN__ ((double)1.17549435e-38L)
#define PRIx16 "x"
#define COM1A0 6
#define COM1A1 7
#define COM1B0 4
#define COM1B1 5
#define FLASHEND 0x7FFF
#define __USING_MINT8 0
#define __BUILTIN_AVR_COUNTLSK 1
#define PRIx32 "lx"
#define __BUILTIN_AVR_ROUNDLK 1
#define __BUILTIN_AVR_COUNTLSR 1
#define __BUILTIN_AVR_ROUNDLR 1
#define CLKPCE 7
#define TXCIE0 6
#define RAMEND 0x8FF
#define TWI_vect _VECTOR(24)
#define __LACCUM_MIN__ (-0X1P31LK-0X1P31LK)
#define cosf cos
#define PCINT0_vect _VECTOR(3)
#define __ULLACCUM_FBIT__ 48
#define ADMUX _SFR_MEM8(0x7C)
#define SPM_READY_vect _VECTOR(25)
#define INT_LEAST8_MAX INT8_MAX
#define OCIE0A 1
#define OCIE0B 2
#define __BOOT_LOCK_BITS_0_EXIST
#define __BUILTIN_AVR_LKBITS 1
#define _AVR_IO_H_
#define OCIE1A 1
#define OCIE1B 2
#define __ULLFRACT_EPSILON__ 0x1P-64ULLR
#define DDRB _SFR_IO8(0x04)
#define DDRC _SFR_IO8(0x07)
#define DDRD _SFR_IO8(0x0A)
#define OCIE2A 1
#define OCIE2B 2
#define __DEC128_MIN__ 1E-6143DL
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 65535U
#define __AVR_HAVE_PRR_PRSPI
#define _HAVE_AVR_STACK_POINTER_HI 1
#define __DBL_HAS_DENORM__ 1
#define INT_LEAST32_MAX INT32_MAX
#define copysignf copysign
#define __BUILTIN_AVR_ULKBITS 1
#define __ACCUM_MIN__ (-0X1P15K-0X1P15K)
#define __AVR_ARCH__ 5
#define _SFR_IO16(io_addr) _MMIO_WORD((io_addr) + __SFR_OFFSET)
#define __SQ_IBIT__ 0
#define DD0 0
#define DD1 1
#define DD2 2
#define DD3 3
#define DD4 4
#define DD5 5
#define DD6 6
#define DD7 7
#define DOR0 3
#define __UINT8_TYPE__ unsigned char
#define _SFR_IO_ADDR(sfr) (_SFR_MEM_ADDR(sfr) - __SFR_OFFSET)
#define DORD 5
#define __BUILTIN_AVR_ROUNDUK 1
#define __BUILTIN_AVR_ROUNDUR 1
#define __UHA_FBIT__ 8
#define __SFRACT_MIN__ (-0.5HR-0.5HR)
#define frexpf frexp
#define __UTQ_FBIT__ 128
#define ANALOG_COMP_vect_num 23
#define __AVR_HAVE_PRR_PRADC
#define __FLT_MANT_DIG__ 24
#define INT_LEAST8_MIN INT8_MIN
#define TWSTA 5
#define __VERSION__ "4.9.2"
#define TWSTO 4
#define UINT_LEAST16_MAX UINT16_MAX
#define __UINT64_C(c) c ## ULL
#define PRIXLEAST16 "X"
#define __ULLFRACT_FBIT__ 64
#define SCNi16 "i"
#define CS02 2
#define EEMPE 2
#define __FRACT_EPSILON__ 0x1P-15R
#define __ULACCUM_MIN__ 0.0ULK
#define INT_LEAST32_MIN INT32_MIN
#define PRIXLEAST32 "lX"
#define __UDA_FBIT__ 32
#define sinf sin
#define SCNi32 "li"
#define __MEMX 1
#define CLKPS1 1
#define CLKPS2 2
#define CLKPS3 3
#define ASSR _SFR_MEM8(0xB6)
#define __LLACCUM_EPSILON__ 0x1P-47LLK
#define __GCC_ATOMIC_INT_LOCK_FREE 1
#define E2END 0x3FF
#define INT1_vect_num 2
#define ceilf ceil
#define __BUILTIN_AVR_BITSUHK 1
#define __BUILTIN_AVR_BITSUHR 1
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define TWAM0 0
#define TWAM1 1
#define TWAM2 2
#define TWAM3 3
#define TWAM4 4
#define TWAM5 5
#define EXCLK 6
#define SCNoPTR SCNo16
#define __USFRACT_MIN__ 0.0UHR
#define TWAMR _SFR_MEM8(0xBD)
#define SIG_ATOMIC_MAX INT8_MAX
#define TIMER0_OVF_vect_num 16
#define UDR0 _SFR_MEM8(0xC6)
#define SPM_READY_vect_num 25
#define __CONCATenate(left,right) left ## right
#define INT32_MAX 0x7fffffffL
#define __BUILTIN_AVR_BITSULK 1
#define __BUILTIN_AVR_BITSULR 1
#define __UQQ_IBIT__ 0
#define DIDR0 _SFR_MEM8(0x7E)
#define DIDR1 _SFR_MEM8(0x7F)
#define __BUILTIN_AVR_LLRBITS 1
#define __BUILTIN_AVR_BITSULLK 1
#define __BUILTIN_AVR_BITSULLR 1
#define PCINT1_vect _VECTOR(4)
#define __INT32_C(c) c ## L
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __UHQ_FBIT__ 16
#define EFUSE_DEFAULT (0xFF)
#define __LLACCUM_FBIT__ 47
#define __BUILTIN_AVR_ROUNDULLK 1
#define __BUILTIN_AVR_ROUNDULLR 1
#define TIMER1_COMPA_vect _VECTOR(11)
#define __INT_FAST32_TYPE__ long int
#define __BUILTIN_AVR_HRBITS 1
#define TIMER2_COMPA_vect_num 7
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
#define TIMER1_OVF_vect_num 13
#define ADC0D 0
#define SIG_ATOMIC_MIN INT8_MIN
#define __UINT_LEAST16_TYPE__ unsigned int
#define PRIuFAST8 "u"
#define GPIOR02 2
#define SIGNATURE_0 0x1E
#define SIGNATURE_1 0x95
#define SIGNATURE_2 0x14
#define ADC1D 1
#define LOCKBITS unsigned char __lock LOCKMEM
#define GPIOR05 5
#define __BUILTIN_AVR_UHRBITS 1
#define PRUSART0 1
#define ADC2D 2
#define __INT16_MAX__ 32767
#define FUSE_SPIEN (unsigned char)~_BV(5)
#define __SIZE_TYPE__ unsigned int
#define M_2_SQRTPI 1.12837916709551257390
#define __UINT64_MAX__ 18446744073709551615ULL
#define __UDQ_FBIT__ 64
#define ADC3D 3
#define PORTD3 3
#define ADC4D 4
#define __INT8_TYPE__ signed char
#define PORTD7 7
#define EE_READY_vect _VECTOR(22)
#define __ELF__ 1
#define ADC5D 5
#define AVR_STACK_POINTER_LO_ADDR _SFR_IO_ADDR(SPL)
#define PCINT10 2
#define PCINT11 3
#define PCINT12 4
#define PCINT13 5
#define PCINT14 6
#define PCINT16 0
#define PCINT17 1
#define PCINT18 2
#define PCINT19 3
#define __ULFRACT_EPSILON__ 0x1P-32ULR
#define __LLFRACT_FBIT__ 63
#define PCINT20 4
#define PCINT21 5
#define PCINT22 6
#define __FLT_RADIX__ 2
#define PRIdLEAST8 "d"
#define __INT_LEAST16_TYPE__ int
#define __BUILTIN_AVR_ABSFX 1
#define __LDBL_EPSILON__ 1.19209290e-7L
#define INTPTR_MAX INT16_MAX
#define __UINTMAX_C(c) c ## ULL
#define XRAMSIZE 0
#define CLKPR _SFR_MEM8(0x61)
#define PRTIM0 5
#define PRTIM1 3
#define PRTIM2 6
#define __INT24_MIN__ (-__INT24_MAX__-1)
#define SCNdPTR SCNd16
#define SCNxLEAST16 "x"
#define __SACCUM_MAX__ 0X7FFFP-7HK
#define __BUILTIN_AVR_ABSHK 1
#define SREG _SFR_IO8(0x3F)
#define __BUILTIN_AVR_ABSHR 1
#define isnanf isnan
#define SCNx16 "x"
#define __SIG_ATOMIC_MAX__ 127
#define _SFR_WORD(sfr) _MMIO_WORD(_SFR_ADDR(sfr))
#define RXCIE0 7
#define GPIOR0 _SFR_IO8(0x1E)
#define GPIOR1 _SFR_IO8(0x2A)
#define GPIOR2 _SFR_IO8(0x2B)
#define SCNxLEAST32 "lx"
#define PRIu16 "u"
#define INT_LEAST64_MAX INT64_MAX
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
#define SCNx32 "lx"
#define UDR0_0 0
#define UDR0_1 1
#define UDR0_2 2
#define UDR0_3 3
#define UDR0_6 6
#define UDR0_7 7
#define logf log
#define __SIZEOF_PTRDIFF_T__ 2
#define __AVR 1
#define PRIu32 "lu"
#define __BUILTIN_AVR_ABSLK 1
#define AVR_STATUS_ADDR _SFR_IO_ADDR(SREG)
#define __BUILTIN_AVR_ABSLR 1
#define expf exp
#define SM0 1
#define SM1 2
#define SM2 3
#define acosf acos
#define U2X0 1
#define TIMER2_OVF_vect_num 9
#define TWAM6 6
#define INTPTR_MIN INT16_MIN
#define INT8_C(value) ((int8_t) value)
#define __LACCUM_EPSILON__ 0x1P-31LK
#define UBRR0 _SFR_MEM16(0xC4)
#define SPE 6
#define SPH _SFR_IO8(0x3E)
#define SPL _SFR_IO8(0x3D)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define UINT_FAST32_MAX UINT32_MAX
#define PRIxLEAST16 "x"
#define REFS0 6
#define REFS1 7
#define __INT_FAST16_MAX__ 32767
#define hypotf hypot
#define INT_LEAST64_MIN INT64_MIN
#define isfinitef isfinite
#define PSRASY 1
#define PCINT2_vect _VECTOR(5)
#define PRIxLEAST32 "lx"
#define __UINT_FAST32_MAX__ 4294967295UL
#define PORT1 1
#define PORT2 2
#define PORT3 3
#define PORT4 4
#define PORT5 5
#define PORT6 6
#define PORT7 7
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define ACD 7
#define __USACCUM_MAX__ 0XFFFFP-8UHK
#define PORTB _SFR_IO8(0x05)
#define PORTC _SFR_IO8(0x08)
#define PORTD _SFR_IO8(0x0B)
#define TCNT0_0 0
#define TCNT0_1 1
#define TCNT0_2 2
#define TCNT0_3 3
#define TCNT0_4 4
#define TCNT0_5 5
#define TCNT0_6 6
#define TCNT0_7 7
#define __SFRACT_EPSILON__ 0x1P-7HR
#define __FLT_HAS_QUIET_NAN__ 1
#define UINTMAX_MAX UINT64_MAX
#define INT32_C(value) __CONCAT(value, L)
#define __FLT_MAX_10_EXP__ 38
#define TIMER1_COMPB_vect _VECTOR(12)
#define ADC _SFR_MEM16(0x78)
#define FUSEMEM __attribute__((__used__, __section__ (".fuse")))
#define INT0_vect_num 1
#define OCR2_0 0
#define OCR2_1 1
#define OCR2_2 2
#define OCR2_3 3
#define OCR2_4 4
#define OCR2_5 5
#define __LONG_MAX__ 2147483647L
#define OCR2_7 7
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN)
#define OCR2BUB 2
#define __FLT_HAS_INFINITY__ 1
#define ADCH1 1
#define ADCH2 2
#define ADCH3 3
#define ADCH4 4
#define ADCH5 5
#define ADCH6 6
#define ADCH7 7
#define _SFR_DWORD(sfr) _MMIO_DWORD(_SFR_ADDR(sfr))
#define ADTS0 0
#define PRIxFAST16 "x"
#define TWPS0 0
#define TWPS1 1
#define ADTS1 1
#define PRIXPTR PRIX16
#define USART_UDRE_vect _VECTOR(19)
#define __USA_FBIT__ 16
#define PRIX16 "X"
#define OSCCAL _SFR_MEM8(0x66)
#define __UINT_FAST16_TYPE__ unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define FUSE_CKOUT (unsigned char)~_BV(6)
#define tanf tan
#define __BUILTIN_AVR_RBITS 1
#define __CHAR16_TYPE__ unsigned int
#define PRIxFAST32 "lx"
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __STDINT_H_
#define SCNuPTR SCNu16
#define __AVR_HAVE_LPMX__ 1
#define TCN2UB 4
#define asinf asin
#define PRIX32 "lX"
#define __INT_LEAST16_MAX__ 32767
#define ADCL0 0
#define ADCL1 1
#define __DEC64_MANT_DIG__ 16
#define ADCL3 3
#define ADCL4 4
#define ADCL5 5
#define ADCL6 6
#define ADCL7 7
#define __INT64_MAX__ 9223372036854775807LL
#define __UINT_LEAST32_MAX__ 4294967295UL
#define __SACCUM_FBIT__ 7
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
#define _SFR_ADDR(sfr) _SFR_MEM_ADDR(sfr)
#define __INT_LEAST64_TYPE__ long long int
#define INT64_MAX 0x7fffffffffffffffLL
#define WDTCSR _SFR_MEM8(0x60)
#define USART_RX_vect_num 18
#define __INT16_TYPE__ int
#define __INT_LEAST8_TYPE__ signed char
#define __SQ_FBIT__ 31
#define _MMIO_DWORD(mem_addr) (*(volatile uint32_t *)(mem_addr))
#define __HAS_DELAY_CYCLES 1
#define __DEC32_MAX_EXP__ 97
#define __AVR_LIBC_MINOR__ 8
#define SLEEP_MODE_PWR_SAVE (0x03<<1)
#define __INT_FAST8_MAX__ 127
#define __INTPTR_MAX__ 32767
#define __QQ_FBIT__ 7
#define __INTTYPES_H_
#define SCNuFAST16 "u"
#define __UTA_IBIT__ 16
#define M_1_PI 0.31830988618379067154
#define BODS 6
#define SCNuFAST32 "lu"
#define ICR1H0 0
#define ICR1H1 1
#define ICR1H2 2
#define ICR1H3 3
#define ICR1H4 4
#define ICR1H5 5
#define ICR1H6 6
#define ICR1H7 7
#define COM2A1 7
#define OCR0A_0 0
#define OCR0A_1 1
#define OCR0A_2 2
#define OCR0A_3 3
#define PRIXFAST8 "X"
#define OCR0A_5 5
#define OCR0A_6 6
#define OCR0A_7 7
#define COM2B0 4
#define COM2B1 5
#define GPIOR22 2
#define INT64_MIN (-INT64_MAX - 1LL)
#define AS2 5
#define __LDBL_MANT_DIG__ 24
#define __SFRACT_FBIT__ 7
#define PRIXLEAST8 "X"
#define _EEPROM_REG_LOCATIONS_ 1F2021
#define PB2 PORTB2
#define __SACCUM_MIN__ (-0X1P7HK-0X1P7HK)
#define __DBL_HAS_QUIET_NAN__ 1
#define __AVR_HAVE_PRR_PRUSART0
#define UMSEL01 7
#define ICR1L0 0
#define ICR1L1 1
#define ICR1L2 2
#define ICR1L3 3
#define ICR1L4 4
#define ICR1L5 5
#define ICR1L6 6
#define ICR1L7 7
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define TWINT 7
#define _SFR_MEM_ADDR(sfr) ((uint16_t) &(sfr))
#define RWWSB 6
#define AVR 1
#define __BUILTIN_AVR_FMULS 1
#define XRAMEND RAMEND
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ unsigned int
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define signbitf signbit
#define PRIiPTR PRIi16
#define ICR1H _SFR_MEM8(0x87)
#define __AVR__ 1
#define __AVR_HAVE_JMP_CALL__ 1
#define __USQ_FBIT__ 32
#define FUSES __fuse_t __fuse FUSEMEM
#define __UINTPTR_MAX__ 65535U
#define loop_until_bit_is_set(sfr,bit) do { } while (bit_is_clear(sfr, bit))
#define __DEC64_MIN_EXP__ (-382)
#define SCNxPTR SCNx16
#define ADC_vect _VECTOR(21)
#define FUSE_EESAVE (unsigned char)~_BV(3)
#define __ULLACCUM_IBIT__ 16
#define __INT_FAST64_MAX__ 9223372036854775807LL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define floorf floor
#define __FLT_DIG__ 6
#define UDORD0 2
#define INT_FAST32_MAX INT32_MAX
#define __UINT_FAST64_TYPE__ long long unsigned int
#define M_LN10 2.30258509299404568402
#define __BUILTIN_AVR_BITSHK 1
#define PB0 PORTB0
#define PB1 PORTB1
#define __BUILTIN_AVR_BITSHR 1
#define PB3 PORTB3
#define PB4 PORTB4
#define PB5 PORTB5
#define PB6 PORTB6
#define PB7 PORTB7
#define PSRSYNC 0
#define UINT_FAST8_MAX UINT8_MAX
#define __INT_MAX__ 32767
#define truncf trunc
#define PC0 PORTC0
#define PC1 PORTC1
#define PC2 PORTC2
#define PC3 PORTC3
#define PC4 PORTC4
#define PC5 PORTC5
#define PC6 PORTC6
#define SCNoFAST16 "o"
#define __LACCUM_FBIT__ 31
#define PORF 0
#define PD0 PORTD0
#define PD1 PORTD1
#define PD2 PORTD2
#define WGM00 0
#define WGM01 1
#define WGM02 3
#define PD6 PORTD6
#define PD7 PORTD7
#define TIMER2_OVF_vect _VECTOR(9)
#define WGM10 0
#define WGM11 1
#define WGM12 3
#define WGM13 4
#define __USACCUM_MIN__ 0.0UHK
#define UPE0 2
#define lrintf lrint
#define SCNoFAST32 "lo"
#define __UHA_IBIT__ 8
#define __AVR_HAVE_PRR_PRTWI
#define __INT64_TYPE__ long long int
#define __BUILTIN_AVR_BITSLK 1
#define __BUILTIN_AVR_BITSLR 1
#define WGM21 1
#define WGM22 3
#define __FLT_MAX_EXP__ 128
#define __AVR_HAVE_MUL__ 1
#define __UTQ_IBIT__ 0
#define UINT32_C(value) __CONCAT(value, UL)
#define __DBL_MANT_DIG__ 24
#define __BUILTIN_AVR_ULLKBITS 1
#define __INT_LEAST64_MAX__ 9223372036854775807LL
#define __AVR_HAVE_MOVW__ 1
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
#define UINT_FAST64_MAX UINT64_MAX
#define LB_MODE_2 (0xFE)
#define INT_FAST32_MIN INT32_MIN
#define __DEC64_MIN__ 1E-383DD
#define _AVR_LOCK_H_ 1
#define __WINT_TYPE__ int
#define __UINT_LEAST32_TYPE__ long unsigned int
#define __SIZEOF_SHORT__ 2
#define __ULLFRACT_IBIT__ 0
#define CAL0 0
#define SCNu16 "u"
#define __LDBL_MIN_EXP__ (-125)
#define roundf round
#define _UTIL_DELAY_BASIC_H_ 1
#define _AVR_VERSION_H_
#define __UDA_IBIT__ 32
#define SCNu32 "lu"
#define TIMER1_COMPB_vect_num 12
#define __INT_LEAST8_MAX__ 127
#define MSTR 4
#define __LFRACT_FBIT__ 31
#define __LDBL_MAX_10_EXP__ 38
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ ((double)1.19209290e-7L)
#define __BUILTIN_AVR_BITSUK 1
#define __BUILTIN_AVR_BITSUR 1
#define __UINT8_C(c) c
#define coshf cosh
#define __INT_LEAST32_TYPE__ long int
#define __BUILTIN_AVR_URBITS 1
#define __SIZEOF_WCHAR_T__ 2
#define __UINT64_TYPE__ long long unsigned int
#define __AVR_LIBC_DATE_STRING__ "20111229"
#define __OPTIMIZE_SIZE__ 1
#define SCNiFAST16 "i"
#define TWBR0 0
#define TWBR1 1
#define TWBR2 2
#define TWBR3 3
#define TWBR4 4
#define TWBR5 5
#define TWBR6 6
#define TWBR7 7
#define PRR _SFR_MEM8(0x64)
#define PCMSK1 _SFR_MEM8(0x6C)
#define __LLFRACT_MAX__ 0X7FFFFFFFFFFFFFFFP-63LLR
#define __MATH_H
#define SCNiFAST32 "li"
#define TOIE0 0
#define TOIE1 0
#define TOIE2 0
#define TXC0 6
#define PCICR _SFR_MEM8(0x68)
#define TCNT1H0 0
#define TCNT1H1 1
#define TCNT1H2 2
#define TCNT1H3 3
#define __TQ_FBIT__ 127
#define TCNT1H5 5
#define TCNT1H7 7
#define PCINT23 7
#define PUD 4
#define __INT_FAST8_TYPE__ signed char
#define BODSE 5
#define __ULLACCUM_EPSILON__ 0x1P-48ULLK
#define __BUILTIN_AVR_ROUNDK 1
#define __BUILTIN_AVR_ROUNDR 1
#define PCIE0 0
#define PCIE1 1
#define PCIE2 2
#define atanf atan
#define EEDR0 0
#define EERIE 3
#define UCPHA0 1
#define PCIF0 0
#define PCIF1 1
#define PCIF2 2
#define TCNT1L _SFR_MEM8(0x84)
#define __UHQ_IBIT__ 0
#define PCIFR _SFR_IO8(0x1B)
#define __LLACCUM_IBIT__ 16
#define EEDR5 5
#define TCNT1L0 0
#define TCNT1L1 1
#define TCNT1L2 2
#define TCNT1L3 3
#define TCNT1L4 4
#define TCNT1L5 5
#define TCNT1L6 6
#define TCNT1L7 7
#define ACO 5
#define INTMAX_MAX INT64_MAX
#define __AVR_DEVICE_NAME__ atmega328
#define __DBL_DECIMAL_DIG__ 9
#define __DEC_EVAL_METHOD__ 2
#define PRIxFAST8 "x"
#define __TA_FBIT__ 47
#define _SFR_BYTE(sfr) _MMIO_BYTE(_SFR_ADDR(sfr))
#define OCR0B_2 2
#define OCR0B_4 4
#define ADCSRA _SFR_MEM8(0x7A)
#define ADCSRB _SFR_MEM8(0x7B)
#define OCR0B_5 5
#define M_LOG10E 0.43429448190325182765
#define PRIdFAST16 "d"
#define __UDQ_IBIT__ 0
#define UMSEL00 6
#define COM2A0 6
#define _BV(bit) (1 << (bit))
#define SE 0
#define SP _SFR_IO16(0x3D)
#define PD4 PORTD4
#define PD5 PORTD5
#define __ORDER_BIG_ENDIAN__ 4321
#define __WITH_AVRLIBC__ 1
#define __ACCUM_EPSILON__ 0x1P-15K
#define __UINT32_C(c) c ## UL
#define __BUILTIN_AVR_COUNTLSUHK 1
#define PRIdFAST32 "ld"
#define __INTMAX_MAX__ 9223372036854775807LL
#define __BUILTIN_AVR_COUNTLSUHR 1
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define TIMSK0 _SFR_MEM8(0x6E)
#define TIMSK1 _SFR_MEM8(0x6F)
#define TIMSK2 _SFR_MEM8(0x70)
#define IVSEL 1
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define PRIoPTR PRIo16
#define INTMAX_MIN INT64_MIN
#define RXC0 7
#define TIMER2_COMPA_vect _VECTOR(7)
#define SLEEP_MODE_IDLE (0x00<<1)
#define __LLFRACT_IBIT__ 0
#define __INT8_MAX__ 127
#define INT0_vect _VECTOR(1)
#define __UINT_FAST32_TYPE__ long unsigned int
#define UBRR0H _SFR_MEM8(0xC5)
#define XH r27
#define UBRR0L _SFR_MEM8(0xC4)
#define XL r26
#define _UTIL_DELAY_H_ 1
#define __CHAR32_TYPE__ long unsigned int
#define __BUILTIN_AVR_COUNTLSULK 1
#define __BUILTIN_AVR_COUNTLSULR 1
#define _SFR_MEM16(mem_addr) _MMIO_WORD(mem_addr)
#define __FLT_MAX__ 3.40282347e+38F
#define YH r29
#define YL r28
#define SLEEP_MODE_EXT_STANDBY (0x07<<1)
#define INT_FAST64_MAX INT64_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define ZL r30
#define _SFR_MEM32(mem_addr) _MMIO_DWORD(mem_addr)
#define __USACCUM_FBIT__ 8
#define bit_is_set(sfr,bit) (_SFR_BYTE(sfr) & _BV(bit))
#define __BUILTIN_AVR_COUNTLSFX 1
#define fmaf fma
#define __INT32_TYPE__ long int
#define TIMER1_OVF_vect _VECTOR(13)
#define __SIZEOF_DOUBLE__ 4
#define __FLT_MIN_10_EXP__ (-37)
#define __UFRACT_EPSILON__ 0x1P-16UR
#define __BUILTIN_AVR_COUNTLSHK 1
#define __BUILTIN_AVR_COUNTLSHR 1
#define __INTMAX_TYPE__ long long int
#define __BUILTIN_AVR_ABSLLK 1
#define __BUILTIN_AVR_ABSLLR 1
#define __DEC128_MAX_EXP__ 6145
#define M_LN2 0.69314718055994530942
#define UINT8_C(value) ((uint8_t) __CONCAT(value, U))
#define __AVR_HAVE_16BIT_SP__ 1
#define GTCCR _SFR_IO8(0x23)
#define PRIdFAST8 "d"
#define SPMCSR _SFR_IO8(0x37)
#define TIFR0 _SFR_IO8(0x15)
#define TIFR1 _SFR_IO8(0x16)
#define TIFR2 _SFR_IO8(0x17)
#define __AVR_ATmega328__ 1
#define __ATOMIC_CONSUME 1
#define ADLAR 5
#define __GNUC_MINOR__ 9
#define __UINTMAX_MAX__ 18446744073709551615ULL
#define PRIuLEAST8 "u"
#define TSM 7
#define __DEC32_MANT_DIG__ 7
#define PRIiLEAST8 "i"
#define __HA_FBIT__ 7
#define INTMAX_C(value) __CONCAT(value, LL)
#define ICF1 5
#define __BUILTIN_AVR_COUNTLSLK 1
#define __BUILTIN_AVR_COUNTLSLR 1
#define INT_FAST64_MIN INT64_MIN
#define PCMSK0 _SFR_MEM8(0x6B)
#define PCMSK2 _SFR_MEM8(0x6D)
#define OCR0A_4 4
#define __BUILTIN_AVR_CLI 1
#define __DBL_MAX_10_EXP__ 38
#define BLB1_MODE_1 (0xFF)
#define BLB1_MODE_2 (0xEF)
#define BLB1_MODE_3 (0xCF)
#define BLB1_MODE_4 (0xDF)
#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)
#define __LDBL_DENORM_MIN__ 1.40129846e-45L
#define TIMER1_COMPA_vect_num 11
#define __INT16_C(c) c
#define ADPS2 2
#define __STDC__ 1
#define EIMSK _SFR_IO8(0x1D)
#define __PTRDIFF_TYPE__ int
#define __LLFRACT_MIN__ (-0.5LLR-0.5LLR)
#define SPDR0 0
#define SPDR1 1
#define SPDR2 2
#define SPDR3 3
#define SPDR4 4
#define SPDR5 5
#define SPDR6 6
#define SPDR7 7
#define FUSE_CKDIV8 (unsigned char)~_BV(7)
#define OCR1BH6 6
#define WDT_vect _VECTOR(6)
#define cbrtf cbrt
#define __BUILTIN_AVR_LRBITS 1
#define fdimf fdim
#define __ATOMIC_SEQ_CST 5
#define __DA_FBIT__ 31
#define __BOOT_LOCK_BITS_1_EXIST
#define PRIdPTR PRId16
#define UBRR0_10 2
#define UBRR0_11 3
#define OCR2_6 6
#define M_SQRT2 1.41421356237309504880
#define __UINT32_TYPE__ long unsigned int
#define __AVR_LIBC_REVISION__ 0
#define OCR1AL0 0
#define PRId16 "d"
#define __BUILTIN_AVR_ROUNDLLK 1
#define __UINTPTR_TYPE__ unsigned int
#define __BUILTIN_AVR_ROUNDLLR 1
#define OCR1AL2 2
#define __USA_IBIT__ 16
#define __BUILTIN_AVR_ULRBITS 1
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-37)
#define PRId32 "ld"
#define BLBSET 3
#define __BUILTIN_AVR_COUNTLSUK 1
#define __BUILTIN_AVR_COUNTLSUR 1
#define WCOL 6
#define PCINT2_vect_num 5
#define __SIZEOF_LONG_LONG__ 8
#define __ULACCUM_EPSILON__ 0x1P-32ULK
#define PRIo16 "o"
#define FUSE_SUT0 (unsigned char)~_BV(4)
#define FUSE_SUT1 (unsigned char)~_BV(5)
#define __SACCUM_IBIT__ 8
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define BORF 2
#define F_CPU 1000000UL
#define SPM_PAGESIZE 128
#define __LDBL_DIG__ 6
#define OCR1AH0 0
#define ICR1 _SFR_MEM16(0x86)
#define OCR1AH2 2
#define OCR1AH3 3
#define OCR1AH4 4
#define OCR1AH5 5
#define OCR1AH6 6
#define OCR1AH7 7
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 65535U
#define PRIo32 "lo"
#define TCNT0 _SFR_IO8(0x26)
#define TCNT1 _SFR_MEM16(0x84)
#define TCNT2 _SFR_MEM8(0xB2)
#define __GNUC_GNU_INLINE__ 1
#define TWD5 5
#define TIMER2_COMPB_vect _VECTOR(8)
#define __BUILTIN_AVR_INSERT_BITS 1
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
#define PRSPI 2
#define __BUILTIN_AVR_FLASH_SEGMENT 1
#define _MMIO_WORD(mem_addr) (*(volatile uint16_t *)(mem_addr))
#define INT1_vect _VECTOR(2)
#define fabsf fabs
#define PRIoFAST8 "o"
#define INT_LEAST16_MAX INT16_MAX
#define PRIoLEAST8 "o"
#define __ULLFRACT_MAX__ 0XFFFFFFFFFFFFFFFFP-64ULLR
#define __UINT_FAST8_TYPE__ unsigned char
#define TXEN0 3
#define OCR0B_0 0
#define OCR0B_1 1
#define __USFRACT_EPSILON__ 0x1P-8UHR
#define OCR0B_3 3
#define __ULACCUM_FBIT__ 32
#define OCR0B_6 6
#define OCR0B_7 7
#define __QQ_IBIT__ 0
#define PRIXFAST16 "X"
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3
#define AVR_STACK_POINTER_REG SP
#define __BUILTIN_AVR_FMUL 1
#define OCR1AL1 1
#define OCR1AL3 3
#define OCR1AL4 4
#define OCR1AL5 5
#define OCR1AL6 6
#define OCR1AL7 7
#define ACIS0 0
#define ACIS1 1

 

ɴᴇᴛɪᴢᴇᴎ

Last Edited: Sat. Sep 17, 2016 - 10:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil and netizen, thanks for your replies.

 

I understand now that with the -E, no .o file is generated causing the fail.

 

netizen, thanks for showing me how to do it from a command line.

 

But why didn't the -dM cause the list of defined macros to appear in the studio output screen?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Life is so much simpler if you drive things from the command line. Normally if you are driving the compiler you either use

 

avr-gcc $CFLAGS -c file.c -o file.o

 

The -c says "just compile this" , the -o says "write the output into...". After this file.o then contains unlinked ELF/DWARF binary. 

 

Or alternatively sometimes you don't include -c:

 

avr-gcc $CFLAGS file.c -o file.elf

 

The lack of -c means compile AND link. Usually this form is used with just .o files as input but it can be used with .c to go straight to linked output. The output file.elf then contains linked ELF/DWARF. 

 

Now when you use IDE's like AS7 their auto-generated makefiles don't give you much control over any of this. In particular they always use -o to put output in a file. So now,  if you fiddle with the build options such as adding "-E - dM" then that just adds to the C flags. So the command issued is effectively :

 

avr-gcc -E -dM $rest_of_CFLAGS -c file.c -o file.o

 

In this the -E says stop at the end of preprocessing and -dM says dump the macros. But the -o is the problem. Yes the "output" is going to be a load of text showing all the dumped macros but the -o says "and write it to file.o".

 

So your command worked but you were looking in the wrong place for the result. While nothing on earth would ever make you normally open a file.o in a text editor (usually it contains ELF/DWARF binary) that is exactly where you should have looked for the text output on this occasion. 

 

In general all forms of -E don't make a lot of sense when using an IDE unless you plan to open .o files as text.

 

If you just want to see preprocessed C it's far easier to use -save-temps instead. If you want to use a -E -dM I'd suggest it might be easiest to use "command prompt" on the tools menu and type it as a plain command line (and without -o) 

 

Of course if you build at the command line you can even (in a sensible operating system anyway) :

 

avr-gcc -E -dM - < /dev/null

 

Where you don't even need a C file, the lone '-' means "input from stdin" and then "< /dev/null" feeds "nothing" in as source. 

 

(how I wish I could apply formatting to the above while using a tablet! EDIT: now fixed using laptop) 

Last Edited: Sun. Sep 18, 2016 - 01:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson,  thanks for the explanation.

 

I now know why the Build failed and why no list of defined macros was displayed.

The "-E -dm" is not something that I would use very often - once every couple years maybe - but it's nice to know that it is there and how to use it.
 

 

Edit: If invoked from the command line, would a symbol defined in the project properties (such as F_CPU) show up in the list?  I'm guessing not.

 

Last Edited: Sun. Sep 18, 2016 - 12:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If F_CPU is defined in the project all that really does is create a -D on the command line like:

 

avr-gcc -DF_CPU=123456UL etc. 

 

So when you do -E -dM you could use:

 

avr-gcc -DF_CPU=123456UL -E -dM file.c

 

And the output would include F_CPU. But this all seems a bit futile, why bother to type it as a -D in the input just to have it come out again in the output? You already know what it's defined as because you just typed the -D that defined it! 

 

If you really want to see the project defines from the IDE I guess you go with option 1 then look to file.o for the result. 

Last Edited: Sun. Sep 18, 2016 - 01:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It seems that not only am I unable to apply formatting to my posts using this tablet but the system has chosen to randomly apply its own formatting :-(

EDIT: couldn't stand it any longer so dug out laptop to edit/fix formatting above.

Last Edited: Sun. Sep 18, 2016 - 01:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was just pointing out that when using the command line option, the list of defined macros may not be complete.

 

clawson wrote:

If you really want to see the project defines from the IDE I guess you go with option 1 then look to file.o for the result. 

 

I re-ran the test shown in post #1 and no .o file was produced.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck99 wrote:
I re-ran the test shown in post #1 and no .o file was produced.

But the output showed:

 -o "Blink_Led_1MHz_Clk.o"

and:

Finished building: .././Blink_Led_1MHz_Clk.c

so the Debug output directory *will* contain a file called Blink_Led_1MHz_clk.o

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

so the Debug output directory *will* contain a file called Blink_Led_1MHz_clk.o

 

You are right!

 

Atmel Studio 6.2 Solution Explorer shows no output file, but when I use Windows Explorer to look in the Debug directory the .o file is there and does contain the list of defined macros.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I know.