Interfacing Arduino with matlab, seeking help understanding error code & fix.

Status
Not open for further replies.

David_

Advanced Member level 2
Joined
Dec 6, 2013
Messages
573
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,308
Location
Sweden
Visit site
Activity points
12,242
Hello.
I've bought a student license for matlab and the main thing to explore was interfacing a µC with matlab/simulink to be used as a platform for ADC/DAC testing and a lot of other cool things.

But after installing all support packages and trying to connect ta arduino(have tried Uno, Mega and Due) an error occurse in windows.

when trying to run:
a = arduino('com5','Due','TraceOn',true)
then matlab says:
Updating server code on Arduino Due (COM5). Please wait.
& then
windows responds with a programerror pop-up and in the top of the pop-up it says:
arm-none-eabi-gcc.exe - programfel(swedish for programerror)
and in the window(translated from sweidish) it says:
The program could not start correctly(0x0000142)

when that window get closed matlab proceeds to show:
EDU>> a = arduino('com5','Due','TraceOn',true)
Updating server code on Arduino Due (COM5). Please wait.
Vendor returned error messages:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/system/libsam"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/system/CMSIS/CMSIS/Include"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/system/CMSIS/Device/ATMEL"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/cores/arduino"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/cores/arduino/USB"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/variants/arduino_due_x"
-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param
max-inline-insns-single=500 -Dprintf=iprintf -mcpu=cortex-m3
-DF_CPU=84000000 -DARDUINO=156 -D__SAM3X8E__ -mthumb -DUSBCON
-DARDUINO_ARCH_SAM
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/sam/cores/arduino/WInterrupts.c
-o C:/Users/David/AppData/Local/Temp/ArduinoServer/WInterrupts.c.o
cs-make: ***
[C:/Users/David/AppData/Local/Temp/ArduinoServer/WInterrupts.c.o] Error
-1073741502

and with the uno:
EDU>> a = arduino('com4','Uno','TraceOn',true)
Updating server code on Arduino Uno (COM4). Please wait.
Vendor returned error messages:
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/tools/avr/bin/avr-gcc
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/avr/libraries/Wire/utility"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/avr/cores/arduino"
-I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/avr/variants/standard"
-mmcu=atmega328p -MMD -fno-exceptions -ffunction-sections -fdata-sections
-g -Os -w -D"F_CPU=16000000" -DUSB_VID=0x2341 -DUSB_PID=0x0043
-DARDUINO=156 -DARDUINO_ARCH_AVR -c -x none
C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/hardware/arduino/avr/cores/arduino/hooks.c
-o C:/Users/David/AppData/Local/Temp/ArduinoServer/hooks.c.o
make: *** [C:/Users/David/AppData/Local/Temp/ArduinoServer/hooks.c.o]
Error -1073741502

only the pop-up says "avr-gcc.exe"

All I can find out is that 0x0000142 is a general error that can occure in widows but I am far to ignorant in how widows works to be able to solve this, and I can't seam to find a suiteble place to ask.
I will call matlab support as well and see what they say.

does these messages tell anyone what the problem is?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…