MATLAB Answers

Simulink code generation error for Arduino Engineering Kit

2 views (last 30 days)
Daniel Mundstock
Daniel Mundstock on 1 Dec 2019
Hello,
I'm getting the following error when trying to run the Simulink model in the external device (Arduino) in Chapter 2.3 of Arduino Engineering Kit.
Might someone help me with this?
I'm running it on a Windows 10 computer.
Code Generation
1
Elapsed: 16 sec
C:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++ -std=gnu++11 -fno-threadsafe-statics -fno-rtti -fno-exceptions -Os -c -g -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -DARDUINO=10801 -MMD -MP -MF"MW_PWM.dep" -MT"MW_PWM.o" -MMD -mcpu=cortex-m0plus -fpermissive -DF_CPU=48000000L -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x824e -DUSBCON -DUSB_MANUFACTURER=\""Unknown\"" -DUSB_PRODUCT=\""Genuino MKR1000\"" -D_RUNONTARGETHARDWARE_BUILD_ -D_ROTH_MKR1000_ -DMODEL=myDCMotorControl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DON_TARGET_WAIT_FOR_START=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DEXT_MODE=1 -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=9 -DMW_PRESCALAR=256 -DMW_TIMERCOUNT=18750 -DMW_SCHEDULERCOUNTER=1 -D_RTT_BAUDRATE_SERIAL0_=9600 -D_RTT_BAUDRATE_SERIAL1_=9600 -D_RTT_ANALOG_REF_=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DEXT_MODE=1 -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DON_TARGET_WAIT_FOR_START=1 -DXCP_CUSTOM_PLATFORM -DEXIT_FAILURE=1 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DSTACK_SIZE=64 -DRT -DMODEL=myDCMotorControl -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -IC:/Users/danie/AppData/Roaming/MathWorks/MATLAB Add-Ons/Toolboxes/Arduino_Engineering_Kit_Project_Files/work -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/shared/svd/include -IC:/Users/danie/AppData/Roaming/MathWorks/MATLAB Add-Ons/Toolboxes/Arduino_Engineering_Kit_Project_Files/work/myDCMotorControl_ert_rtw -IC:/PROGRA~1/MATLAB/R2019a/extern/include -IC:/PROGRA~1/MATLAB/R2019a/simulink/include -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/src -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2019a/rtw/c/ert -IC:/PROGRA~1/MATLAB/R2019a/toolbox/coder/rtiostream/src -IC:/PROGRA~1/MATLAB/R2019a/toolbox/coder/rtiostream/src/utils -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS-Atmel/1.1.0/CMSIS/Device/ATMEL -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.6.20/cores/arduino -IC:/ProgramData/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.6.20/variants/mkr1000 -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinotarget/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinotarget/scheduler/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/armcortexmbase/scheduler/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinobase/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/shared/externalmode_daemon/include -IC:/PROGRA~3/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/armcortexmbase/xcp/include -o MW_PWM.o C:/ProgramData/MATLAB/SupportPackages/R2019a/toolbox/target/supportpackages/arduinobase/src/MW_PWM.cpp arm-none-eabi-g++: error: Add-Ons/Toolboxes/Arduino_Engineering_Kit_Project_Files/work: No such file or directory arm-none-eabi-g++: error: Add-Ons/Toolboxes/Arduino_Engineering_Kit_Project_Files/work/myDCMotorControl_ert_rtw: No such file or directory gmake: *** [MW_PWM.o] Error 1 The make command returned an error of 2
### Build procedure for model: 'myDCMotorControl' aborted due to an error.
Error(s) encountered while building "myDCMotorControl": ### Failed to generate all binary outputs.
Thanks
Daniel.

Answers (0)

Community Treasure Hunt

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

Start Hunting!