Digispark compliation error

Hi,

  • Intel iMac (3.3 GHz 6-Core Intel Core i5), MacOS Sonoma 14.0
  • Updated to IDE 2.2.1 as I am getting new hardware tomorrow.
  • Added board manager URL: http://digistump.com/package_digistump_index.json
  • Installed "Digistump AVR Boards" version 1.6.7 (latest)
  • Wrote a small script (selected board "Digispark (Default - 16.5mhz)":
int led_int = 1;

void setup() {
  pinMode(led_int, OUTPUT);
}

void loop() {
  digitalWrite(led_int, HIGH);
  delay(1000);
  digitalWrite(led_int, LOW);
  delay(1000);
}

Compliation fails:

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:

https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/Installation.md

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:

https://forum.arduino.cc/t/2-2-1-board-manager-download-additional-boards/1182930/28

and information about using your Digispark board with ATTinyCore is available here:

https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/avr/extras/Ref_Micronucleus.md


In case you have trouble with ATTinyCore, there is an alternative boards platform that is also very nice (though no longer maintained):

Thank you so much @ptillisch , unfortunately I'm still stuck. Downloaded the

micronucleus-cli-2.5-azd1-x86_64-apple-darwin.tar.bz2

file and copied it to the Arduino15/staging/packages folder. Restarted Arduino IDE and added

http://drazzy.com/package_drazzy.com_index.json

to the additional board manager URLs. Now I'm stuck, can't see anything I could install in the board manager?

Note: I do have a file

micronucleus-2.0a4-osx.tar.gz

in my Library folder as well.

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:

  1. Select File > Quit from the Arduino IDE menus if it is running.
  2. Open the following folder in your file manager program (e.g., Windows File Explorer):
    /Users/<username>/Library/Arduino15/
    
    (Where <username> is your macOS username)
    :exclamation: The Library folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.
  3. 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.

@ptillisch Thank you so much for support and great descriptions of what to do:

Successfully installed platform ATTinyCore:1.5.2

:star_struck:

Edit: first sketch uploaded, works like a charm :grinning:

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!

Regards,
Per

1 Like

Thank you Per! Best regards, Robin

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.