Commit Graph

681 Commits

Author SHA1 Message Date
rliebscher e087b21200 * configure.ac: if both found libftdi and libftdi1 use only libftdi1
* avrdude.conf.in: fixed buff pins of avrftdi programmers (low active buffer need now inverted numbers)
	* avrftdi*.*: accept also old libftdi (0.20 still works with it), added powerup to initialize
	* ft245r.c: accept libftdi1, code cleanup and make it more similar to avrfdti (os they might be merged someday)

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1175 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 18:55:19 +00:00
joerg_wunsch e95ffee0c2 Bump version to 6.0rc1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1173 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-08 17:35:28 +00:00
hweisbach 3f3ba207da avrftdi: add pgm->power[up|down], fix pgm->enable|disable
avrftdi.c: add pgm->power[up|down] functions and fill
pgm->enable|disable with proper functionality, as suggested by
rliebscher.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1171 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:13 +00:00
hweisbach eee1ae3973 avrftdi: apply patch by rliebscher.
Use pin_checklist[] of size N_PINS instead N_PINS - 1, to avoid future
problems. Also remove pins_check from set_pin; instead use mask[0] == 0
to check wether to do something or not.

avrftdi_private.h: Change size of pin_checklist[] to N_PINS.
avrftdi.c: Adapt code to new size of pin_checklist. Remove pins_check
from set_pin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1170 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:06 +00:00
rliebscher 0e18b3fb3d * pindefs.h: use unsigned int if stdint.h is not available and UINT_MAX is 0xffffffff
otherwise use unsinged long
* ft245r.c: added support for more pin functions led, vcc, buff

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1169 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 19:21:38 +00:00
hweisbach fc7b83a267 avrftdi_tpi.[c|h]: integrate avr_tpi_[program_enable,chip_erase]()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1168 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:50:42 +00:00
hweisbach b1eab6f93c avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This
function sets the required guard time (which is passed in as parameter),
checks the TPI identification register, writes SKEY command + SKEY, and
finally polls the NVMEN bit in TPISR.

avr.h: Add prototype definitions of avr_tpi_program_enable() and
avr_tpi_chip_erase().
avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command
and the SKEY bytes.
tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY
bytes, but in the reverse order of tpi_skey.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
hweisbach d46b2e880c avr.c: Add generic TPI chip erase function
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1166 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:43:47 +00:00
hweisbach ec6278b5a8 avrftdi: Change to new 0-based pin definitions
avrdude.conf.in: Change all programmers' pin definitions to 0-based
avrftdi.c: incorporate new 0-based pindef infrastructure
avrftdi_private.h: Add pin_checklist_t to avrftdi_t for runtime pin
checking in pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1164 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:15 +00:00
hweisbach c8d3302128 avrftdi: Use pgm->setpin instead of pgm->cookie->set_pin
avrftdi.c: remove set_pin init, add pgm->setpin init
avrftdi_private.h: remove avrftdi_t->set_pin member
avrftdi_tpi.c: change avrftdi_t->set_pin calls to pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1163 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:08 +00:00
joerg_wunsch 0e59564519 Include "ac_cfg.h" before testing for HAVE_* macros.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1162 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 09:54:27 +00:00
rliebscher e5b9551631 * main.c: revert to rev 1159 (doing pgm_display after pgm_open)
* avrpart.[ch]: moved avr_pin_name to pindefs.[ch]
* pgm.c: moved pins_to_str to pindefs.[ch], added initialization of 
          new pin definitions in pgm_new()
* pindefs.[ch]: added moved functions from other files, added a lot of 
          documentation, reformatted files using astyle to have consistent spacing,
          added a new generic check function for pins
