6783浏览
查看: 6783|回复: 2

[求助] arduino用simulink编译失败

[复制链接]
所有弄好后,点击deploy to hardware 出错了,下面是报错,不知道错在哪。
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=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -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 -D_MW_ARDUINO_LOOP_=1 -DMW_ARDUINO_STEP_SIZE=100000 -DMW_ARDUINO_MICROS -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_BAUDRATE_SERIAL1_=9600 -D_RTT_BAUDRATE_SERIAL2_=9600 -D_RTT_BAUDRATE_SERIAL3_=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 -IE:/matlab experiment -IC:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinobase/include -ID:/Program Files/MATLAB/R2017a/simulink/include/sf_runtime -IE:/matlab experiment/arduino_gettingstarted_ert_rtw -ID:/Program Files/MATLAB/R2017a/extern/include -ID:/Program Files/MATLAB/R2017a/simulink/include -ID:/Program Files/MATLAB/R2017a/rtw/c/src -ID:/Program Files/MATLAB/R2017a/rtw/c/src/ext_mode/common -ID:/Program Files/MATLAB/R2017a/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/mega -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: experiment: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/simulink/include/sf_runtime: No such file or directory
avr-g++: error: experiment/arduino_gettingstarted_ert_rtw: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/extern/include: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/simulink/include: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/rtw/c/src: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/rtw/c/src/ext_mode/common: No such file or directory
avr-g++: error: Files/MATLAB/R2017a/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(s) encountered while building "arduino_gettingstarted":
### Failed to generate all binary outputs.

gada888  版主

发表于 2017-7-28 20:22:59

No such file or directory
可能是你没有把simulink的库文件放到arduino library里。
回复

使用道具 举报

fats114  初级技师

发表于 2017-8-4 15:27:58

真够乱的,Matlab Arduino Support package把Simulink Arduino Support package的部分路径映射错了,这两个模块最好别一起装,重新安装Simulink Arduino Support package,arduino.mlpkginstall直接拖到matla命令框中,按照提示安装。同时第一次Run on target Hardware的时候检查一下,如果还不行,手动设置arduino的时候手动添加avr的include(可以偷懒映射到arduino ide的子文件夹下,版本更新一点)。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
关于楼主

楼主的其它帖子

上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail