AVR Studio compile with ATmegaBOOT_168.c error

In AVR Studio 4.13, I try to open a new project with the ATmegaBOOT_168.c of Arduino 0014 or 0015, but when I built there are 2 main errors:

  1. NUM_LED_FLASHES
  2. 'MAX_TIME_COUNT

../AVR_Trial.c:382: error: 'NUM_LED_FLASHES' undeclared (first use in this function)../AVR_Trial.c:382: error: (Each undeclared identifier is reported only once
../AVR_Trial.c:382: error: for each function it appears in.)
../AVR_Trial.c: In function 'getch':
../AVR_Trial.c:913: error: 'MAX_TIME_COUNT' undeclared (first use in this function)make: *** [AVR_Trial.o] Error 1
Build failed with 4 errors and 2 warnings...


So I defined:

#define NUM_LED_FLASHES 5
#define MAX_TIME_COUNT 10

When I built there are 2 other errors:

../AVR_Trial.c:833: error: r28 cannot be used in asm here
../AVR_Trial.c:833: error: r29 cannot be used in asm heremake: *** [AVR_Trial.o] Error 1
Build failed with 2 errors and 2 warnings...

Anyone knows why?