patchAVR Downloader/UploaDEr - Patches: patch #9816, Implement new programmer type:...


You are not allowed to post comments on this tracker with your current authentication level.

patch #9816: Implement new programmer type: linuxspi

Submitted by:  Ralf Ramsauer <rralf>
Submitted on:  Fri 14 Jun 2019 06:30:19 PM UTC  
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Tue 10 Mar 2020 03:44:42 PM UTC, comment #2: 


thank you very much for your comment and for testing my/our patch. I'd really wish that it would be integrated, but, to be honest, there was almost no reaction at all and avrdude seems to unfortunately be dead from a maintainer perspective. Sigh...


Ralf Ramsauer <rralf>
Tue 10 Mar 2020 03:30:25 PM UTC, comment #1: 

Just wanted to leave a comment to say, that I am using this to flash an
atmega328p via SPI from the raspberry pi and it works quite well. Did not
have any issues with it, yet :)

Fabian Viƶl <sh3rm4n>
Fri 14 Jun 2019 06:30:19 PM UTC, original submission:  

This adds a new linuxspi programmer type. Analogously to linuxgpio, this
programmer uses the Linux-specific spidev device.

For accessing the reset pin, this programmer uses an additional GPIO pin using
the linux/gpio.h API. In contrast to the stateless and deprecated sysfs
interface, linux/gpio.h uses proper file descriptors for every pin, and
performs housekeeping when the device is closed. That saves some lines of code.

The programmer can be used as follows:
  avrdude -c linuxspi -P /dev/spidev:/dev/gpiochip[:resetpin] [...]

Separated by colons, the first part of the port (-P) argument denotes the
spidev device, the second one is the gpiochip that contains the reset pin, and
the optional third argument contains the pin number of the reset pin.

If not specified, the pin number defaults to the reset pin number defined in
avrdude.conf. Currently, this defaults to 25, which is connected to Pin 22 on a
Raspberry Pi.

Additionally, add some documentation.

Credits go to Kevin Cuzner, who started this fork ~5 years ago. I picked it up,
rebased it to the current mainline, massaged some parts of the code here and
there, fixed some minor bugs and switched to the linux/gpio.h GPIO accessors.

Signed-off-by: Ralf Ramsauer <>

Ralf Ramsauer <rralf>


Attached Files
file #47099:  avrdude-linuxspi-V1.patch added by rralf (15KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sh3rm4n (Posted a comment)
  • -email is unavailable- added by rralf (Submitted the item)
  • -email is unavailable- added by rralf
  • -email is unavailable- added by rralf

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-14 rralf Attached File- => Added avrdude-linuxspi-V1.patch, #47099
        Carbon-Copy- => Added
        Carbon-Copy- => Added

    Back to the top

    Powered by Savane 3.5