When I check in Arduino.app I can find the Contents folder but there is no Java folder. Many of the posts online regarding this mention that the Arduino IDE is pre-version 2. I am wondering if AVR tools have been moved since version 2.
I would appreciate any assistance in locating the AVR tools. Thank you for your help.
You can search for a directory called Arduino15; all board packages are in there. I'm not a Mac user, in Windows it would be C:\Users\yourUsername\AppData\Local\Arduino15\packages\arduino\hardware\avr.
Everything is going well and I am at the final stage where I need to verify the 'Hello World' script but I get the following error message:
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).
The guide explains that the solution is to "substitute (link) the built-in, outdated AVR tools that Digistump config looks for, with the new, updated one included in the Arduino IDE" by doing the following:
The bad CPU type means that the software that does the compilation is not written for your Mac's processor; it's probably written as a 32 bit application and you Mac requires a 64 bit application.
I think that this has been covered a couple of times in the many questions on the forum but you have to do a search. The two applicable categories where to search are IDE 2.0 (the category where you posted your problem) and Installation and Troubleshooting. If you go to those categories, the search box in the right top allows you to search the complete forum or just the specific category.
You can search for answers by ptillish, he's (more than) quite good in this.
Alternatively, you can use this community made boards platform with support for the Digispark board:
This one should work fine on your Mac without the need for performing any workarounds. Unlike the Digistump boards platform, which has been abandoned by the manufacturer, ATTinyCore is actively maintained.
Thank you ptillisch for joining this thread and for your awesome advice. Thanks especially for the link to the community made boards supporting the Digispark board. I am very excited to try this out.
Just a little update. I tried updating the patch in my ln command with the path you mentioned, but unfortunately I was still unable to make it work.
However, that's okay for now because I was able to get the ATTinyCore SpenceKonde board to work. I verified and uploaded a small LED flashing script and it was a magical moment for me to see the tiny Digispark light it's LED light. Thanks again @ptillisch for helping me with this.
I did try to do the "Hello World" Script but was unable to make it work. The original script calls for the importing of the DigiKeyboard.h library. However, I get a compilation error: DigiKeyboard.h: No such file or directory.
I assume this is because the DigiKeyboard library is only included in the Digistump board? I then tried to figure out which Keyboard library I needed to import for the SpenceKonde/ATTiny Core (Micronucleus / DigiSpark) board. I was not able to find out in the GitHub (I also tried #include DKeyboard.h but that did not work) so I tried to import the regular Keyboard.h.
However this also resulted in a compilation error "exit status 1":
In file included from /private/var/folders/b3/rwyfs47d3lsbm_31yl2cqhv80000gn/T/.arduinoIDE-unsaved202333-4244-1n4619w.va8d/sketch_apr3c/sketch_apr3c.ino:1:0:
/Users/user/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:25:10: fatal error: HID.h: No such file or directory
#include "HID.h"
^~~~~~~
compilation terminated.
exit status 1
Any help regarding this would be greatly appreciated. Thank you...
You might be interested in this 3rd party fork of the Digistump boards platform:
It is no longer maintained because the developer recommends using ATTinyCore instead, but it was actively maintained fairly recently so it is in much better shape than the original Digistump boards platform.
Nothing to apologize for. We're always happy to help here on the forum.
Thank you for the 3rd party fork of the Digistump boards platform, it looks interesting and I will definitely check it out.
I have also just tried out the DigiCombo library and it seems to work well. So far my original goal of having "Hello World" typed out in Mac's Spotlight search works. I will also do more testing with DigiCombo.
Thank you @ptillisch for your kindness and help, I greatly appreciate it.
Hi @ptillisch, I finally got a chance to try out ArminJo's Digistump fork that you provided the link for. It took a while because my little ATtiny85 Digspark broke (a part popped off) so I had to get another one.
When I try and upload a simple Sketch that only #include <DigiKeyboard.h>, I get the following error messages:
In file included from /Users/user/Library/Arduino15/packages/digistump/hardware/avr/1.7.5/libraries/DigisparkKeyboard/DigiKeyboard.h:17:0,
from /private/var/folders/_b/cgrnslln7x34bxgt4h5sbhv40000gn/T/.arduinoIDE-unsaved2023312-23542-r3pftm.zg2kh/sketch_apr12d/sketch_apr12d.ino:1:
/Users/user/Library/Arduino15/packages/digistump/hardware/avr/1.7.5/libraries/DigisparkKeyboard/keylayouts.h:5229:2: warning: #warning "Using default layout (LAYOUT_US_ENGLISH)" [-Wcpp]
#warning "Using default layout (LAYOUT_US_ENGLISH)"
^~~~~~~
Sketch uses 2418 bytes (36%) of program storage space. Maximum is 6650 bytes.
Global variables use 82 bytes (16%) of dynamic memory, leaving 430 bytes for local variables. Maximum is 512 bytes.
dyld[31922]: Library not loaded: /usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib
Referenced from: <7ECB5785-E8FD-3291-B541-5FFC8372A898> /Users/user/Library/Arduino15/packages/digistump/tools/micronucleus/2.6/micronucleus
Reason: tried: '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/usr/local/opt/libusb-compat/lib/libusb-0.1.4.dylib' (no such file), '/usr/local/lib/libusb-0.1.4.dylib' (no such file), '/usr/lib/libusb-0.1.4.dylib' (no such file, not in dyld cache)
Failed uploading: uploading error: signal: abort trap
I am trying to understand the error message. Does the first part just a warn that the default keyboard layout is US English?
Then it seems successfully verify and compile the code?
Before finally explaining that it is looking for a file (the library?) that it is expecting to find in a certain location but is unable to do so?
Thank you for your help in deciphering this error message and any guidance on how to remedy this issue.