* ft245r.c: used new generic pin check function

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1161 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-05 13:35:35 +00:00
rliebscher 22158cd03a 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/avrdude@1160 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 22:35:00 +00:00
hweisbach a2ab9c6039 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/avrdude@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
hweisbach 779538b9af 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/avrdude@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
hweisbach ff0edb786a avrftdi_private.h: Update forward declaration
avrftdi_print() is now avrftdi_log

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

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:30 +00:00
hweisbach 7e1778019a Updates NEWS file with avrftdi's TPI support
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1154 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:22 +00:00
hweisbach 7cc2b783a3 avrftdi_private.h: Fix header include order in windows
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1153 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:16 +00:00
hweisbach 12ff2d6a20 Adds TPI-support for FTDI-based programmers with MPSSE
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1151 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:00 +00:00
hweisbach 0d9c0c5e9e tpi.h: Adds definition of TPI Identification code
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1147 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:30 +00:00
hweisbach fc709f2a84 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/avrdude@1143 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-28 19:35:26 +00:00
hweisbach a6f4aac8b1 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/avrdude@1142 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-27 21:49:27 +00:00
hweisbach 2a3ecd0672 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/avrdude@1141 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-27 20:52:01 +00:00
joerg_wunsch 31618cb6df Replaces the old AM_CONFIG_HEADER by AC_CONFIG_HEADERS; automake 1.13+
barfs.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1140 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-04-25 20:14:44 +00:00
joerg_wunsch 9ad7888bc0 Add new devices: ATmega2564RFR2, ATmega1284RFR2, ATmega644RFR2
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1139 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-03-12 10:07:56 +00:00
rliebscher a8c3a0973a 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/avrdude@1138 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 21:15:39 +00:00
rliebscher 825c570746 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/avrdude@1137 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 18:56:31 +00:00
rliebscher f33873b1ba 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/avrdude@1136 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 17:58:48 +00:00
rliebscher a4dbfc95fa bug #37977 Support for Openmoko Debug Board
* avrdude.conf.in: added openmoko entry

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1135 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-30 16:46:31 +00:00
rliebscher 707e6634c1 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/avrdude@1134 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-29 18:33:34 +00:00
joerg_wunsch c65baa766a 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/avrdude@1133 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-26 20:08:40 +00:00
rliebscher 8d6f310736 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/avrdude@1132 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-09 19:23:30 +00:00
joerg_wunsch 1b8fc9897d Replace some stray calls to putchar() by putc(..., stderr).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1131 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-08 21:02:01 +00:00
joerg_wunsch ac8b2858ad * 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/avrdude@1129 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:16:37 +00:00
joerg_wunsch ef0ee7525f Annual ChangeLog rotation time.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1128 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:13:26 +00:00
joerg_wunsch 3cb37fffbe Annual ChangeLog rotation time.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1127 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-02 10:12:41 +00:00
joerg_wunsch 076e03472f * 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/avrdude@1126 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-18 10:45:23 +00:00
joerg_wunsch 9dc65f6008 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/avrdude@1125 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-18 09:20:06 +00:00
joerg_wunsch 05fd0beac1 * 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/avrdude@1124 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-04 13:59:37 +00:00
joerg_wunsch 1f7b134420 * 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/avrdude@1123 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 21:03:06 +00:00
rliebscher 7f9f0633cd * pickit2.c: reordered #includes for non-usb configuration
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1122 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 20:50:11 +00:00
joerg_wunsch 3024312901 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/avrdude@1121 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 16:52:23 +00:00
joerg_wunsch 707ddd2de9 Remove unused code that was left over from
cloning the jtagmkII.c implementation



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1120 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 16:09:34 +00:00
joerg_wunsch 97357595b6 * 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/avrdude@1119 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-12-03 15:52:38 +00:00
joerg_wunsch 4e0801803f * 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/avrdude@1117 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-30 12:51:07 +00:00
joerg_wunsch d8ad0fdb28 * 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/avrdude@1116 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-30 12:36:00 +00:00
joerg_wunsch fa86937e91 * 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/avrdude@1115 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 21:43:54 +00:00
joerg_wunsch fca08c90ab Implement page erase functionality.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1114 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 16:20:48 +00:00
joerg_wunsch 180c000565 * 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/avrdude@1113 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 14:23:18 +00:00
joerg_wunsch a1349681e1 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/avrdude@1112 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 14:12:41 +00:00
joerg_wunsch 8d9a00ddc5 * 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/avrdude@1111 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 13:31:11 +00:00
joerg_wunsch 66b46eb591 Add device support for the recently released ATmega*RFR2 family.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1110 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-29 09:32:27 +00:00
joerg_wunsch ed3033e396 First support for Atmel JTAGICE3. Guessed from USB sniffer
traces made by Knut Schwichtenberg, and by similarity to
JTAGICEmkII.

Still quite incomplete, just megaAVR/JTAG is done by now.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1109 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-28 22:39:01 +00:00
joerg_wunsch 3fabed6ea5 Change all the USB details (endpoint numbers, max transfer size etc.)
to a per-programmer adjustable value.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1108 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-26 16:24:56 +00:00
joerg_wunsch 8fdf4d4071 Replace outdated FSF postal address by a reference to
the GPL info on their website.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1107 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-20 14:03:50 +00:00
rliebscher 52e3323b6e bug #35186 inverting pins with "~" doesn't work for pin lists (i.e. vcc)
bug #37727 Add support for LM3S811 dev board as a programmer
* lexer.l,config_gram.y: accepting inverted pins at pin lists 
	        syntax: ~num or ~(num,num,...)
