Error Compiling Arduino/Motorshield Simulink program in r2018b
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ok,
This program was originally built in r2014b and has run fine many times, unfortunately my hard drive failed a couple months ago which led me to update to r2018b. Now I am having compiling issues. I have re-built both S-functions and verified that I have the support packages downloaded for Arduino and DC Motor/Servo.
I also ran the recommended work around for 2016 and newer versions from the DC motor driver support package.
I realize that this is likely to be pretty obvious to some but I am fairly new at troubleshooting in Simulink.
The error I am receiving is as follows:
C:/ProgramData/MATLAB/SupportPackages/R2018b/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections,--relax -mmcu=atmega2560 -o ../GenericETBTester.elf MW_SerialWrite.o MW_SerialRead.o MW_AnalogInput.o GenericETBTester.o GenericETBTester_data.o rtGetInf.o rtGetNaN.o rt_nonfinite.o Wire.o twi.o Adafruit_PWMServoDriver.o ETB_4_Controller_wrapper.o sig_formatter_4_wrapper.o wiring_pulse.S.o hooks.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o abi.o CDC.o HardwareSerial.o HardwareSerial0.o HardwareSerial1.o HardwareSerial2.o HardwareSerial3.o PluggableUSB.o IPAddress.o new.o Print.o Stream.o Tone.o USBCore.o WMath.o WString.o MW_ArduinoHWInit.o io_wrappers.o arduinoAVRScheduler.o ert_main.o -lm ETB_4_Controller_wrapper.o: In function `ETB_4_Controller_Outputs_wrapper': C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:63: undefined reference to `Adafruit_DCMotor::setSpeed(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:64: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:65: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:66: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:70: undefined reference to `Adafruit_DCMotor::setSpeed(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:71: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:72: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:73: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:77: undefined reference to `Adafruit_DCMotor::setSpeed(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:78: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:79: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:80: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:84: undefined reference to `Adafruit_DCMotor::setSpeed(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:85: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:86: undefined reference to `Adafruit_DCMotor::run(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:87: undefined reference to `Adafruit_DCMotor::run(unsigned char)' ETB_4_Controller_wrapper.o: In function `ETB_4_Controller_Update_wrapper': C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:112: undefined reference to `Adafruit_MotorShield::begin(unsigned int)' ETB_4_Controller_wrapper.o: In function `__static_initialization_and_destruction_0': C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:24: undefined reference to `Adafruit_MotorShield::Adafruit_MotorShield(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:25: undefined reference to `Adafruit_MotorShield::getMotor(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:26: undefined reference to `Adafruit_MotorShield::getMotor(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:27: undefined reference to `Adafruit_MotorShield::getMotor(unsigned char)' C:\Users\ko34215\Documents\ETB_Models\ETB_Models\GenericTester\GenericETBTester_ert_rtw/../ETB_4_Controller_wrapper.cpp:28: undefined reference to `Adafruit_MotorShield::getMotor(unsigned char)' collect2.exe: error: ld returned 1 exit status gmake: *** [../GenericETBTester.elf] Error 1 The make command returned an error of 2 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command, operable program or batch file.
### Build procedure for model: 'GenericETBTester' aborted due to an error.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Modeling dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!