S-Funktion-Builder und ArduinoIO - Fehler bei include wire.h
Ronald
Gast
Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
Verfasst am: 17.06.2014, 19:07
Titel: S-Funktion-Builder und ArduinoIO - Fehler bei include wire.h
Hallo,
ich versuche seit einiger Zeit eine I2C-Kommunikation zwischen einem Sensor und einem Arduino DUE in Simulink herzustellen.
Dazu verwende ich das "Simulink Support Package for Arduino Hardware" (ArduinoIO). Um C-Code in Arduino zu schreiben habe ich nach dieser Anleitung: http://www.mathworks.com/matlabcent.....ange/39354-device-drivers einen S-Function Block erstellt. Wenn ich das dort vorgestellte Beispiel nachprogrammiere funktioniert alles tadellos.
Aber sobald ich im S-Function-Builder bei Libaries ># include "wire.h"< einfüge werde ich beim Auführen mit folgender Fehlermeldung konfontiert:
Code:
The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The build failed with the following message: "C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc" -I"D:/Ronald/Desktop/test/arduinodue_communication_rtt" -I"D:/Ronald/Desktop/test" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"D:/Programme/MatlabR2014a/extern/include" -I"D:/Programme/MatlabR2014a/simulink/include" -I"D:/Programme/MatlabR2014a/rtw/c/src" -I"D:/Programme/MatlabR2014a/rtw/c/src/ext_mode/common" -I"D:/Programme/MatlabR2014a/rtw/c/ert" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/libsam" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/CMSIS/CMSIS/Include" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/CMSIS/Device/ATMEL" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/USB" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/variants/arduino_due_x" -I"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/libraries/Servo/src" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/libraries/Servo/arch/sam" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -mcpu=cortex-m3 -mthumb -I. -D"MODEL=arduinodue_communication" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"ALLOCATIONFCN=0" -D"TID01EQ=0" -D"printf=iprintf" -D"F_CPU=84000000" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_ROTH_DUE_=" -D"ARDUINO=154" -D"ARDUINO_SAM_DUE=" -D"ARDUINO_ARCH_SAM=" -D"__SAM3X8E__=" -D"USB_PID=0x003e" -D"USB_VID=0x2341" -D"USBCON=" -D"_RTT_NUMSERVOS_=0" ./IPAddress.cpp ./Print.cpp ./Reset.cpp ./RingBuffer.cpp ./Stream.cpp ./UARTClass.cpp ./USARTClass.cpp ./CDC.cpp ./HID.cpp ./USBCore.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./cortex_handlers.c ./cxxabi-compat.cpp ./hooks.c ./iar_calls_sam3.c ./itoa.c ./syscalls_sam3.c ./wiring.c ./wiring_analog.c ./wiring_digital.c ./wiring_pulse.cpp ./wiring_shift.c ./variant.cpp ./io_wrappers.cpp ./arduinodue_communication.c ./arduinodue_communication_data.c ./ert_main.c ./test1_wrapper.c
./test1_wrapper.c:17: error: invalid preprocessing directive #inculde
In file included from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Print.h:27,
from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:26,
from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Printable.h:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Print'
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Printable.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Printable'
In file included from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:26,
from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Print.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Print'
In file included from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Stream'
In file included from ./test1_wrapper.c:18:
D:/Ronald/Desktop/test/wire.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TwoWire'
D:/Ronald/Desktop/test/wire.h:110: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Wire'
D:/Ronald/Desktop/test/wire.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Wire1'
cs-make: *** [IPAddress.o]Error1
The build process will terminate as a result.
The build failed with the following message: "C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc" -I"D:/Ronald/Desktop/test/arduinodue_communication_rtt" -I"D:/Ronald/Desktop/test" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"D:/Programme/MatlabR2014a/extern/include" -I"D:/Programme/MatlabR2014a/simulink/include" -I"D:/Programme/MatlabR2014a/rtw/c/src" -I"D:/Programme/MatlabR2014a/rtw/c/src/ext_mode/common" -I"D:/Programme/MatlabR2014a/rtw/c/ert" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/libsam" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/CMSIS/CMSIS/Include" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/system/CMSIS/Device/ATMEL" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/USB" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/variants/arduino_due_x" -I"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/libraries/Servo/src" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/libraries/Servo/arch/sam" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -mcpu=cortex-m3 -mthumb -I. -D"MODEL=arduinodue_communication" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"ALLOCATIONFCN=0" -D"TID01EQ=0" -D"printf=iprintf" -D"F_CPU=84000000" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_ROTH_DUE_=" -D"ARDUINO=154" -D"ARDUINO_SAM_DUE=" -D"ARDUINO_ARCH_SAM=" -D"__SAM3X8E__=" -D"USB_PID=0x003e" -D"USB_VID=0x2341" -D"USBCON=" -D"_RTT_NUMSERVOS_=0" ./IPAddress.cpp ./Print.cpp ./Reset.cpp ./RingBuffer.cpp ./Stream.cpp ./UARTClass.cpp ./USARTClass.cpp ./CDC.cpp ./HID.cpp ./USBCore.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./cortex_handlers.c ./cxxabi-compat.cpp ./hooks.c ./iar_calls_sam3.c ./itoa.c ./syscalls_sam3.c ./wiring.c ./wiring_analog.c ./wiring_digital.c ./wiring_pulse.cpp ./wiring_shift.c ./variant.cpp ./io_wrappers.cpp ./arduinodue_communication.c ./arduinodue_communication_data.c ./ert_main.c ./test1_wrapper.c
./test1_wrapper.c:17: error: invalid preprocessing directive #inculde
In file included from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Print.h:27,
from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:26,
from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Printable.h:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Print'
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Printable.h:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Printable'
In file included from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:26,
from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Print.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Print'
In file included from D:/Ronald/Desktop/test/wire.h:27,
from ./test1_wrapper.c:18:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Stream.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Stream'
In file included from ./test1_wrapper.c:18:
D:/Ronald/Desktop/test/wire.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TwoWire'
D:/Ronald/Desktop/test/wire.h:110: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Wire'
D:/Ronald/Desktop/test/wire.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Wire1'
cs-make: *** [IPAddress.o]Error1
Der eigentlich Fehler scheint "error: invalid preprocessing directive #inculde
In file included from C:/MATLAB/SupportPackages/R2014a/arduino-1.5.4/hardware/arduino/sam/cores/arduino/Print.h:27" zu seien. Die Libary selbst seint er aber gefunden zu habe, da in den letzen Zeilen der direkte Pfad dorthin steht.
Hat vielleicht jemand eine Idee, wo da das Problem liegen könnte?
Vielen Dank, Ronald
Einstellungen und Berechtigungen
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.