Witam
Mam problem przy kompilacji prostego programu.
Posiadam zestaw startowy ATB 1.01 Atnela
A oto program:
#include <avr/io.h>
#include <util/delay.h>
#define LED_PIN (1<<PC7)
#define LED_ON PORTC &= ~LED_PIN
#define LED_OFF PORTC |= LED_PIN
#define LED_TOG PORTC ^= LED_PIN
int main (void)
{
DDRC = LED_PIN;
while(1)
{
LED_ON;
_delay_ms(1000);
LED_OFF;
_delay_ms(1000);
}
}
Błędy jakie wyskakują są następujące:
../make.c:1: error: MCU 'atmega32a' supported for assembler only
In file included from ../make.c:2:
c:/winavr-20100110/lib/gcc/../../avr/include/avr/io.h:404:6: warning: #warning "device type not defined"
../make.c: In function 'main':
../make.c:14: error: 'DDRC' undeclared (first use in this function)
../make.c:14: error: (Each undeclared identifier is reported only once
../make.c:14: error: for each function it appears in.)
../make.c:14: error: 'PC7' undeclared (first use in this function)
../make.c:18: error: 'PORTC' undeclared (first use in this function)
make: *** [make.o] Error 1
Build failed with 6 errors and 1 warnings...