Error when deploying simulink model to Arduino

45 vues (au cours des 30 derniers jours)
Ghazwan
Ghazwan le 15 Juin 2017
Hello I'm using the built-in example of MATLAB to make an LED blink with Arduino. When I deploy it, it gives me a big error. I attached a text file of the error log. Could you please tell me how to fix that?
Thank you >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
=== Build (Elapsed: 8 sec) === ### Starting build procedure for model: arduino_gettingstarted Error:C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-g++ -std=gnu++11 -fpermissive -fno-exceptions -fno-threadsafe-statics -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10613 -MMD -MP -MF"MW_digitalio.dep" -MT"MW_digitalio.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=arduino_gettingstarted -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DTID01EQ=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DMW_TIMERID=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_ANALOG_REF_=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DTID01EQ=0 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=arduino_gettingstarted -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IF:/HelloMeo -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinobase/include -IF:/HelloMeo/arduino_gettingstarted_ert_rtw -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinotarget/arduinotargetdemos -IF:/Program Files/MATLABR2017a/extern/include -IF:/Program Files/MATLABR2017a/simulink/include -IF:/Program Files/MATLABR2017a/rtw/c/src -IF:/Program Files/MATLABR2017a/rtw/c/src/ext_mode/common -IF:/Program Files/MATLABR2017a/rtw/c/ert -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/variants/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinotarget/include -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinotarget/scheduler/include -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/shared/externalmode_daemon/include -o MW_digitalio.o C:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp avr-g++: error: Files/MATLABR2017a/extern/include: No such file or directory avr-g++: error: Files/MATLABR2017a/simulink/include: No such file or directory avr-g++: error: Files/MATLABR2017a/rtw/c/src: No such file or directory avr-g++: error: Files/MATLABR2017a/rtw/c/src/ext_mode/common: No such file or directory avr-g++: error: Files/MATLABR2017a/rtw/c/ert: No such file or directory gmake: * [MW_digitalio.o] Error 1 ### Build procedure for model: 'arduino_gettingstarted' aborted due to an error. Error:Error(s) encountered while building "arduino_gettingstarted": ### Failed to generate all binary outputs.
  2 commentaires
Nagarjuna Manchineni
Nagarjuna Manchineni le 20 Juin 2017
From the above command, I see that you are trying to include header files from the following location
-IF:/Program Files/MATLABR2017a/extern/include
However, because of space between Program and Files, the following error is occurring.
error: Files/MATLABR2017a/extern/include: No such file or directory
Can you verify the MATLAB installation path once. And if it is correct, try using quotes to consider the whole path as a single entity.
-I"F:/Program Files/MATLABR2017a/extern/include"
table
table le 28 Juil 2017
hello,Do you solve this problem? how to do with this, thank you!

Connectez-vous pour commenter.

Réponse acceptée

Raj Manandhar
Raj Manandhar le 10 Sep 2018
Hi,
I also had similar issues while using the Arduino Engineering Kit. Looking at the comment from Francis. I found out that the problem for me was that my current folder name (Engineering Kit) had space in between its name. So essentially when I changed it to (Engineering_Kit) it started working.
  1 commentaire
Alexis Javier Mayo
Alexis Javier Mayo le 4 Mar 2019
Thank you! I was very stressed because I couldn't fix this error. I removed all spaces and it runs ok.

Connectez-vous pour commenter.

Plus de réponses (2)

Francis GROSBOIS
Francis GROSBOIS le 16 Nov 2017
Hello,
I had the same problem, due to the name of the directory "séquentiel", i am french. Changed in "sequentiel" and all is ok.

Kamlesh Vaghela
Kamlesh Vaghela le 30 Déc 2018
How to Solve this Error?
It appears as though pwd (C:\Users\kamle\OneDrive\Documents\MATLAB) contains an existing build folder, while the root build folder in Simulink.fileGenControl is set to another folder. The build folder in pwd may shadow build artifacts in the root build folder and cause unexpected errors. Consider CDing to a folder that does not contain an existing build folder prior to initiating a build. The Build Process will terminate.
  1 commentaire
Walter Roberson
Walter Roberson le 30 Déc 2018
Either remove the build folder in the directory C:\Users\kamle\OneDrive\Documents\MATLAB, or else cd to a different directory that does not have a build folder in it, or else reconfigure Simulink.fileGenControl to use C:\Users\kamle\OneDrive\Documents\MATLAB as the build directory.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by