### Generating code into build folder: C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw
The file containing block diagram 'Motor_test3' is shadowed by a file of the same name higher on the MATLAB path. This can cause unexpected behavior. For more information see "Avoiding Problems with Shadowed Files" in the Simulink documentation.
The file containing the block diagram is: C:\Users\AmirMM\Desktop\Motor_test3.slx.
The file higher on the MATLAB path is: C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3.slx [2 similar]
Component:Simulink | Category:Block diagram warning
### Invoking Target Language Compiler on Motor_test3.rtw
### Using System Target File: C:\Program Files\MATLAB\R2017b\rtw\c\ert\ert.tlc
### Loading TLC function libraries
...
### Initial pass through model to cache user defined code
...
### Caching model source code
...
### Writing header file Motor_test3_types.h
### Writing source file Motor_test3.c
### Writing header file Motor_test3_private.h
.
### Writing header file Motor_test3.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rtGetNaN.h
.
### Writing source file rtGetNaN.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing source file Motor_test3_data.c
### Writing header file rtmodel.h
.
### Writing source file ert_main.c
### TLC code generation complete.
### Generating TLC interface API.
...
### Creating data type transition file Motor_test3_dt.h
.[Warning: Name is nonexistent or not a directory: C:\Users\AmirMM\Documents\MATLAB\Master Project]
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: Arduino AVR v1.8.1 | gmake (64-bit Windows)
### 'C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw\Motor_test3.mk' is up to date
### Building 'Motor_test3': "C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f Motor_test3.mk all
C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw>cd .
C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f Motor_test3.mk all ) else ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -f Motor_test3.mk )
C:/ProgramData/MATLAB/SupportPackages/R2017b/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/tools/avr/bin/avr-g++ -std=gnu++11 -fpermissive -fno-exceptions -fno-threadsafe-statics -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10801 -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=Motor_test3 -DNUMST=2 -DNCSTATES=1 -DHAVESTDIO -DON_TARGET_WAIT_FOR_START=1 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DEXT_MODE=1 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=1 -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=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=64911 -DMW_SCHEDULERCOUNTER=1 -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 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DEXT_MODE=1 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DON_TARGET_WAIT_FOR_START=1 -DTID01EQ=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=Motor_test3 -DNUMST=2 -DNCSTATES=1 -DHAVESTDIO -IC:/Users/AmirMM/Documents/MATLAB/MasterProject -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/include -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/blocks/sfcn/include -IC:/PROGRA~1/MATLAB/R2017b/simulink/include/sf_runtime -IC:/Users/AmirMM/Documents/MATLAB/MasterProject/Motor_test3_ert_rtw -IC:/Users/AmirMM/Desktop -IC:/PROGRA~1/MATLAB/R2017b/extern/include -IC:/PROGRA~1/MATLAB/R2017b/simulink/include -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2017b/toolbox/coder/rtiostream/src/utils -IC:/ProgramData/MATLAB/SupportPackages/R2017b/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/arduino/avr/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2017b/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/arduino/avr/variants/mega -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinotarget/include -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinotarget/scheduler/include -IC:/ProgramData/MATLAB/SupportPackages/R2017b/3P.instrset/arduinoide.instrset/arduino-1.8.1/hardware/tools/avr/avr/include/avr -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/shared/externalmode_daemon/include -o MW_digitalio.o C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp
In file included from C:/Users/AmirMM/Documents/MATLAB/MasterProject/Arduino.h:56:0,
from C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:1:
C:/Users/AmirMM/Documents/MATLAB/MasterProject/compiler.h:917:4: error: #error If you are here, you should check what is exactly the processor you are using...
#error If you are here, you should check what is exactly the processor you are using...
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp: In function 'void digitalIOSetup(uint8_T, boolean_T)':
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:10:22: error: 'OUTPUT' was not declared in this scope
pinMode(pin, OUTPUT);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:10:28: error: 'pinMode' was not declared in this scope
pinMode(pin, OUTPUT);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:13:22: error: 'INPUT' was not declared in this scope
pinMode(pin, INPUT);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:13:27: error: 'pinMode' was not declared in this scope
pinMode(pin, INPUT);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp: In function 'void writeDigitalPin(uint8_T, boolean_T)':
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:21:31: error: 'digitalWrite' was not declared in this scope
digitalWrite(pin, HIGH);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:24:30: error: 'digitalWrite' was not declared in this scope
digitalWrite(pin, LOW);
^
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp: In function 'boolean_T readDigitalPin(uint8_T)':
C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/arduinobase/src/MW_digitalio.cpp:33:27: error: 'digitalRead' was not declared in this scope
ret = (digitalRead(pin) == HIGH) ? 1:0;
^
gmake: *** [MW_digitalio.o] Error 1
C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
C:\Users\AmirMM\Documents\MATLAB\MasterProject\Motor_test3_ert_rtw>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Creating HTML report file Motor_test3_codegen_rpt.html
### Build procedure for model: 'Motor_test3' aborted due to an error.
Error(s) encountered while building "Motor_test3":
### Failed to generate all binary outputs.
1 Comment
Walter Roberson (view profile)
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/356266-failed-to-generate-all-binary-outputs#comment_484937
Sign in to comment.