Error downloading Simulink Model to Arduino uno

8 visualizaciones (últimos 30 días)
Sm EmbeddedSystem
Sm EmbeddedSystem el 15 de Oct. de 2015
Comentada: Walter Roberson el 2 de Jul. de 2018
I'm using Matlab 2014a (on a Windows 7 64-bit PC) with Arduino support package. But I can't download any model to a new Arduino uno. Tested with the arduinomega2560_gettingstarted model. I get the following error:
Error: 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.0.5/hardware/tools/avr/bin/avr-gcc" -I"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"F:/Formations/formation_esi2a_gen_code_auto/papillon motorisé/firststepsimulinkarduino_rtt" -I"F:/Formations/formation_esi2a_gen_code_auto/papillon motorisé" -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.0.5/hardware/arduino/cores/arduino" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/variants/standard" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Servo" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Ethernet" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Ethernet/utility" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/SPI" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/WiFi" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/WiFi/utility" -mmcu=atmega328p -ffunction-sections -fdata-sections -std=gnu99 -Wall -Wstrict-prototypes -g -Os -D"MODEL=firststepsimulinkarduino" -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"F_CPU=16000000" -D"ARDUINO=105" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_RTT_NUMSERVOS_=0" -c -x none ./HardwareSerial.cpp ./IPAddress.cpp ./Print.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./new.cpp ./wiring.c ./wiring_analog.c ./wiring_digital.c ./io_wrappers.cpp ./ert_main.c ./firststepsimulinkarduino.c ./firststepsimulinkarduino_data.c
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
./HardwareSerial.cpp:98: warning: comparison between signed and unsigned integer expressions
./HardwareSerial.cpp: In function 'void __vector_18()':
./HardwareSerial.cpp:127: warning: unused variable 'c'
./HardwareSerial.cpp: In member function 'void HardwareSerial::begin(long unsigned int, byte)':
./HardwareSerial.cpp:368: warning: unused variable 'current_config'
./HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
./HardwareSerial.cpp:467: warning: comparison between signed and unsigned integer expressions
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
./Print.cpp:44: warning: '__progmem__' attribute ignored
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./ert_main.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./ert_main.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino_data.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino_data.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
make: *** [HardwareSerial.o] Error 1
The build process will terminate as a result.
Caused by:
The build failed with the following message: "C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc" -I"C:/MATLAB/SupportPackages/R2014a/arduino/include" -I"C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include" -I"F:/Formations/formation_esi2a_gen_code_auto/papillon motorisé/firststepsimulinkarduino_rtt" -I"F:/Formations/formation_esi2a_gen_code_auto/papillon motorisé" -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.0.5/hardware/arduino/cores/arduino" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/variants/standard" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Servo" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Ethernet" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/Ethernet/utility" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/SPI" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/WiFi" -I"C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/libraries/WiFi/utility" -mmcu=atmega328p -ffunction-sections -fdata-sections -std=gnu99 -Wall -Wstrict-prototypes -g -Os -D"MODEL=firststepsimulinkarduino" -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"F_CPU=16000000" -D"ARDUINO=105" -D"_RUNONTARGETHARDWARE_BUILD_=" -D"_RTT_NUMSERVOS_=0" -c -x none ./HardwareSerial.cpp ./IPAddress.cpp ./Print.cpp ./WInterrupts.c ./WMath.cpp ./WString.cpp ./new.cpp ./wiring.c ./wiring_analog.c ./wiring_digital.c ./io_wrappers.cpp ./ert_main.c ./firststepsimulinkarduino.c ./firststepsimulinkarduino_data.c
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./HardwareSerial.cpp: In function 'void store_char(unsigned char, ring_buffer*)':
./HardwareSerial.cpp:98: warning: comparison between signed and unsigned integer expressions
./HardwareSerial.cpp: In function 'void __vector_18()':
./HardwareSerial.cpp:127: warning: unused variable 'c'
./HardwareSerial.cpp: In member function 'void HardwareSerial::begin(long unsigned int, byte)':
./HardwareSerial.cpp:368: warning: unused variable 'current_config'
./HardwareSerial.cpp: In member function 'virtual size_t HardwareSerial::write(uint8_t)':
./HardwareSerial.cpp:467: warning: comparison between signed and unsigned integer expressions
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
./Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
./Print.cpp:44: warning: '__progmem__' attribute ignored
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus.exe: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./ert_main.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./ert_main.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./ert_main.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:7:22: error: rtwtypes.h: No such file or directory
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:25:1: warning: "true" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino_data.c:17:
./rtwtypes.h:27:1: warning: this is the location of the previous definition
In file included from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_blocks_abstraction.h:8,
from C:/MATLAB/SupportPackages/R2014a/arduino/blocks/sfcn/include/arduino_digitaloutput_lct.h:11,
from ./firststepsimulinkarduino.h:26,
from ./firststepsimulinkarduino_data.c:17:
C:/MATLAB/SupportPackages/R2014a/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h:26:1: warning: "false" redefined
In file included from ./firststepsimulinkarduino.h:23,
from ./firststepsimulinkarduino_data.c:17:
./rtwtypes.h:23:1: warning: this is the location of the previous definition
make: *** [HardwareSerial.o] Error 1

Respuesta aceptada

Esther
Esther el 18 de Nov. de 2015
Did you change the target board to Arduino Uno in Tools -> Run on Target Hardware -> Options
  5 comentarios
Walter Roberson
Walter Roberson el 20 de Nov. de 2015
Good point, Saad. The tools do tend to have problems with spaces and with non-ASCII characters.
adel moussidene
adel moussidene el 5 de Mzo. de 2016
sm embeddedsystem tu peux m'aider plz ..... you can help me a have a bige problem

Iniciar sesión para comentar.

Más respuestas (1)

vitor henrique pagani
vitor henrique pagani el 29 de Jun. de 2018
Some one had found the solution for this problem? i have the same problem in my project
  1 comentario
Walter Roberson
Walter Roberson el 2 de Jul. de 2018
As Saad pointed out, the tools can sometimes have problems if you have spaces or non-ASCII characters such as é in your file names or directory names. You might need to rename your file or directory.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by