Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avr-g++: bad CPU type in executable on Mac M1 #28

Open
jvlobo opened this issue Feb 29, 2024 · 4 comments
Open

avr-g++: bad CPU type in executable on Mac M1 #28

jvlobo opened this issue Feb 29, 2024 · 4 comments

Comments

@jvlobo
Copy link

jvlobo commented Feb 29, 2024

I was trying to use the Sanguino (version 1.0.3) on the Arduino IDE (version 2.3.2) and I'm getting this error when it try to compile:

Compilation error: fork/exec /Users/jvlobo/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-g++: bad CPU type in executable

I was investigating about the bad CPU type in executable error and found this on the official Arduino page -> https://support.arduino.cc/hc/en-us/articles/7765785712156-Error-bad-CPU-type-in-executable-on-macOS

But even after installing Rosetta it does not work.

Any ideas of how to solve this?

Thanks a lot!

@tomekskuta
Copy link

I found this fork with fix for m1 mac and it saved me 😮‍💨
https://github.com/wnagele/Sanguino

@Knightmoved06
Copy link

New to this whole process, but I can't seem to get Arduino IDE to recognize the new fix file, would you be able to assist?

@tomekskuta
Copy link

tomekskuta commented Aug 9, 2024

sure 👌
if you already installed Sanguino you can remove it to make sure you don't use the one with no M1 support.
then:

  • go to preferences (cmd+,) and in Additional boards manager URLs section paste https://raw.githubusercontent.com/wnagele/Sanguino/master/package_lauszus_sanguino_index.json - it's the json file from forked repo. Zrzut ekranu 2024-08-9 o 14 45 08
  • go to your Boards Manager (cmd+shift+b) and find Sanguino. install it.

that should be all you need to do
Zrzut ekranu 2024-08-9 o 14 48 59

@Knightmoved06
Copy link

You are a God! Thank you! Running into other issues now, but I'll try to figure those out before I hassle you with those! Sorry for the delay in gratitude, just took me a hot minute to find some time to try this out. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants