MATLAB Answers

Compile error on Simulink with Arduino Due

3 ビュー (過去 30 日間)
Useok
Useok 2014 年 5 月 29 日
編集済み: Walter Roberson 2016 年 7 月 14 日
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 it on other computers but it shows same error except one.
Is there any guy suffer from this problem? or is there any solutions?
Diagnostic viewer of Matlab shows this:
------------------------------------------------------------------
"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

  0 件のコメント

サインインしてコメントする。

回答 (5 件)

Sreeram
Sreeram 2014 年 7 月 22 日
Hi,
Could you please post the model files if possible and that could be helpful in debugging?
Thanks, Sreeram Mohan

  0 件のコメント

サインインしてコメントする。


Liz
Liz 2014 年 9 月 19 日
I have the same error. Did anyone figure out how to fix this?

  0 件のコメント

サインインしてコメントする。


Markus
Markus 2014 年 10 月 21 日
You must have admin rights for
  • installation of matlab
  • installation of the Hardware Support Packages
  • usage of Matlab/Simulink
The usage of the Windows option „run as admin“ is the best way to do that.
This solution has been validated only under Windows 7.

  2 件のコメント

Markus
Markus 2015 年 1 月 13 日
My solution to fix that problem for Windows 7 and Windows 8.1:
  1. User has to have admin rights
  2. Create a new installation folder for Matlab (e.g. C:\MATLAB\R2014a\). Don’t use the Windows standard folders like (e.g. C:\Program Files\... or C:\Program Files (x86)\... )
  3. User has to have full access rights to this folder.
  4. Install Matlab with explicit administration rights
  5. Run Matlab with explicit administration rights and install the support packages
Can someone confirm this solution?
Ömer SAHAN
Ömer SAHAN 2015 年 1 月 21 日
I am trying this solution on win 8.1 but I see same error .please help.

サインインしてコメントする。


Dennis De Matteis
Dennis De Matteis 2015 年 1 月 22 日
Hi, i recently had the same problem. Since my computer is in a company's domain network, i can not simply log in as admin. Thus i searched for another solution and got it working by adding the "Run as Admin" compatibility flag to the following executable's:
C:\Program Files\Matlab\R2014b\bin\matlab.exe and C:\MATLAB\SupportPackages\R2014b\arduino-1.5.6-r2\hardware\tools\g++_arm_none_eabi\bin\cs-make.exe
Good Luck!
Dennis

  3 件のコメント

Ömer SAHAN
Ömer SAHAN 2015 年 2 月 8 日
Hi Dennis , I tried but it does not work. I still see the same error screen. Thank you
Essen
Essen 2015 年 5 月 22 日
Nice, this works for me. My OS is win 8.1 with Matlab 2015a. THANK YOU.
mohamad reza mohamadi
mohamad reza mohamadi 2016 年 7 月 14 日
Hi , thank you for your help , but i do this and the error still occurs

サインインしてコメントする。


mohamed abdelwahab
mohamed abdelwahab 2015 年 3 月 22 日
I have this issue in win 7 during using arduino due can anyone help me, please?

  0 件のコメント

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by