Skip to content

Pi Zero W - Fail to upload - Avrdude version not compatible #3126

@cshunt

Description

@cshunt

Describe the problem

Uploads that use AVRDUDE fail with an "illegal instruction" error.

To reproduce

  1. Install "Raspberry Pi OS Lite 32bit" (I used Raspberry Pi Imager to do so).
  2. Install Arduino CLI.
  3. arduino-cli core install arduino:avr
  4. arduino-cli sketch new Blink
  5. arduino-cli compile --fqbn arduino:avr:mega Blink -v
  6. Connect the Mega board to the computer with a USB cable.
  7. arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:mega Blink -v

🐛 The upload fails:

pi@raspberrypi:~ $ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:mega BlinkWithoutDelay -v
"/home/pi/.arduino15/packages/arduino/tools/avrdude/8.0.0-arduino1/bin/avrdude" "-C/home/pi/.arduino15/packages/arduino/tools/avrdude/8.0.0-arduino1/etc/avrdude.conf" -v -V -patmega2560 -cwiring "-P/dev/ttyACM0" -b115200 -D "-Uflash:w:/home/pi/.cache/arduino/sketches/2BB1B2D56922156C032C33130393C30C/BlinkWithoutDelay.ino.hex:i"
Failed uploading: uploading error: signal: illegal instruction

Expected behavior

Upload is successful

Arduino CLI version

1.4.1 Commit: e394193 Date: 2026-01-19T16:13:02Z

Operating system

Linux

Operating system version

raspberry pi os lite 32bit

Additional context

Using sudo apt install avrdude and replacing avrdude in:

/home/pi/.arduino15/packages/arduino/tools/avrdude/8.0.0-arduino1/bin/avrdude

with /usr/bin/avrdude

Created a functional upload with older version. Replacing the avrdude.conf from avrdude-v7.1-windows-arm64.zip removed errors during the upload process.


Likely unnecessary but adding user to dialout group for serial access without sudo is helpful
sudo usermod -a -G dialout $USER

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    architecture: armSpecific to ARM host architectureos: linuxSpecific to Linux operating systemtype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions