0

I have Raspberry Pi 3 Model B and Arduino Uno board, and I intend to make them communicate via Serial port connection.

I've already faced some problems with my Tools -> Serial Port greyed up before, but I solved it by downloading the package as it was recommended here: https://www.arduino.cc/en/guide/linux (Linux 32-bit ARM version;arduino-1.8.12-linuxarm.tar.xz) instead of installing Arduino via Linux command sudo apt-get install arduino. This command installed me an older version of Arduino IDE (1.0.5), and that's why I decided to download Arduino IDE from the official download page.

But when I try to Upload or, at least, to Verify my Arduino sketch, all I got is the following:

Assembler messages:
Error: unrecognized option -mmcu=avr5
exit status 1
Error compiling for board Arduino Uno.

I followed this plan:

  1. Turn on Raspberry Pi 3 Model B
  2. sudo apt-get update in Terminal
  3. Download Arduino ARM 32-bits https://www.arduino.cc/en/Main/Software and open in Terminal file /arduino-1.8.12/install.sh
  4. sudo usermod -a -G tty pi, sudo usermod -a -G dialout pi to provide user pi with access to the Serial port. This is /dev/ttyACM0 in my case.
  5. Waits until the Electronics icon appears in the Main menu -> Arduino IDE.
  6. Connect Arduino UNO to my Raspberry Pi using one of the unused USB-ports.
  7. Finally, choose the right port in Tools -> Port:"/dev/ttyACM0 (Arduino Uno)" as well as the board model Tools -> Board:"Arduino Uno" and try to verify your sketch.

This is where the issue comes.

My setup: Raspberry Pi 3 Model B - Raspbian GNU/Linux 10 (buster):

Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux

Arduino Uno (ATmega328) - connected via USB Type B

I had an idea if there something wrong with Arduino IDE versions overlapping because you cannot just remove/purge Arduino IDE 1.8.12 using sudo apt-get purge arduino, and since I had both versions installed the same time, I might be able to destroy some vital files of the newest version by uninstalling the older one by the same Linux command.

Thank you for any help!

2
  • If you'd prefer to work remotely -- ie., work with the IDE on a laptop or other computer, and compile there, but load the binary via a remote Pi connected to an Arduino, I can give you some instructions. Doing things that way is probably less problem prone, but it does mean working remotely. Beyond that I don't think I've ever used the IDE or compiled directly on a Pi, so I'm no help with that.
    – goldilocks
    Mar 20, 2020 at 17:01
  • @goldilocks I would like to get your instructions cause I still have the same problem despite the fact I've been trying a lot of stuff. Initially, I didn't intend to work remotely but it's like I still don't have a choice.
    – Roovy
    Mar 21, 2020 at 18:38

1 Answer 1

1

As you have discovered the version in the repository is hopelessly outdated (and will NEVER be fixed, because of some Debian politics).

You can safely purge the installation without losing any of your files.

Just download the Linux ARM 32bits version from https://www.arduino.cc/en/Main/Software

See https://arduino.stackexchange.com/a/44813/3879 for installation instructions.

1
  • Thank you a lot! It helps me pretty well. Still haven't got any idea why this error happened to my board, but at least it's okay now.
    – Roovy
    Mar 25, 2020 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.