patchAVR Downloader/UploaDEr - Patches: patch #7165, Add support for bitbanging GPIO...

 
 

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

patch #7165: Add support for bitbanging GPIO lines using the Linux sysf GPIO interface

Submitter:  Radoslav Kolev <radolin>
Submitted:  Mon 12 Apr 2010 02:30:25 PM UTC
Votes: 91
 
Category:  None Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  rliebscher Open/Closed:  Closed

Wed 09 Jan 2013 07:25:13 PM UTC, comment #4: 

Integrated in svn revision 1132.

Rene Liebscher <rliebscher>
Group Member
Tue 08 Jan 2013 04:37:34 PM UTC, comment #3: 

I've taken the updated version by Richard and made some further changes to make it fit for inclusion into avrdude. Please find the attached linuxgpio-v2.patch file against current SVN - Revision: 1130.

Radoslav Kolev <radolin>
Tue 01 Jan 2013 01:15:58 PM UTC, comment #2: 

Hi,
a lot of embedded devices offer GPIO lines that can conveniently be used as an interface to a uC. This allows to build cheap, Ethernet-capable programmers from routers and such (for instance the Fonera or the Raspberry Pi). I refreshed the patches of Radoslav Kolev to compile with the latest SVN (1126). The patched version was tested on a Fonera device running OpenWrt, but it should work with every recent Linux flavor:


#free the GPIO lines!
root@OpenWrt:~# echo "leds-gpio" > /sys/devices/platform/leds-gpio/leds/gpio1/device/driver/unbind
[...]

root@OpenWrt:~# avrdude -E noreset -p m1284p -c gpio -U flash:w:/tmp/tmp.hex:i
avrdude: WARNING: -E option not supported by this programmer type

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9705
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/tmp/tmp.hex"
avrdude: writing flash (125620 bytes):

Writing | ################################################## | 100% 5.85s

avrdude: 125620 bytes of flash written
avrdude: verifying flash memory against /tmp/tmp.hex:
avrdude: load data flash data from input file /tmp/tmp.hex:
avrdude: input file /tmp/tmp.hex contains 125620 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.78s

avrdude: verifying ...
avrdude: 125620 bytes of flash verified

avrdude done.  Thank you.


So please merge this patch.

Thanks,
Richard

Richard Nauber <rnauber>
Fri 23 Mar 2012 11:24:08 AM UTC, comment #1: 

Please consider this for inclusion.  It will be useful for dozens of embedded platforms running OpenWrt/buildroot, e.g. routers, access points, nas devices.  I am already using a hacked version of this patch for my own AVR development.

Biff <bifferos>
Mon 12 Apr 2010 02:30:25 PM UTC, original submission:  

This patch adds support for a new programmer type - gpio. It uses the Linux sysfs interface to bitbang GPIO lines. Mostly useful in embedded Linux systems, where there are a lot of GPIOs available.

To enable it pass the --enable-gpio option to ./configure. Then set the appropriate GPIO numbers in avrdude.conf.

It is kind of slow, taking ~30s to upload 8K to flash on a 150MHz x86 system. It will be a lot faster writing directly to the CPU registers, but this way it works for all processors that have Linux GPIO support implemented.

Radoslav Kolev <radolin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27225:  linuxgpio-v2.patch added by radolin (16KiB - text/x-patch - incorporation feedback from mailing list)
file #27180:  avrdude-gpio.patch added by rnauber (11KiB - text/x-diff - refreshed patch)
file #20204:  avrdude-5.10-bb-gpio.patch added by radolin (11KiB - text/x-diff - Add support for bitbanging GPIO lines using the Linux sysf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rliebscher (Posted a comment)
  • -email is unavailable- added by rnauber (Posted a comment)
  • -email is unavailable- added by bifferos (Posted a comment)
  • -email is unavailable- added by bifferos (Voted in favor of this item)
  • -email is unavailable- added by radolin
  • -email is unavailable- added by radolin (Submitted the item)
  •  

    There are 91 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-03 rliebscher Open/ClosedOpen Closed
    2013-01-09 rliebscher StatusNone Ready For Test
        Assigned toNone rliebscher
    2013-01-08 radolin Attached File- Added linuxgpio-v2.patch, #27225
    2013-01-01 rnauber Attached File- Added avrdude-gpio.patch, #27180
    2012-03-23 bifferos Carbon-Copy- Added bifferos
    2010-04-12 radolin Attached File- Added avrdude-5.10-bb-gpio.patch, #20204
        Carbon-Copy- Added radolin

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code