Error when deploying simulink model to Arduino

69 ビュー (過去 30 日間)
Ghazwan
Ghazwan 2017 年 6 月 15 日
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
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"
table
table 2017 年 7 月 28 日
hello,Do you solve this problem? how to do with this, thank you!

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

採用された回答

Raj Manandhar
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
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
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.

Kamlesh Vaghela
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
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 ExchangeRun on Target Hardware についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by