* par.c: par_set_many_bits is now usable with inverted pins
* avrftdi.c: fixed wrong index in ftdi_pin_name
* avrdude.conf.in: added programmer lm3s811

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1106 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-13 21:34:02 +00:00
rliebscher 8af36ef451 * lexer.l,config_gram.y,config.[hc]: changed reading of numbers to integers except of default_bitclock which is the only real number.
No signs are allowed as negative values do not make sense for current config values.
* buspirate.c: include own header file buspirate.h
* doc/.cvsignore: add programmers.texi to ignore list

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1105 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-04 17:18:59 +00:00
joerg_wunsch c03387fcb1 Add EXTRA_DIST, replace $(srcdir) by
$(builddir) for generated files, so "make distcheck"
works again.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1104 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-09-06 15:33:09 +00:00
rliebscher 3e93f3d037 fixed doc/Makefile.am for use with BSD make
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1103 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-09-05 20:52:40 +00:00
rliebscher ae88486420 patch #7184 Support for PICKit2 programmer
* Makefile.am: add pickit2 files
	* pickit2.[ch]: new programmer implementation
	* pgm_type.c: add pickit to list
	* avrdude.1: documentation for pickit2
	* doc/avrdude.texi: documentation for pickit2
	* avrdude.conf.in: add pickit2 programmer entry

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1102 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-08-15 18:34:53 +00:00
rliebscher 911791686c bug #30559 Ft232 bit-bang support, see comment #30
* ft245r.c: added semaphore workaround for MacOS X,
	            added pthread_testcancel in reader thread

* configure.ac: added check for TYPE_232H in libftdi (not in libftdi < 0.20)
* avrftdi.c: do not use TYPE_232H if not declared

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1101 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-08-15 17:31:11 +00:00
hweisbach 7a9f682332 Fixes pin_limit error in avrftdic.
-Error was a result of a mixup between 2232C/D and 2232H


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1099 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-08-13 19:03:41 +00:00
hweisbach 086b4c329e Adds bugfixes and maintenance for avrftdi
Bugfixes:
-remove ftdi_usb_purge_buffers(), since it does not flush, but clear buffers
-fix bad polling in avrftdi_flash_write() where it was possible to poll a 0xff
 value. 

Maintenance:
-use #defines from libftdi for MPSSE commands where applicable
-reformat E() and E_VOID() macros
-remove TYPE_* macros
-clean up private structure (remove pin_inversion, type and ftype)
-adds ftdi_pin_name() to turn a (FTDI) pin number to a human readable string
-adds avrftdi_print to encapsulate "if(verbose > c) fprintf()"-idiom
-nicer / better understandable (I hope) output
-removes pin_limit() and adds a member in the private data structure.
 TYPE_* macros can be removed; decision is made from (struct ftdi_context).type
-add_pin(s)() functions reworked. parameters are validated first, if everything 
 is alright, pin_value is modified. pin_inversion mask is not needed; use
 PIN_INVERTED instead
-change set_pin(s)(), so that it gets the pin value used by avrdude (and not a
 bit mask). This way, PIN_INVERTED is usable and pin_inversion is not needed.
 Plus, the interface is consistent with the add_pin() signature. Also move
 parameter validation to the start of the function. I also commented out the
 warning, that a pin is not defined, because it is annoying.
-clean up avrftdi_open(): first parameter validation, then USB lookup, interface
 initialization then pin setup
