Under certain conditions, startup or other operations of the Arduino development software might fail with a “bad CPU type in executable” error.
This problem can be solved by one of the methods described below:
If your Mac computer has an Apple Silicon processor
Using a native Apple Silicon version of the software is highly recommended and bypasses the need for Rosetta entirely.
Check for a Native Apple Silicon Version
If you are using an Apple Silicon Mac, verify that you have downloaded the native version of the software. For example, when downloading from the Software page, select the macOS Apple Silicon option instead of the Intel version.
Install Rosetta for Intel-based tools
Some tools used by the Arduino development software are built for x86-64 processors (Intel-based Macs). These can still run on Apple Silicon thanks to a translation tool named Rosetta, which is not pre-installed on macOS. If Rosetta is missing, these tools will fail with a “bad CPU type in executable” error.
If a native version of your tool is not available, you can install Rosetta by one of the following methods:
Installation Dialog
When you start an application that requires it, macOS will show a dialog offering installation of Rosetta. If you are presented with this dialog when starting the Arduino development software, click the button and complete the installation.
Manual Installation
If the tool requiring Rosetta is run as a background subprocess, macOS does not show a dialog. In this case, you must manually install Rosetta:
-
Open Terminal (instructions here).
-
Type the following command in the Terminal window:
softwareupdate --install-rosetta -
Press the Enter key.
-
Accept the license agreement with Apple.
-
Wait for the installation to finish.
If your computer has a different processor or Rosetta is already installed
Tools used by the Arduino development software may not be compatible with the processor on your computer. In this case, when the Arduino development software attempts to use the tool it will fail with a “bad CPU type in executable” error.
This type of incompatibility is usually caused by using a very old version of a tool. This is often the result of having an outdated version of the platform for your board installed. If so, the solution is to update to the latest version using the Arduino IDE Boards Manager:
- Select Tools > Board > Boards Manager… from the Arduino IDE menus to open the “Boards Manager” view.
- Scroll down through the list of boards platforms until you see the entry for the platform of the board you are using.
- Check to see whether there is a newer version listed in the menu at the bottom of the entry. If so, proceed with the rest of the steps in these instructions.
- Click the “INSTALL” button at the bottom of the entry.
- Wait for the update to finish.
- Close the “Boards Manager” view.