=== Simulation (Elapsed: 13 sec) === ### Starting build procedure for model: DEMO_sfunc_MAX6675 ### Generating code into build folder: C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw ### Invoking Target Language Compiler on DEMO_sfunc_MAX6675.rtw ### Using System Target File: C:\Program Files\MATLAB\R2017a\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 DEMO_sfunc_MAX6675.h ### Writing header file DEMO_sfunc_MAX6675_types.h ### Writing header file rtwtypes.h ### Writing header file multiword_types.h . ### Writing source file DEMO_sfunc_MAX6675.c ### Writing header file DEMO_sfunc_MAX6675_private.h ### Writing header file rtmodel.h ### Writing source file ert_main.c ### TLC code generation complete. ### Generating TLC interface API. .. ### Creating data type transition file DEMO_sfunc_MAX6675_dt.h .### Evaluating PostCodeGenCommand specified in the model ### Using toolchain: Arduino AVR v1.6.13 | gmake (64-bit Windows) ### Creating 'C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw\DEMO_sfunc_MAX6675.mk' ... ### Building 'DEMO_sfunc_MAX6675': "C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f DEMO_sfunc_MAX6675.mk all C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw>cd . C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw>if "" == "" ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f DEMO_sfunc_MAX6675.mk all ) else ("C:\PROGRA~1\MATLAB\R2017a\bin\win64\gmake" -f DEMO_sfunc_MAX6675.mk ) C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-gcc -std=gnu11 -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10613 -MMD -MP -MF"DEMO_sfunc_MAX6675.dep" -MT"DEMO_sfunc_MAX6675.o" -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -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=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=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -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 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675/DEMO_sfunc_MAX6675_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2017a/toolbox/coder/rtiostream/src/utils -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/toolbox/target/supportpackages/arduinobase/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 DEMO_sfunc_MAX6675.o DEMO_sfunc_MAX6675.c C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-gcc -std=gnu11 -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10613 -MMD -MP -MF"ext_work.dep" -MT"ext_work.o" -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -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=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=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -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 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675/DEMO_sfunc_MAX6675_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2017a/toolbox/coder/rtiostream/src/utils -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/toolbox/target/supportpackages/arduinobase/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 ext_work.o C:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common/ext_work.c C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-gcc -std=gnu11 -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10613 -MMD -MP -MF"rtiostream_utils.dep" -MT"rtiostream_utils.o" -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -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=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=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -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 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675/DEMO_sfunc_MAX6675_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2017a/toolbox/coder/rtiostream/src/utils -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/toolbox/target/supportpackages/arduinobase/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 rtiostream_utils.o C:/PROGRA~1/MATLAB/R2017a/toolbox/coder/rtiostream/src/utils/rtiostream_utils.c C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-gcc -std=gnu11 -c -g -w -ffunction-sections -fdata-sections -MMD -DARDUINO=10613 -MMD -MP -MF"s_func_MAX6675_wrapper.dep" -MT"s_func_MAX6675_wrapper.o" -Os -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MEGA2560_ -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -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=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=5 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -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 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=DEMO_sfunc_MAX6675 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675 -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -IC:/Users/Tobias/Desktop/DEMO_sfunc_MAX6675/DEMO_sfunc_MAX6675_ert_rtw -IC:/PROGRA~1/MATLAB/R2017a/extern/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2017a/toolbox/coder/rtiostream/src/utils -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/toolbox/target/supportpackages/arduinobase/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 s_func_MAX6675_wrapper.o ../s_func_MAX6675_wrapper.c In file included from ../s_func_MAX6675_wrapper.c:21:0: ../max6675.h:10:1: error: unknown type name 'class' class MAX6675 { ^ ../max6675.h:10:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token class MAX6675 { ^ In file included from ../max6675.cpp:11:0, from ../s_func_MAX6675_wrapper.c:22: ../max6675.h:10:1: error: unknown type name 'class' class MAX6675 { ^ ../max6675.h:10:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token class MAX6675 { ^ In file included from ../s_func_MAX6675_wrapper.c:22:0: ../max6675.cpp:13:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token MAX6675::MAX6675(int8_t SCLK, int8_t CS, int8_t MISO) { ^ ../max6675.cpp:25:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token double MAX6675::readCelsius(void) { ^ ../max6675.cpp:49:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token double MAX6675::readFahrenheit(void) { ^ ../max6675.cpp:53:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token byte MAX6675::spiread(void) { ^ ../s_func_MAX6675_wrapper.c:30:1: error: unknown type name 'MAX6675' MAX6675 thermocouple(52,50,24); ^ ../s_func_MAX6675_wrapper.c:30:22: error: expected declaration specifiers or '...' before numeric constant MAX6675 thermocouple(52,50,24); ^ ../s_func_MAX6675_wrapper.c:30:25: error: expected declaration specifiers or '...' before numeric constant MAX6675 thermocouple(52,50,24); ^ ../s_func_MAX6675_wrapper.c:30:28: error: expected declaration specifiers or '...' before numeric constant MAX6675 thermocouple(52,50,24); ^ ../s_func_MAX6675_wrapper.c: In function 's_func_MAX6675_Outputs_wrapper': ../s_func_MAX6675_wrapper.c:61:21: error: 'thermocouple' undeclared (first use in this function) temp_celsius[0]=thermocouple.readCelsius(); ^ ../s_func_MAX6675_wrapper.c:61:21: note: each undeclared identifier is reported only once for each function it appears in gmake: *** [s_func_MAX6675_wrapper.o] Error 1 C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw>echo The make command returned an error of 2 The make command returned an error of 2 C:\Users\Tobias\Desktop\DEMO_sfunc_MAX6675\DEMO_sfunc_MAX6675_ert_rtw>An_error_occurred_during_the_call_to_make Der Befehl "An_error_occurred_during_the_call_to_make" ist entweder falsch geschrieben oder konnte nicht gefunden werden. ### Creating HTML report file DEMO_sfunc_MAX6675_codegen_rpt.html ### Build procedure for model: 'DEMO_sfunc_MAX6675' aborted due to an error. Error:Error(s) encountered while building "DEMO_sfunc_MAX6675": ### Failed to generate all binary outputs.