Go Down

Topic: Programming with Simulink 2014a (Read 3361 times) previous topic - next topic

snopyy

Hello.
Recently, Mathworks released support package for Arduino Due with simulink 2014a.

I tried to compile with simulink 2014a and there was an compile error regarding 'arm-none-eabi-gcc.exe'.
I cannot figure out the reason of that compile error.
I tried to do same thing on different PCs but most of the PCs failed compiling with an same error except one.

Is there are solution to solve this problem?

Below is the error massage from Simulink diagnostic viewer.

<Code Generation>

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"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"C:/Users/biorobotics/Documents/MATLAB/arduinodue_gettingstarted_rtt" -I"C:/Users/biorobotics/Documents/MATLAB" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"C:/Program Files/MATLAB/R2014a/extern/include" -I"C:/Program Files/MATLAB/R2014a/simulink/include" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2014a/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-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_gettingstarted" -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_gettingstarted.c ./arduinodue_gettingstarted_data.c ./ert_main.c

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cs-make: *** [IPAddress.o] Error 255

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"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"C:/Users/biorobotics/Documents/MATLAB/arduinodue_gettingstarted_rtt" -I"C:/Users/biorobotics/Documents/MATLAB" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"C:/Program Files/MATLAB/R2014a/extern/include" -I"C:/Program Files/MATLAB/R2014a/simulink/include" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2014a/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-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_gettingstarted" -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_gettingstarted.c ./arduinodue_gettingstarted_data.c ./ert_main.c

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cs-make: *** [IPAddress.o] Error 255

pradeep_ks

It doesn't look like an issue in the Arduino Due support package. Looks like the compiler arm-none-eabi-gcc.exe is corrupted or some problem with the PC environment which is causing termination of arm-none-eabi-gcc.exe execution.
Similar bugs are reported in web on arm-none-eabi-gcc.exe crashing anb below link points to one of it.
http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/45369.aspx?pi171693=1
Please try to remove .NET contents and reinstall it. Then try depolying the Arduino Due model.

judicael

Hye

I can't solve your problem because I have the same :-)
I reported this problem to the Matlab support in France, and hope they will find a solution.
I'll post their answer when I will receive it.

Have you encountered any other problem while programming others Arduino targets with this matlab version ?
Because, we have, here in my school, some problems of stability with simulink (all the blocks in library browser sometime disappear for example or slx file in the working folder is deleted after closing simulink...).


xand

#3
Jul 30, 2014, 09:07 am Last Edit: Jul 30, 2014, 09:37 am by xand Reason: 1
Hi,
Has anyone solved this problem yet?
I also have the same problem with the arm-none-eabi-gcc.exe and Matlab Simulink 2014a.
I installed the Microsoft Windows SDK for Windos 7 (7.1) (Version 7.1.7600.0.30514).
mex -setup shows:
Code: [Select]
mex -setup
MEX configured to use 'Microsoft Windows SDK 7.1 (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.

To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN


Would that be Ok?

But if I try to compile the arduinodue_gettingstated Example ("Preparing the model to run on 'arduino Due'... , 60% Statusbar) i get the  arm-none-eabi-gcc.exe error and this error message from Simulink diagnostic viewer.

Code: [Select]
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.6-r2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc" -I"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"C:/Users/prakt_lcm/Documents/MATLAB/arduinodue_gettingstarted_rtt" -I"C:/Users/prakt_lcm/Documents/MATLAB" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"C:/Program Files/MATLAB/R2014a/extern/include" -I"C:/Program Files/MATLAB/R2014a/simulink/include" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2014a/rtw/c/ert" -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" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/libraries/Servo/src" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/libraries/Servo/src/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_gettingstarted" -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_gettingstarted.c ./arduinodue_gettingstarted_data.c ./ert_main.c

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Cannot create temporary file in C:\Users\prakt_lcm\Documents\MATLAB\arduinodue_gettingstarted_rtt\"C:\Users\PRAKT_~1\AppData\Local\Temp"\: Invalid argument
cs-make: *** [IPAddress.o] Error 3


The build process will terminate as a result.

The build failed with the following message: "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/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"C:/Users/prakt_lcm/Documents/MATLAB/arduinodue_gettingstarted_rtt" -I"C:/Users/prakt_lcm/Documents/MATLAB" -I"C:/MATLAB/SupportPackages/R2014a/arduinodue/arduinoduedemos" -I"C:/Program Files/MATLAB/R2014a/extern/include" -I"C:/Program Files/MATLAB/R2014a/simulink/include" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src" -I"C:/Program Files/MATLAB/R2014a/rtw/c/src/ext_mode/common" -I"C:/Program Files/MATLAB/R2014a/rtw/c/ert" -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" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/libraries/Servo/src" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.5.6-r2/libraries/Servo/src/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_gettingstarted" -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_gettingstarted.c ./arduinodue_gettingstarted_data.c ./ert_main.c

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Cannot create temporary file in C:\Users\prakt_lcm\Documents\MATLAB\arduinodue_gettingstarted_rtt\"C:\Users\PRAKT_~1\AppData\Local\Temp"\: Invalid argument
cs-make: *** [IPAddress.o] Error 3



I hope somebody can help me
xand

xand

Problem solved!

I had to install and run all as admin.  :smiley-red:

xand

pradeep_ks

Hi Xand,
  Can you please elaborate on "Run all as Admin"?

You mean :

1. Login as Administrator
2. Install MATLAB
3. Install Arduino Due support package
4. Try deploying the Arduino Due model.

Thanks.

xand

yes, your list is correct.

1. Login as Administrator
2. Install MATLAB
3. Install Arduino Due support package
4. Try deploying the Arduino Due model.

Then it worked.

xand

sahomer

I'm about go crazy. I use matlab2014b and arduino due.I also have this problem.Does anyone know another solution ?

gatorback

For those following along, the 2015a version is working well: A/D inputs and digital output (driving an LED) was verified.

eugenio412

not for me, it wasn't working simulink 2015a, so i installed 2014b and now everything is fine, sometime the best option is to use the penultimate.

Go Up