Error when deploying simulink model to Arduino
조회 수: 36 (최근 30일)
이전 댓글 표시
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
Nagarjuna Manchineni
2017년 6월 20일
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"
채택된 답변
Raj Manandhar
2018년 9월 10일
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
Alexis Javier Mayo
2019년 3월 4일
Thank you! I was very stressed because I couldn't fix this error. I removed all spaces and it runs ok.
추가 답변 (2개)
Francis GROSBOIS
2017년 11월 16일
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.
댓글 수: 0
Kamlesh Vaghela
2018년 12월 30일
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
Walter Roberson
2018년 12월 30일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!