Author Topic: Mac OS X Catalina: 64-bit Support for Arduino IDE  (Read 24803 times)

Gecko

  • Newbie
  • *
  • Posts: 3
Mac OS X Catalina: 64-bit Support for Arduino IDE
« on: October 10, 2019, 01:51:32 am »
Hello Gents

I'm new to this forum.
I am working with the Digispark Pro since two years now. My preferred develop environment is the Arduino IDE (currently 1.8.11).
So far I could solve all problems I've encountered using forums and google :D

For compiling and loading I use the Board Manager from Digistump: http://digistump.com/package_digistump_index.json

Before Mac OS X Catalina which forces all applications to run on 64-bit, everything worked perfectly.
After upgrading the Mac, Ardunio IDE still works fine for non-Digistump boards. Compilation and Loading works great.
But when switching the IDE to the Board "Digistump AVR Boards - Digistump Pro (Default 16MHz)", I'll get the following error message during compile time:
 
Detecting libraries used...
/Users/Foo/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny167 -DF_CPU=16000000L -DARDUINO=10811 -DARDUINO_AVR_DIGISPARKPRO -DARDUINO_ARCH_AVR -I/Users/Foo/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/cores/pro -I/Users/Foo/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/variants/pro /var/folders/xk/rpmnzjmd2lld6tgtbrx2kjhc0000gn/T/arduino_build_250432/sketch/sketch_oct10a.ino.cpp -o /dev/null
fork/exec /Users/Foo/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++: bad CPU type in executable
Error compiling for board Digispark Pro (Default 16 Mhz).


Please forgive if somebody else already posted this problem in the forum before. I couldn't find it.
Does anybody know how to solve this issue?

Many thanks!

Gecko

  • Newbie
  • *
  • Posts: 3
Re: Mac OS X Catalina: 64-bit Support for Arduino IDE
« Reply #1 on: October 14, 2019, 11:41:16 pm »
Ohh man, this is annoying...

http://digistump.com/package_digistump_index.json refers to the avr-gcc toolchain 4.8.1-arduino5
and the arduino Arduino15/package_index.json states that 4.8.1-arduino5 for mac (darwin) is http://downloads.arduino.cc/tools/avr-gcc-4.8.1-arduino5-i386-apple-darwin11.tar.bz2

I do not fully understand the process in Arduino how to derive the host type, but it seems clear to me that package_digistump_index.json points to an arduino toolchain that is still 32bit (i386)  :(

 

lukasthebird

  • Newbie
  • *
  • Posts: 2
Re: Mac OS X Catalina: 64-bit Support for Arduino IDE
« Reply #2 on: November 06, 2019, 12:27:24 pm »
I played around a bit with the json file and with my custom made it now works.
Just use this one https://github.com/LukasSchulz/arduino-boards-index/blob/master/package_digistump_index.json and reinstall the Digistump AVR package in the boards manager.

Anjin

  • Newbie
  • *
  • Posts: 3
Re: Mac OS X Catalina: 64-bit Support for Arduino IDE
« Reply #3 on: November 16, 2019, 05:07:01 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/Arduino.app/Contents/Java/hardware/tools/avr 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 :)

Gecko

  • Newbie
  • *
  • Posts: 3
Re: Mac OS X Catalina: 64-bit Support for Arduino IDE
« Reply #4 on: January 14, 2020, 10:54:03 am »
Hi Anjin

Many thanks!!!!!
Your solution did the job, awsome!

Cheers

Gecko