Od jakiegos czasu interesuje sie programowanie uC. Wczoraj dostalem stk200/300 i chcialem skompilowac swoj pierwszy program:
Kod: Zaznacz cały
#include <avr/io.h>
#define LED_ON sbi(DDRB,PB1);sbi(PORTB,PB1)
int main (void)
{
LED_ON;
for (;;)
{
}
return (0);
}
Kod: Zaznacz cały
> "make.exe" all
avr-gcc -O -g -Wall -ffreestanding -mmcu=atmega8 -o led.out led.o
led.o: In function `main':
C:\Documents and Settings\XXX\Moje dokumenty\projekt proba/led.c:4: undefined reference to `sbi'
C:\Documents and Settings\XXX\Moje dokumenty\projekt proba/led.c:6: undefined reference to `sbi'
make.exe: *** [led.out] Error 1
> Process Exit Code: 2
> Time Taken: 00:02
HELP PLZ.
Greets
Bananera