also ich hab mich mal jetzt ans programmieren gemacht aber irgend wie funktioniert das net so wie ich will - hier mein programmtext :
Dazu hab ich folgende fehlermeldung erhalten :Code:#include "asuro.h" int main(void) { Init(); uint8_t string []= "linkertransistor"; while(1); return 0; }
Code:D:\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 (GCC) 3.3.1 Copyright (C) 2003 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 1536 0 .data 0 8388704 .bss 1 8388704 .noinit 0 8388705 .eeprom 0 8454144 .stab 3240 0 .stabstr 1832 0 Total 6609 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 `main': test.c:10: error: `uint8_t' undeclared (first use in this function) test.c:10: error: (Each undeclared identifier is reported only once test.c:10: error: for each function it appears in.) test.c:10: error: parse error before "string" make: *** [test.o] Error 1 > Process Exit Code: 2
Allerdings hab ich mich im netz schlau gemacht und solche "stringzeiger gefunden" - damit hats auch merh oder weniger geklappt siehe quelltext (zumindest mal kein fehler beim compilieren)
allerdings bekam ich merkwürdige ergebnisse wie beispielsweiseCode:#include "asuro.h" int main(void) { const char *linkertransistor; const char *rechtertransistor; unsigned int transistor[2]; Init(); LineData(transistor); linkertransistor = "____"; //das war jeweils nur zum test, ob die funktion linedata() fuktioniert rechtertransistor = "1152"; //das war jeweils nur zum test, ob die funktion linedata() fuktioniert linkertransistor = transistor[0]; rechtertransistor = transistor[1]; SerWrite(linkertransistor,4); SerWrite(rechtertransistor,4); while(1); return 0; }
Ï oder Ï!™ëAÑ„
an was könnte das liegen?
mfg sebastian







Zitieren

Lesezeichen