02-02-2012, 15:32
Witam
Cała zawartość pliku nowy.c
"#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
#include "lcd_alfanum.h"
void wys_freq(unsigned long int xxx)
{
char freq_string[10];
freq_string[9]=0;
unsigned char i;
i=8;
while(i>0)
{
freq_string[i]=xxx%10+48;
xxx/=10;
i-=1;
}
freq_string[0]=xxx+48;
napis_lcd(freq_string);
}
"
A po kompilacji taki błąd (ten sam error).
"rm -rf nowy.o nowy.elf dep/* nowy.hex nowy.eep nowy.lss nowy.map
Build succeeded with 0 Warnings...
avr-gcc -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT nowy.o -MF dep/nowy.o.d -c ../nowy.c
avr-gcc -mmcu=atmega32 -Wl,-Map=nowy.map nowy.o -o nowy.elf
d:/avr tools/avr toolchain/bin/../lib/gcc/avr/4.5.1/../../../../avr/lib/avr5/crtm32.o: In function `__vectors':
/home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/crt1/gcrt1.S:52: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [nowy.elf] Błąd 1
Build failed with 1 errors and 0 warnings...
skąd sie bierze ten komunikat:
-> /home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/crt1/gcrt1.S:52: undefined reference to `main'
collect2: ld returned 1 exit status -<
Cała zawartość pliku nowy.c
"#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
#include "lcd_alfanum.h"
void wys_freq(unsigned long int xxx)
{
char freq_string[10];
freq_string[9]=0;
unsigned char i;
i=8;
while(i>0)
{
freq_string[i]=xxx%10+48;
xxx/=10;
i-=1;
}
freq_string[0]=xxx+48;
napis_lcd(freq_string);
}
"
A po kompilacji taki błąd (ten sam error).
"rm -rf nowy.o nowy.elf dep/* nowy.hex nowy.eep nowy.lss nowy.map
Build succeeded with 0 Warnings...
avr-gcc -mmcu=atmega32 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT nowy.o -MF dep/nowy.o.d -c ../nowy.c
avr-gcc -mmcu=atmega32 -Wl,-Map=nowy.map nowy.o -o nowy.elf
d:/avr tools/avr toolchain/bin/../lib/gcc/avr/4.5.1/../../../../avr/lib/avr5/crtm32.o: In function `__vectors':
/home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/crt1/gcrt1.S:52: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [nowy.elf] Błąd 1
Build failed with 1 errors and 0 warnings...
skąd sie bierze ten komunikat:
-> /home/tools/hudson/workspace/avr8-gnu-toolchain/src/avr-libc/crt1/gcrt1.S:52: undefined reference to `main'
collect2: ld returned 1 exit status -<
Janek SQ9JXB

