Code:
> "C:\ASURO_src\FirstTry\Test-all.bat"
C:\ASURO_src\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
-------- begin --------
avr-gcc --version
avr-gcc (WinAVR 20090313) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
test.elf :
section size addr
.text 1740 0
.bss 1 8388704
.debug_aranges 64 0
.debug_pubnames 263 0
.debug_info 1098 0
.debug_abbrev 445 0
.debug_line 1158 0
.debug_frame 288 0
.debug_str 365 0
.debug_loc 388 0
Total 5810
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
test.c: In function 'PrintInt':
test.c:13: warning: implicit declaration of function 'strlen'
test.c:13: warning: incompatible implicit declaration of built-in function 'strlen'
test.c:13: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
test.c: In function 'main':
test.c:22: warning: pointer targets in passing argument 1 of 'SerWrite' differ in signedness
test.c:28: error: expected declaration or statement at end of input
make: *** [test.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
Das kam heraus und das ist der dazugehörige code von core duo mit deiner Bibliotheken modifizierung.
Code:
#include "asuro.h"
#include <stdlib.h>
#include <avr/io.h>
int main(void){
unsigned int line[2], i;
Init();
void PrintInt(int wert)
{
char text[16]=" ";
itoa(wert,text,10);
SerWrite(text,strlen(text));
}
FrontLED(ON);
StatusLED(OFF);
while(1){
LineData(line);
PrintInt(line[0]);
SerWrite("\n", 1);
for(i= 0; i< 200; i++){
Sleep(255);
}
while(1);
return 0;
}
Lesezeichen