Hi,
habe jetzt einen RP6 und habe gleich mal ein kleines Testprogramm geschrieben, das aber nicht läuft.
Hier mein Source-Code:
Code:
#include "RP6RobotBaseLib.h"
int main(void)
{
initRobotBase();
powerON();
char receiveBuffer[5];
receiveBytes(5);
waitUntilReceptionComplete();
copyReceivedBytesToBuffer(&receiveBuffer[0]);
if(receiveBuffer == "Hello")
{
writeString_P("Hi!\n");
}
}
Und hier der Compiler-Output:
Code:
> "C:\RP6Examples\RP6BASE_EXAMPLES\Test\\make_all.bat"
C:\RP6Examples\RP6BASE_EXAMPLES\Test>set LANG=C
C:\RP6Examples\RP6BASE_EXAMPLES\Test>make all
-------- begin --------
avr-gcc (GCC) 4.1.2 (WinAVR 20070525)
Copyright (C) 2006 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.
Compiling: Test.c
avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -DDEBUG_MEASURE_DUTY_CYCLE -O -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Test.lst -I../../RP6lib -I../../RP6lib/RP6base -I../../RP6lib/RP6common -std=gnu99 -MD -MP -MF .dep/Test.o.d Test.c -o Test.o
Linking: Test.elf
avr-gcc -mmcu=atmega32 -I. -gdwarf-2 -DDEBUG_MEASURE_DUTY_CYCLE -O -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Test.o -I../../RP6lib -I../../RP6lib/RP6base -I../../RP6lib/RP6common -std=gnu99 -MD -MP -MF .dep/Test.elf.d Test.o --output Test.elf -Wl,-Map=Test.map,--cref -lm
Test.o: In function `main':
C:\RP6Examples\RP6BASE_EXAMPLES\Test/Test.c:5: undefined reference to `initRobotBase'
C:\RP6Examples\RP6BASE_EXAMPLES\Test/Test.c:8: undefined reference to `receiveBytes'
C:\RP6Examples\RP6BASE_EXAMPLES\Test/Test.c:9: undefined reference to `waitUntilReceptionComplete'
C:\RP6Examples\RP6BASE_EXAMPLES\Test/Test.c:10: undefined reference to `copyReceivedBytesToBuffer'
C:\RP6Examples\RP6BASE_EXAMPLES\Test/Test.c:13: undefined reference to `writeNStringP'
make: *** [Test.elf] Error 1
> Process Exit Code: 2
> Time Taken: 00:03
Zitat von
Luki.B.
Du hast aus versehen den Source Code statt dem Compilerout hingeschrieben.
Ist editiert, danke für den Hinweis.
Lesezeichen