fork/exec /Users/****/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
Compilation error: fork/exec /Users/****/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
I found a few topics on this but they were all issues with Apple Silicon Chipsets which my iMac does not have. Any help is highly appreciated, thank you.
Hi @rflt. The cause of the error is that the compiler used by the "Digistump AVR Boards" platform is a 32-bit application:
Support for such applications was dropped starting from macOS Catalina:
Unfortunately Digistump stopped maintaining their platform many years ago. Fortunately the amazing Arduino community stepped up and provided modern support for the Digispark board even after the manufacturer of the board abandoned it. The current recommendation is to use the excellent ATTinyCore boards platform. Installation instructions for ATTinyCore are available here:
Unfortunately there is currently a problem with the website of the creator of ATTinyCore that causes the installation to fail. Instructions for a workaround to that problem are available here:
Sorry, I should have mentioned that there is a bug in Arduino IDE 2.2.1 that causes this problem (note this bug is completely independent from the problem with website that required the other workaround I mentioned in my previous reply).
I'll provide instructions you can follow for a workaround to the bug:
Select File > Quit from the Arduino IDE menus if it is running.
Open the following folder in your file manager program (e.g., Windows File Explorer):
/Users/<username>/Library/Arduino15/
(Where <username> is your macOS username) The Library folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.
You will see a file named package_drazzy.json in that folder. Rename it to package_drazzy.com_index.json.
Now start Arduino IDE again. You should now see ATTinyCore (as well as the other SpenceKonde/DrAzzy) platforms listed in Boards Manager and be able to install it as expected.
You are welcome. I'm glad it is working now. Great job fighting your way through the current unfortunate difficulties to a successful installation of ATTinyCore!