[patch #9816] Implement new programmer type: linuxspi

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #9816] Implement new programmer type: linuxspi

Kevin Cuzner-2
URL:
  <https://savannah.nongnu.org/patch/?9816>

                 Summary: Implement new programmer type: linuxspi
                 Project: AVR Downloader/UploaDEr
            Submitted by: rralf
            Submitted on: Fri 14 Jun 2019 06:30:19 PM UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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 <[hidden email]>




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 14 Jun 2019 06:30:19 PM UTC  Name: avrdude-linuxspi-V1.patch  Size:
15KiB   By: rralf

<http://savannah.nongnu.org/patch/download.php?file_id=47099>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9816>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

[patch #9816] Implement new programmer type: linuxspi

Kevin Cuzner-2
Follow-up Comment #1, patch #9816 (project avrdude):

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 :)

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9816>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


Reply | Threaded
Open this post in threaded view
|

[patch #9816] Implement new programmer type: linuxspi

Kevin Cuzner-2
Follow-up Comment #2, patch #9816 (project avrdude):

Fabian,

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

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9816>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/