Arduino Simulink - No rule to make target MW_arduino_digitalio.cpp
2 次查看(过去 30 天)
显示 更早的评论
Hi all. I am having a very wierd issue where my Simulink model will deploy to the Arduino correcty if I am inside a subfolder and will not deploy if the model is in the main folder. Everything resides inside a matlab project currently. There are no spaces in the folder names anywhere (I checked for that already).
Can someone help me figure out what is happening here, please? Error message is below (lightly edited so it isn't 2700 chars long...
"C:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-g++"
-std=gnu++11
-fpermissive
-fno-exceptions
-fno-threadsafe-statics
-c
-w
-ffunction-sections
-fdata-sections
-MMD
-DARDUINO=10801
-MMD
-MP
-MF"MW_arduinoI2C.dep"
-MT"MW_arduinoI2C.o"
-Os
-mmcu=atmega328p
-DF_CPU=16000000L
-DARDUINO_AVR_UNO
-DARDUINO_ARCH_AVR
-D_RUNONTARGETHARDWARE_BUILD_
-D_RTT_USE_SERIAL0_
-DMODEL=topLevel
-DNUMST=1
-DNCSTATES=0
-DHAVESTDIO
-DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
-DCLASSIC_INTERFACE=0
-DALLOCATIONFCN=0
-DTID01EQ=0
-DONESTEPFCN=1
-DTERMFCN=1
-DMULTI_INSTANCE_CODE=0
-DINTEGER_CODE=0
-DMT=0
-DXCP_CUSTOM_PLATFORM
-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
-DCLASSIC_INTERFACE=0
-DALLOCATIONFCN=0
-DONESTEPFCN=1
-DTERMFCN=1
-DMULTI_INSTANCE_CODE=0
-DINTEGER_CODE=0
-DMT=0
-DTID01EQ=0
-DXCP_CUSTOM_PLATFORM
-DEXIT_FAILURE=1
-DEXTMODE_DISABLEPRINTF
-DEXTMODE_DISABLETESTING
-DEXTMODE_DISABLE_ARGS_PROCESSING=1
-DSTACK_SIZE=64
-DRT
-DMODEL=topLevel
-DNUMST=1
-DNCSTATES=0
-DHAVESTDIO
-DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
-ID:/Documents/MSE/Projects/FloatSat/matlab/rawCode
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/shared/svd/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~2/include
-ID:/Documents/MSE/Projects/FloatSat/matlab/rawCode/topLevel_ert_rtw
-IE:/extern/include
-IE:/simulink/include
-IE:/rtw/c/src
-IE:/rtw/c/src/ext_mode/common
-IE:/rtw/c/ert
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/standard
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/libraries/Servo/src
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~1/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~1/SCHEDU~1/include
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/shared/EXTERN~1/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/3P778C~1.INS/ARDUIN~1.INS/hardware/arduino/avr/LIBRAR~1/Wire/src
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/3P778C~1.INS/ARDUIN~1.INS/hardware/arduino/avr/LIBRAR~1/Wire/src/utility
-o "MW_arduinoI2C.o" "C:/ProgramData/MATLAB/SupportPackages/R2019b/toolbox/target/supportpackages/arduinobase/src/MW_arduinoI2C.cpp"
"C:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/tools/avr/bin/avr-g++"
-std=gnu++11
-fpermissive
-fno-exceptions
-fno-threadsafe-statics
-c
-w
-ffunction-sections
-fdata-sections
-MMD
-DARDUINO=10801
-MMD
-MP
-MF"MW_SerialWrite.dep"
-MT"MW_SerialWrite.o"
-Os
-mmcu=atmega328p
-DF_CPU=16000000L
-DARDUINO_AVR_UNO
-DARDUINO_ARCH_AVR
-D_RUNONTARGETHARDWARE_BUILD_
-D_RTT_USE_SERIAL0_
-DMODEL=topLevel
-DNUMST=1
-DNCSTATES=0
-DHAVESTDIO
-DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
-DCLASSIC_INTERFACE=0
-DALLOCATIONFCN=0
-DTID01EQ=0
-DONESTEPFCN=1
-DTERMFCN=1
-DMULTI_INSTANCE_CODE=0
-DINTEGER_CODE=0
-DMT=0
-DXCP_CUSTOM_PLATFORM
-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
-DCLASSIC_INTERFACE=0
-DALLOCATIONFCN=0
-DONESTEPFCN=1
-DTERMFCN=1
-DMULTI_INSTANCE_CODE=0
-DINTEGER_CODE=0
-DMT=0
-DTID01EQ=0
-DXCP_CUSTOM_PLATFORM
-DEXIT_FAILURE=1
-DEXTMODE_DISABLEPRINTF
-DEXTMODE_DISABLETESTING
-DEXTMODE_DISABLE_ARGS_PROCESSING=1
-DSTACK_SIZE=64
-DRT
-DMODEL=topLevel
-DNUMST=1
-DNCSTATES=0
-DHAVESTDIO
-DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0
-ID:/Documents/MSE/Projects/FloatSat/matlab/rawCode
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/shared/svd/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~2/include
-ID:/Documents/MSE/Projects/FloatSat/matlab/rawCode/topLevel_ert_rtw
-IE:/extern/include
-IE:/simulink/include
-IE:/rtw/c/src
-IE:/rtw/c/src/ext_mode/common
-IE:/rtw/c/ert
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/cores/arduino
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/arduino/avr/variants/standard
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/libraries/Servo/src
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~1/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/SUPPOR~1/ARDUIN~1/SCHEDU~1/include
-IC:/ProgramData/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/hardware/tools/avr/avr/include/avr
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/toolbox/target/shared/EXTERN~1/include
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/3P778C~1.INS/ARDUIN~1.INS/hardware/arduino/avr/LIBRAR~1/Wire/src
-IC:/PROGRA~3/MATLAB/SUPPOR~1/R2019b/3P778C~1.INS/ARDUIN~1.INS/hardware/arduino/avr/LIBRAR~1/Wire/src/utility
-o "MW_SerialWrite.o" "C:/ProgramData/MATLAB/SupportPackages/R2019b/toolbox/target/supportpackages/arduinobase/src/MW_SerialWrite.cpp"
gmake: *** No rule to make target `C:/ProgramData/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinobase/src/MW_arduino_digitalio.cpp', needed by `MW_arduino_digitalio.o'. Stop.
The make command returned an error of 2
Error(s) encountered while building "topLevel":
### Failed to generate all binary outputs.
3 个评论
Jesse Chen
2020-5-31
This is very likely bacuase you didn't delete the files generated by 19a. Try deleting all files generated by 19a, or do the codegen in a new folder.
Abhishek Kumar Shastry
2022-3-2
Thank you jesse!! this solved my problem. It was similar, would you mind creating a clear button in matlab to clear all the generated code, so that future users do not have to go through this.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Run on Target Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!