ERRO WHEN RUN ON HARDWARE TARGET TESTING ULTRASONIC SENSOR (SR-04)

2 Ansichten (letzte 30 Tage)
duong tran
duong tran am 27 Mai 2018
Beantwortet: Pratik am 17 Jul. 2024
I created a file to measure the distance with SR-04 sensor (fig.). And there is a problem with the following error:
if true
### Starting build procedure for model: nhandangbom
Code Generation 1 1 1
Elapsed: 10 sec
ans =
logical
Warning: Name is nonexistent or not a directory: C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\arduino-1.6.13\hardware\arduino\avr\libraries\Wire\utility
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"nhandangbom.dep" -MT"nhandangbom.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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 nhandangbom.o nhandangbom.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=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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"rtiostream_interface.dep" -MT"rtiostream_interface.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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_interface.o C:/PROGRA~1/MATLAB/R2017a/rtw/c/src/ext_mode/common/rtiostream_interface.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_svr_daemon.dep" -MT"ext_svr_daemon.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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_svr_daemon.o C:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/shared/externalmode_daemon/src/ext_svr_daemon.c
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"rtiostream_serial_daemon.dep" -MT"rtiostream_serial_daemon.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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_serial_daemon.o C:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/supportpackages/arduinotarget/registry/../src/rtiostream_serial_daemon.cpp
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"updown.dep" -MT"updown.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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 updown.o C:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/shared/externalmode_daemon/src/updown.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"daemon_checksum.dep" -MT"daemon_checksum.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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 daemon_checksum.o C:/ProgramData/MATLAB/SupportPackages/R2017a/toolbox/target/shared/externalmode_daemon/src/daemon_checksum.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"ert_main.dep" -MT"ert_main.o" -Os -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -D_RUNONTARGETHARDWARE_BUILD_ -DMODEL=nhandangbom -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=1 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=59286 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=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=nhandangbom -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/libraries/Wire/utility -IC:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/include -IC:/PROGRA~1/MATLAB/R2017a/simulink/include/sf_runtime -ID:/Duongtoro/Vixuly/Do.an/Nhandanghethong/nhandangbom_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/standard -IC:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/libraries/Servo/src -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 ert_main.o ert_main.c
"### Creating standalone executable "../nhandangbom.elf" ..."
C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections,--relax -mmcu=atmega328p -o ../nhandangbom.elf NewPing.o HCSR04wrapper.o nhandangbom.o ext_work.o rtiostream_utils.o hooks.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o abi.o CDC.o HardwareSerial.o HardwareSerial0.o HardwareSerial1.o HardwareSerial2.o HardwareSerial3.o PluggableUSB.o IPAddress.o new.o Print.o Stream.o Tone.o USBCore.o WMath.o WString.o MW_ArduinoHWInit.o io_wrappers.o arduinoAVRScheduler.o rtiostream_interface.o ext_svr_daemon.o rtiostream_serial_daemon.o updown.o daemon_checksum.o ert_main.o -lm
Tone.o: In function `__vector_7':
C:/ProgramData/MATLAB/SupportPackages/R2017a/3P.instrset/arduinoide.instrset/arduino-1.6.13/hardware/arduino/avr/cores/arduino/Tone.cpp:539: multiple definition of `__vector_7'
NewPing.o:C:/Users/DUONGT~1/DOCUME~1/MATLAB/RASPlib/src/NewPing.cpp:218: first defined here
c:/programdata/matlab/supportpackages/r2017a/3p.instrset/arduinoide.instrset/arduino-1.6.13/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
collect2.exe: error: ld returned 1 exit status
gmake: *** [../nhandangbom.elf] Error 1
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Build procedure for model: 'nhandangbom' aborted due to an error.
Error(s) encountered while building "nhandangbom":
### Failed to generate all binary outputs.
end

Antworten (1)

Pratik
Pratik am 17 Jul. 2024
Hi Duong,
From what can be understood from the error message, some particular system object is using the "NewPing.cpp" file which includes the definition of a timer interrupt handler.
The Simulink Arduino Support package also includes a "Tone.cpp" in the build process, which also contains a definition of the same timer interrupt handler as "NewPing.cpp". This results in a conflict during the build process.
A solution to this issue can be to exclude "Tone.cpp" from the build process. This can be done by following the steps below:
1. Go to the following location in your MATLAB support package root folder
XXXXX\toolbox\target\supportpackages\arduinotarget/registry/attributes
where XXXXX is the root support package folder location and can be obtained by executing "matlabshared.supportpkg.getSupportPackageRoot" at the MATLAB command window.
Note: You might have multiple folders containing "R20XXb" in the "SupportPackages" folder. Simply use the one that contains the "toolbox" folder in it.
2. Make a copy of the file "Arduino Uno_attributes.xml" for backup, and then open it in a text editor.
3. Delete line 31 from "Arduino Uno_attributes.xml" which includes "Tone.cpp" for the build.
4. Execute the following commands at the MATLAB command window.
clear classes
rehash toolboxcache
sl_refresh_customizations
5. Now open your Simulink model. Go to "Configuration Parameters --> Hardware Implementation" and reselect the "Hardware board" to "Arduino Uno"
6. Try to build and deploy the model.
I hope this helps!

Kategorien

Mehr zu Arduino Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by