Commit Graph

1107 Commits

Author SHA1 Message Date
Rene Liebscher bb0092eb4e Create new pin definition data structures to support 0-based pin numbers, and mixed inverse/non-inverse pin lists.
* avrftdi.c,buspirate.c,linuxgpio.c,par.c,serbb_*.c: added function call 
          to fill old pinno entries from new pin definitions.
	* pindefs.[hc]: added data struct and helper functions for new pin definitions
	* avrdude.conf.in: pins in entries using ftdi_syncbb are now 0-based
	* config_gram.y: allow combinations of inverted and non-inverted pins in pin lists
	* ft245r.c: reworked to work directly with the new pin definitions,
          pins are now 0-based, inverse pins are supported, buff is supported
	* pgm.[ch]: added new pin definitions field to programmer structure, 
          adapted pin display functions

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1160 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 22:35:00 +00:00
Hannes Weisbach e72e92f027 avrftdi_tpi.c: Remove set_pin() to set MOSI high
This is not necessary any more, because the "frame" ends in logic 1, so
the pin is high anyway and the MPSSE keeps the pin value as long as it
is idle. Setting the pin low would cause the TPI physical layer in the
AVR part to detect a collision.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
Hannes Weisbach 1d29bd71df avrftdi_tpi.c: Update I/O to pgm->cmd_tpi
All I/O of avrftdi_tpi is done in terms of pgm->cmd_tpi() calls instead
of calling avrftdi_tpi_[read,write]_byte() functions directly.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
Hannes Weisbach 171be6ed47 avrftdi_private.h: Update forward declaration
avrftdi_print() is now avrftdi_log

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1157 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:55:24 +00:00
Hannes Weisbach 1885f8ba84 avrftdi: move logging defines to avrftdi_private.h
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1156 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:37 +00:00
Hannes Weisbach 068c6ca9cc avr.c: Fix avr_tpi_poll_nvmbsy() polling returned data instead return
code

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:30 +00:00
Hannes Weisbach ce473c01d9 Updates NEWS file with avrftdi's TPI support
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1154 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:22 +00:00
Hannes Weisbach 6742e48d32 avrftdi_private.h: Fix header include order in windows
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1153 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:16 +00:00
Hannes Weisbach cc12312b2c avrftdi.c: Fix wrong loop invariant in write_flush()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1152 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:07 +00:00
Hannes Weisbach 1341a16432 Adds TPI-support for FTDI-based programmers with MPSSE
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1151 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:00 +00:00
Hannes Weisbach f31f050de2 avrftdi: Set guard time to fixed 2 bits.
avrftdi_private.h, avrftdi.c: remove pdata->guard_bits refernces, since
they are no longer needed
avrftdi_tpi.c: Use fixed guard time of 2 bits, this gives 16 bits per
frame. tpi_byte2frame() and tpi_frame2byte() functions are now
symmetrical and extraction of received data in avrftdi_read_byte is less
complicted. Write the new guard time to the TPI in
avrftdi_tpi_program_enable().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1150 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:52 +00:00
Hannes Weisbach 91c6cdfdea avrftdi_tpi.c: Adds avrftdi_tpi_disable()
In this function the NVM enable bit in TPISR is written to zero, like
described in AVR918. The reset line is released in avrftdi_close().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1149 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:45 +00:00
Hannes Weisbach 848cf9b55d avrftdi_tpi.c: Simplify break command by sending 16 zero bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1148 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:37 +00:00
Hannes Weisbach a211b17abb tpi.h: Adds definition of TPI Identification code
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1147 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:30 +00:00
Hannes Weisbach da998cb635 avrftdi_tpi.c: Move to new avrftdi log infrastructure
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1146 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:22 +00:00
Hannes Weisbach 33e9b840bf Adds initial avrftdi TPI support.
Device identification is possible tested under OS X 10.6.8 with an
FT4232H and ATtiny10.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1145 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:15 +00:00
Hannes Weisbach b1a5eaf2a0 avrftdi.c: rename constant ERROR to ERR
ERROR is already defined as a preprocessor macro in wingdi.h.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1144 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-28 19:35:36 +00:00
Hannes Weisbach 6cb94ba5a2 Rework of textual output of avrftdi.
Messages are divided by severity and printed accordingly to verbosity, as
specified by the user. The provided severity level are (ERROR, WARN, INFO,
DEBUG, TRACE). Where "ERROR" messages are always printed. Shortcut-macros
including function, from which the output was generated, and line number were
also added. Some log messages were updated and other code warnings removed.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1143 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-28 19:35:26 +00:00
Hannes Weisbach d4439e4d43 Fixes bugs #38659 and #38831
Apparently, doing too large read/write I/O on the MPSSE fills up the RX Buffer
of the chip, resulting in STALL/NAK of additional transactions of an OUT request.
Since the OUT request is issued synchronously, an appropriate IN request cannot
be issued, resulting in a deadlock.
This problem is handled by submitting small enough OUT requests, that will not
fill up the RX buffer and interleaving them with IN requests.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1142 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-27 21:49:27 +00:00
Hannes Weisbach fe9e329013 Updates avrftdi to use libftdi1
This includes adding libftdi1 to configure.ac and Makefile.am.
avrftdi code is changed to use libftdi1. At the same time device
discovery is moved to libftdi1. Some error and debug messages in
avrftdi are corrected and/or updated. avrftdi_print is updated,
to print all messages whose verbosity level is less or equal to
the global verbosity level, so that messages with level 0 are always
printed.
This change is tested on OS X 10.6.8, Ubuntu 12.04.2 and Win7 x86_64.
The Win7 version was cross-compiled on OS X 10.6.8.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1141 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-27 20:52:01 +00:00
Joerg Wunsch ff31f7f44f Replaces the old AM_CONFIG_HEADER by AC_CONFIG_HEADERS; automake 1.13+
barfs.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1140 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-25 20:14:44 +00:00
Joerg Wunsch ed8e97475e Add new devices: ATmega2564RFR2, ATmega1284RFR2, ATmega644RFR2
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1139 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-03-12 10:07:56 +00:00
Rene Liebscher 1b9eed0f8e patch #7724 Add TPI support for Bus Pirate using bitbang mode
* buspirate.[ch]: added support for BusPirate Bitbanging
	* avrdude.conf.in: added entry for buspirate_bb
	* pgm_type.c: added entry for buspirate_bb


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1138 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 21:15:39 +00:00
Rene Liebscher 51cf44ff12 patch #7936 Patch to support BusPirate AVR Extended Commands mode
* buspirate.c: added support for BusPirate AVR Extended Commands mode
	* avrdude.1: added doc for nopagedread parameter
	* doc/avrdude.texi: added doc for nopagedread parameter


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1137 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 18:56:31 +00:00
Rene Liebscher f177b994be patch #7723 Bus Pirate “raw-wire” mode which can run down to 5 kHz
* buspirate.c: added raw wire mode
	* avrdude.1: added doc for rawfreq parameter
	* doc/avrdude.texi: added doc for rawfreq parameter

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1136 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 17:58:48 +00:00
Rene Liebscher 9dbdbf5129 bug #37977 Support for Openmoko Debug Board
* avrdude.conf.in: added openmoko entry

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1135 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 16:46:31 +00:00
Rene Liebscher 852428d8d6 patch #7932 Read USBtiny VID and PID from avrdude.conf if provided.
* avrdude.conf.in: added usbpid, usbvid to usbtiny
	* usbtiny.[ch]: use usbpid, usbpid if provided in config file

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1134 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-29 18:33:34 +00:00
Joerg Wunsch d4102781ae bug #38172: avrftdi: Incorrect information in avrdude.conf
* avrdude.conf.in (avrftdi): fix comments about ACBUS vs. ADBUS;
add a comment that the MPSSE signals are fixed by the FTDI
hardware and cannot be changed



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1133 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-26 20:08:40 +00:00
Rene Liebscher 4479ea8858 patch #7165 Add support for bitbanging GPIO lines using the Linux sysf GPIO interface
* doc/avrdude.texi,avrdude.1: added doc for linuxgpio 
	* avrdude.conf.in: added template for linuxgpio programmer
	* config_gram.y: pin numbers restricted to [PIN_MIN, PIN_MAX]
	* pindefs.h: added PIN_MIN, PIN_MAX, removed unused LED_ON/OFF
	* configure.ac: configure option enable-linuxgpio, print of enabled options
	* linuxgpio.[ch]: new source for linuxgpio programmer
	* Makefile.am: added linuxgpio to sources list
	* pgm_type.c: added linuxgpio to programmer types list

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1132 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-09 19:23:30 +00:00
Joerg Wunsch a34237dce3 Replace some stray calls to putchar() by putc(..., stderr).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1131 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-08 21:02:01 +00:00
Joerg Wunsch b8ba817c68 Fix a minor typo.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1130 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 20:31:13 +00:00
Joerg Wunsch 6f84a29bd7 * usb_libusb.c (usbdev_open): Downgrade the max transfer size for
the main data endpoints when being forced so by the USB; this can
happen when attaching the JTAGICE3 to a USB 1.1 connection
* jtag3.c (jtag3_initialize): When detecting a downgraded max
transfer size on the JTAGICE3 (presumably, due to being connected
to USB 1.1 only), bail out as its firmware cannot properly handle
this (by now)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1129 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:16:37 +00:00
Joerg Wunsch b5ed550b9d Annual ChangeLog rotation time.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1128 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:13:26 +00:00
Joerg Wunsch 7d60f59b1e Annual ChangeLog rotation time.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1127 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:12:41 +00:00
Joerg Wunsch baa8f5a000 * usbdefs.h (USBDEV_BULK_EP_WRITE_STK600)
(USBDEV_BULK_EP_READ_STK600): new define values
* stk500v2.c (stk600_open): use the STK600 EP values,
as they are different from AVRISPmkII



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1126 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-18 10:45:23 +00:00
Joerg Wunsch 7ba3e6a3d7 bug #37942: Latest SVN can't program in dragon_jtag mode
* jtagmkII.c (jtagmkII_initialize): For Xmega devices, and
firmware >= 7.x, don't trigger a RESET, in order to work around a
firmware bug that appears to be present in at least firmware 7.24
for the Dragon.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1125 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-18 09:20:06 +00:00
Joerg Wunsch 0764958d0f * config_gram.y: Implement the "ocdrev" keyword
* avrpart.c: (Dito)
* avrpart.h: (Dito)
* lexer.l: (Dito)
* avrdude.conf.in: Add "ocdrev" key/value pairs, based
on the AS6 XML file information.
* jtag3.c: Use the ocdrev in the parameter block.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1124 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-04 13:59:37 +00:00
Joerg Wunsch 179fc32c03 * jtag3.c: Make jtag3_command() public
* jtag3.h: (Dito.)
* jtag3_private.h: Add two new commands
* stk500v2.c: Implement the "MonCon disable" hack that
allows temporarily falling back to ISP when trying to
talk to a part that has debugWIRE enabled



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1123 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 21:03:06 +00:00
Rene Liebscher 01800f7394 * pickit2.c: reordered #includes for non-usb configuration
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1122 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 20:50:11 +00:00
Joerg Wunsch bf6fb8c947 Enable interactive adjustment of the various
clock frequencies (JTAG Xmega, JTAG megaAVR, PDI Xmega)
through the set_sck_period() callback.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1121 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 16:52:23 +00:00
Joerg Wunsch f383f714e6 Remove unused code that was left over from
cloning the jtagmkII.c implementation



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1120 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 16:09:34 +00:00
Joerg Wunsch d7930063cc * pgm_type.c: Add "jtagice3_isp" programmer hook
* avrdude.conf.in: Add "jtag3isp" programmer
* jtag3.c: jtag3_setparm() is now public
* jtag3.h: (Dito)
* stk500v2_private.h: Command 0x1D is CMD_SPI_MULTI only
for STK500v2, AVRISPmkII, and JTAGICEmkII; for JTAGICE3,
it's CMD_SET_SCK now; also add CMD_GET_SCK
* avrpart.c (avr_get_output_index): New function
* avrpart.h: (Dito)
* stk500v2.c: Implement the pasthrough programmer glue logic
for JTAGICE3 in ISP mode
* stk500v2.h: (Dito)
* avrdude.1: Document the JTAGICE3 support.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1119 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 15:52:38 +00:00
Joerg Wunsch 2b407ef73d Add a failure code for debugWIRE communication failures I
happened to run into.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1118 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-30 22:18:34 +00:00
Joerg Wunsch 6b815d76c3 * jtag3.c (jtag3_read_byte, jtag3_write_byte): Remove the
m->offset from addr, JTAGICE3 doesn't need it anymore (similar
to JTAGICEmkII with 7+ firmware)
* jtag3.c (jtag3_read_byte): Allow for full-page reads of
EEPROM also for Xmega and debugWIRE, allow for signature
read in debugWIRE




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1117 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-30 12:51:07 +00:00
Joerg Wunsch b3ff415b9e * jtag3_private.h: Add two more error detail codes I stumbled
across during development
* jtag3.c: (Dito.)
* usb_libusb.c: Reduce timeouts from 100 to 10 s, still long
enough, but not getting cold feet when something goes wrong.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1116 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-30 12:36:00 +00:00
Joerg Wunsch 63989b1d3c * jtag3.c: Handle events returned by the ICE
* usbdevs.h: Add defines that mark an event in return
from usb_recv_frame().
* usb_libusb.c: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1115 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 21:43:54 +00:00
Joerg Wunsch 89b44856be Implement page erase functionality.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1114 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 16:20:48 +00:00
Joerg Wunsch 30ef6e5c95 * avrdude.conf.in: Remove "has_jtag" from Xmega A4 and D4
devices, as they only have PDI.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1113 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 14:23:18 +00:00
Joerg Wunsch ed9ae0b503 bug #37265: wrong page sizes for XMega64xx in avrdude.conf
* avrdude.conf.in: Fix page sizes for all Xmega devices,
by cross-checking against Atmel Studio's device XML files




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1112 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 14:12:41 +00:00
Joerg Wunsch 5d2fc235cc * jtag3.c: Fill in the missing pieces for Xmega support (both,
PDI and JTAG).
* jtagmkII.c (jtagmkII_set_xmega_params): Use "fuse1" rather
than "fuse0" memory space to fill in the NVM offset from, as
there is no "fuse0" on some Xmega devices.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1111 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 13:31:11 +00:00