-avrftdi_eeprom_read/write() and avrftdi_flash_read/write(): convert to new
 calling scheme, where every paged_* function is called once for every page



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1098 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-07-29 12:29:39 +00:00
hweisbach 08639363fa Adds ChangeLog entry for Rev 1095
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1097 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-07-25 16:36:17 +00:00
joerg_wunsch 60efc31839 Return MTYPE_FLASH from jtagmkII_memtype() rather than
MTYPE_SPM for non-Xmega flash regions.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1096 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-07-25 14:56:39 +00:00
joerg_wunsch f0f3c5cba3 Test for libelf.h in subdirectory libelf, too, and inlude it from there if test
was positive.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1093 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-07-18 12:42:47 +00:00
joerg_wunsch 967c691e47 Submitted by Rene Liebscher:
* configure.ac: Check for presence of <pthread.h>
* ft245r.c: Depend on HAVE_PTHREAD_H
* Makefile.am: Add -lpthread if needed.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1092 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-06-13 20:45:22 +00:00
joerg_wunsch 07c102e412 * usbtiny.c (usbtiny_paged_load, usbtiny_paged_write):
fix breakage introduced by the recent page handling reorg;
it used to cause an infinite loop



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1091 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-06-07 14:07:17 +00:00
joerg_wunsch dc38f7ca18 Xmega page erase implementation for XPROG (AVRISPmkII, STK600)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1090 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-05-04 15:47:26 +00:00
joerg_wunsch 3fbb7642d2 Xmega page erase implementation for JTAGICEmkII
* jtagmkII.c: Handle flash pages sizes > 256 bytes, implement
page_erase() method
* avrdude.conf.in: Change flash pagesize for all Xmega devices
to 512 bytes
* avr.c: Implement auto_erase, using page_erase if available
* avr.h: Remove unused parameters from avr_read(), replace
unused parameter in avr_write)() by auto_erase
* stk500v2.c: Handle flash page sizes > 256 bytes
* update.c (do_op): Handle new updateflags parameter
* main.c: Implement auto_erase as page_erase if possible
* update.h (enum updateflags): New enum
* pgm.h (struct programmer_t): Add page_erase method



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1089 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-05-04 10:02:30 +00:00
joerg_wunsch 374cc8f212 * jtagmkII.c (jtagmkII_paged_load, jtagmkII_paged_write): fix bug
in memory type calculation for Xmega "boot" memory region.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1087 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-26 10:57:09 +00:00
joerg_wunsch 0dd5684041 * update.c (parse_op): do not assume default memtype here
* main.c: after locating the part information, determine default
memtype for all update options that didn't have a memtype
specified; this is "application" for Xmega parts, and "flash" for
everything else.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1086 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-25 16:32:23 +00:00
joerg_wunsch 80dd0439a8 * fileio.c: Rework the way ELF file sections are considered: while
scanning the program header table, the offsets from a program
header entry must never be used directly when checking the bounds
of the current AVR memory region.  Instead, they must always be
checked based on the corresponding section's entry.  That way,
Xmega devices now properly take into account whether the segment
fits into any of the application/apptable/boot memory region.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1085 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-24 15:41:02 +00:00
joerg_wunsch 98d2f6fff8 bug #30756: When setting SUT to 64ms on XMEGA, avrdude doesn't
read device signature
* main.c: When reading the signature yields 0x000000 or 0xffffff,
retry (up to twice) after some progressive delay.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1084 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-20 12:33:15 +00:00
joerg_wunsch ee8a3b1f4d * avrdude.conf.in (ATxmega16D4, ATxmega32D4, ATxmega64D4,
ATxmega128D4): New devices.  As Xmega D doesn't feature a fuse0
memory cell, move that one out from the generic .xmega part into
the individual Xmega A parts.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1083 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-20 11:03:51 +00:00
joerg_wunsch f5318109f0 bug #29019: pagel/bs2 warning when uploading using stk500 to xmega
* stk500.c (stk500_initialize): Insert dummy values for PAGEL and
BS2 if they are not present in the config file, in order to be able
to proceed with the stk500_set_extended_parms() anyway.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1082 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-19 13:59:09 +00:00
joerg_wunsch 67060801c2 * stk500v2_private.h (struct pdata): add boot_start
* stk500v2.c: For the "flash" pseudo-memory of Xmega devices,
distinguish addresses between "application" and "boot" area.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1081 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-19 13:32:34 +00:00
joerg_wunsch 9704aaeb74 * fileio.c (elf2b): When checking the bounds of the current
program header segment, subtract `low' from ph[n].p_paddr in order
to correct the magic section offsets for the AVR's non-flash
memory regions.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1080 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-18 16:00:21 +00:00
joerg_wunsch 9f0aeb90e2 * fileio.c (elf_get_scn): Rather than trying to just match whether
any given section maps straight to a program header segment, use a
more sophisticated decision that matches any section as long as it
fits into the segment.  This is needed for situations where the
program header segment spans a larger area than the section data
provided.  (This can e.g. happen in an ELF file that contains no
data at address 0, like a bootloader only.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1079 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-18 15:47:57 +00:00
joerg_wunsch b62408923b bug #28744: Can't load bootloader to xmega128a1 (part 2, fix for
firmware >= V7.x)
* jtagmkII.c: Add firmware-version dependent handling of Xmega parameters.
V7.x firmware expects the NVM offsets being specified through the Xmega
parameters command, but left out as part of the memory address itself.
* jtagmkII_private.h: Add CMND_SET_XMEGA_PARAMS, and struct xmega_device_desc.
* config_gram.y: Add mcu_base keyword.
* avrpart.h: (Dito.)
* lexer.l: (Dito.)
* avrdude.conf.in (.xmega): add mcu_base, and data memory segment.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1078 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-04-13 15:25:41 +00:00
joerg_wunsch ab52c9e972 bug #28744: Can't load bootloader to xmega128a1 (part 1, fix for
firmware < V7.x)
* jtagmkII.c: When going to write to the boot section of flash,
use MTYPE_BOOT_FLASH rather than MTYPE_FLASH
* jtagmkII_private.h: add MTYPE_BOOT_FLASH constant



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1077 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-30 16:19:13 +00:00
joerg_wunsch 032704bd95 Sort commands, response codes and events into numerical order.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1076 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-30 14:03:38 +00:00
joerg_wunsch 069fb58779 bug #30451: Accessing some Xmega memory sections gives not
supported error
* stk500v2.c: Handle all Xmega memory sections (except
"prodsig" which is not documented in AVR079)
* fileio.c: Treat the "boot", "application", and "apptable"
regions (which are actually subregions of "flash") all as
being flash, i.e. suppress trailing 0xFF bytes when reading
them
* avr.c: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1075 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-29 14:32:18 +00:00
joerg_wunsch 0d502e5e40 Shesh. The previous commit was a little premature. Drag the
"GO" code in again, but only activate it when programming an
Xmega device through PDI.

Wonderfully consistent tools.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1071 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-20 14:42:20 +00:00
joerg_wunsch 33a7e91b0e * jtagmkII.c (jtagmkII_close): The GO command before signing off
turned out to do more harm than good; on the Xmega, it caused exactly
the opposite reaction, the CPU stopped.  Even without it, after the
RESET command, the target is running already.  So, drop the GO.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1070 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-20 14:21:33 +00:00
joerg_wunsch 7c585f1b2d Print a configuration summary at the end of the configure run.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1069 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-20 14:13:18 +00:00
rliebscher 00aad29d96 patch #7718: Merge global data of avrftdi in a private data structure
* avrftdi.[ch]: moved global data into private data structure, moved
    private defines from header file into source file


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1068 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-11 19:55:22 +00:00
rliebscher 01359e24bb patch #7720 Bug in EEPROM write
* avrftdi.c: fixed wrong buffer address initialization in paged_write

* fileio.c: added #include <stdint.h>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1067 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-06 19:41:36 +00:00
rliebscher b5bef35538 bug #30559 Ft232 bit-bang support
* ft245r.c: cancel reader thread before exiting program


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1066 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-05 19:58:59 +00:00
rliebscher 76dce38725 patch #7717 avrftdi_flash_write is broken
* avrftdi.c: fixed wrong buffer address initialization in paged_write
bug #35296 Extraneous newlines in output.
* main.c: fixed output of newlines at 100% progress


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1065 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-04 16:43:37 +00:00
rliebscher 84fbaaa6b9 patch #7715 FT4232H support
* avrdude.conf.in: added programmer 4232h


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1063 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-03 20:33:04 +00:00
rliebscher 6eb5833d43 patch #7687: Autogenerating programmers and parts lists for docs
(generating the programmers lists)
  * doc/avrdude.texi: Add include of generated table of programmers
  * doc/Makefile.am: Add generating of table of programmers in programmers.texi


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1062 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-03 20:23:32 +00:00
rliebscher 5779185677 bug #34768 Proposition: Change the name of the AVR32 devices
* avrdude.conf.in: renamed ucr2 to uc3a0512
 * avrpart.c: added cast to avoid compiler warning


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1061 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-03 20:07:54 +00:00
joerg_wunsch fbb0effb7d Fix a copy'n-paste-o.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1059 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-03 08:34:39 +00:00
joerg_wunsch 475b5ce3c4 Move par_desc[] to end of file, outside the #if HAVE_PARPORT.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1058 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-03 07:21:39 +00:00
joerg_wunsch f5e8183f30 Implement ELF file reading (finally). Requires libelf(3) to be
present on the host system.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1056 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-02 16:52:45 +00:00
rliebscher ee3483eadf bug #30559 Ft232 bit-bang support
* ft245r.[ch]: new programmer type implementation
* configure.ac: add pthread as link library
* avrdude.conf.in: added some new programmers
* Makefile.am: added new source files to compile
* pindefs.h: change PIN_MASK, PIN_INVERSE to highest bit of unsigned int
* pgm.[ch]: added generic function to print pin assignments (taken from par.c)
* par.c: moved pin assigment print function to pgm.c

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1055 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-01 22:26:58 +00:00
joerg_wunsch d31d9a1563 Sort keyword tokens into alphabetic order.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1054 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-02-01 09:12:55 +00:00