Matlab - Failed to program Arduino Board

When I open the above error message from the Hardware Setup, I get the following message.

This issue seems to be a result of my upgrade to MacOS Catalina 10.15.3.

fork/exec /Users/xxxxxxxx/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags: bad CPU type in executable

This would have been easier for us to understand if you attach a screenshot of the error message. Also, try to delete the support packages and install them again.

I am getting this error too and can not progress forward in the Arduino Engineering Kit as a result (stuck at Chapter 2 Matlab Getting Started - Configuring Arduino Libraries). I am using a Mac Air with MacOS 10.5.3.
I have installed MKRMotorCarrier library version 1.05

Log file (truncated) copied below:

Mar 05, 2020 9:08:39 AM com.mathworks.hwservices.logging
INFO: Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/hardware -hardware /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages -tools /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/tools-builder -tools /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages -built-in-libraries I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/cores/arduino" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/variants/mkr1000" "/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/sketch/IO_addOn.cpp" -o "/dev/null"
"/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino MKR1000"' "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/cores/arduino" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/variants/mkr1000" "-I/Users/michaelpeterson/Documents/Arduino/libraries/MKRMotorCarrier/src" "/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/sketch/IO_addOn.cpp" -o "/dev/null"
"/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10801 -DARDUINO_SAMD_MKR1000 -DARDUINO_ARCH_SAMD -DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino MKR1000"' "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/cores/arduino" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/variants/mkr1000" "-I/Users/michaelpeterson/Documents/Arduino/libraries/MKRMotorCarrier/src" "-I/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/libraries/Wire" "/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/sketch/IO_addOn.cpp" -o "/dev/null"
"/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/sketch/ArduinoServer.ino.cpp" -o "/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/preproc/ctags_target_for_gcc_minus_e.cpp"
"/Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/private/var/folders/sv/k6v40z9j54g54t25nng308pm0000gn/T/ArduinoServer/MW/preproc/ctags_target_for_gcc_minus_e.cpp"
Using library MKRMotorCarrier at version 1.0.5 in folder: /Users/michaelpeterson/Documents/Arduino/libraries/MKRMotorCarrier
Using library Wire at version 1.0 in folder: /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/libraries/Wire
Using library SPI at version 1.0 in folder: /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/idepkgs/packages/arduino/hardware/samd/1.8.5/libraries/SPI
Using library Servo at version 1.1.2 in folder: /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/libraries/Servo
fork/exec /Users/michaelpeterson/Documents/MATLAB/SupportPackages/R2019a/3P.instrset/arduinoide.instrset/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags: bad CPU type in executable

Also, if you advise to "...try to delete the support packages and install them again" please include instructions as to how to do that.

Please refer to this:Can someone explain to me how to fix this error: "bad CPU type in executable" - MATLAB Answers - MATLAB Central

If it is not compatible when will it be made so? This is stopping me from progressing with AEK.

map9000:
Please refer to this:Can someone explain to me how to fix this error: "bad CPU type in executable" - MATLAB Answers - MATLAB Central

If it is not compatible when will it be made so? This is stopping me from progressing with AEK.

Dear map900, I have the same exact problem and I am also stuck and unable to use my Engineering Kit, were you able to solve this issue?

I am on windows and am having a terrible time getting this to work. I install the arduino_engineering_rev1_2019a

follow all directions and it seems to produce a bad path in the arduinoserver temp folder

In file included from C:\Users\Austin\AppData\Local\Temp\ArduinoServer\MW\sketch\IO_addOn.cpp:12:0:
C:\Users\Austin\AppData\Local\Temp\ArduinoServer\MW\sketch\addOnLibraries.h:4:205: fatal error: C:\Users\Austin\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Arduino_Engineering _Kit_Rev_1_Hardware_Suppo rt_19a+\matlab\MATLABAddon+arduinoioaddons+arduino\src\MKRMotorCarrierBase.h: No such file or directory
#include "C:\Users\Austin\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Arduino_Engineering _Kit_Rev_1_Hardware_Suppo rt_19a+\matlab\MATLABAddon+arduinoioaddons+arduino\src\MKRMotorCarrierBase.h"
^
compilation terminated.
exit status 1

I cant upload the mkr motor carrier to the board from matlab which makes this whole thing dead in the water :frowning:

Not a solution, but do you notice the  characters in the path? Are they actually there, or are they a result of copy and paste. Maybe this Engineering Kit programming in matlab - #4 by aagrawal26 - Arduino Engineering Kit - Arduino Forum

Problem Solved

  • Matlab R2019b
  • Arduino-2 (1.8.10)

Ensure to remove the Matlab folder out of the documents folder before installing R2019b and all previous versions of the Arduino IDE.

Have not progressed the project yet, but I was able to program the board...