Hallo Dirk,
ich möchte gerne dein I2C-Slave-Programm für die M32 Verwenden. Ich habe mir die aktuellen Examples (v1.8, siehe http://www.rn-wissen.de/index.php/RP...rung#Versionen ) heruntergeladen. Dort in "RP6CONTROL_EXAMPLES" einen Ordner "M32-Slave" erstellt. Dort hab ich eine RP6Control_I2CSlave.c mit dem Quelltext von http://www.rn-wissen.de/index.php/RP...2C-Slave#Slave erstellt. Dazu das Makefile eines anderen Beispiels kopiert und ein paar Parameter angepasst:
Code:
TARGET = RP6Control_I2CSlave
SRC += $(RP6_LIB_PATH)/RP6control/RP6ControlLib.c
SRC += $(RP6_LIB_PATH)/RP6common/RP6uart.c
SRC += $(RP6_LIB_PATH)/RP6common/RP6I2CslaveTWI.c
#SRC += $(RP6_LIB_PATH)/RP6common/RP6I2CmasterTWI.c
Beim übersetzen "make all" bekomme ich aber folgende Fehler:
Code:
$ make all
-------- begin --------
avr-gcc (GCC) 4.7.0
Copyright (C) 2012 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: RP6Control_I2CSlave.c
avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=RP6Control_I2CSlave.lst -I../../RP6Lib -I../../RP6Lib/RP6control -I../../RP6Lib/RP6common -std=gnu99 -MD -MP -MF .dep/RP6Control_I2CSlave.o.d RP6Control_I2CSlave.c -o RP6Control_I2CSlave.o
RP6Control_I2CSlave.c:96:1: error: unknown type name ‘freeIOs_t’
RP6Control_I2CSlave.c: In function ‘task_update’:
RP6Control_I2CSlave.c:116:5: error: ‘pressedKeyNumber’ undeclared (first use in this function)
RP6Control_I2CSlave.c:116:5: note: each undeclared identifier is reported only once for each function it appears in
RP6Control_I2CSlave.c:129:41: error: ‘ins’ undeclared (first use in this function)
RP6Control_I2CSlave.c:129:60: error: request for member ‘byte’ in something not a structure or union
RP6Control_I2CSlave.c:137:8: error: ‘releasedKeyNumber’ undeclared (first use in this function)
RP6Control_I2CSlave.c: In function ‘task_updateRegisters’:
RP6Control_I2CSlave.c:205:57: error: ‘ins’ undeclared (first use in this function)
RP6Control_I2CSlave.c:214:56: error: ‘adc4’ undeclared (first use in this function)
RP6Control_I2CSlave.c:216:56: error: ‘adc3’ undeclared (first use in this function)
RP6Control_I2CSlave.c:218:56: error: ‘adc2’ undeclared (first use in this function)
RP6Control_I2CSlave.c:220:56: error: ‘adc6’ undeclared (first use in this function)
RP6Control_I2CSlave.c:222:56: error: ‘adc5’ undeclared (first use in this function)
RP6Control_I2CSlave.c:224:56: error: ‘adc7’ undeclared (first use in this function)
RP6Control_I2CSlave.c:226:57: error: ‘adcMic’ undeclared (first use in this function)
RP6Control_I2CSlave.c:228:59: error: ‘adcKeypad’ undeclared (first use in this function)
RP6Control_I2CSlave.c:230:63: error: ‘releasedKeyNumber’ undeclared (first use in this function)
RP6Control_I2CSlave.c:231:62: error: ‘pressedKeyNumber’ undeclared (first use in this function)
RP6Control_I2CSlave.c: In function ‘task_commandProcessor’:
RP6Control_I2CSlave.c:339:4: warning: implicit declaration of function ‘setOUTs’ [-Wimplicit-function-declaration]
RP6Control_I2CSlave.c:343:32: error: ‘adcMic’ undeclared (first use in this function)
RP6Control_I2CSlave.c: In function ‘main’:
RP6Control_I2CSlave.c:472:9: error: request for member ‘byte’ in something not a structure or union
RP6Control_I2CSlave.c:484:3: warning: implicit declaration of function ‘task_RP6M32System’ [-Wimplicit-function-declaration]
make: *** [RP6Control_I2CSlave.o] Fehler 1
Hilfe 
(Für mich sieht das so aus, als währe eine Lib nicht eingebunden. Aber welche? Und warum meckert er dann nicht?)
Viele Grüße
-schumi-
Lesezeichen