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