Author Topic: Bad CPU type in executable  (Read 7798 times)


  • Newbie
  • *
  • Posts: 1
Bad CPU type in executable
« on: October 29, 2019, 07:30:02 pm »
Can anybody help, I am getting the following error when trying to compile and upload my code:

fork/exec /Users/XXXXX/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
Error compiling for board Digispark (Default - 16.5mhz).

This is running on a Macbook Pro 2015 with macOs Catalina 10.15
« Last Edit: October 29, 2019, 07:36:19 pm by Netenabled »


  • Newbie
  • *
  • Posts: 2
Re: Bad CPU type in executable
« Reply #1 on: November 06, 2019, 12:28:36 pm »
I think its the same error as I also encountered and solved here:,3198.msg14379.html#msg14379


  • Jr. Member
  • **
  • Posts: 73
Re: Bad CPU type in executable
« Reply #2 on: November 14, 2019, 03:17:44 am »
Hey Moderators, can someone please delete this person's account - all the spam we are getting is muddying up the board. I have reported a bunch of these spammers, but never gotten a response, nor has the spam been deleted.

If you need another set of eyes to watch over this board, I check it out a couple times a day, and am willing to kill off the spam, and get rid of the spammers.


  • Newbie
  • *
  • Posts: 3
Re: Bad CPU type in executable
« Reply #3 on: November 16, 2019, 05:06:14 pm »
The newest 1.8.10 has all the parts that are required inside.  One simply needs to trick the Digistump config to use what is included, instead of its own old, out of date, no longer supported snowflake of the AVR tools.

I found this easy enough by simply linking the current shipping 64bit version, into the Digistump tree.

First, make sure your board includes are all setup properly. Next, shutdown the Arduino IDE completely.  Finally, from a shell prompt, you are gonna move the Digistump snowflake out of the way, and link in the current shipping version:

$ cd ~/Library/Arduino15/packages/arduino/tools/avr-gcc
$ mv 4.8.1-arduino5 orig.4.8.1
$ ln -s /Applications/ 4.8.1-arduino5

You could just delete the old stuff I suppose.  But that should cover it for you.  Fire up Arduino IDE as normal and get back to work :)