Commit Graph

1226 Commits

Author SHA1 Message Date
joerg_wunsch 7999eaa25a Turn the usbpid parameter of the programmer into a list of PIDs. Make
the JTAGICE3 programmer handle a list of PIDs, by trying each of them
in sequence.  Use a single, central jtag3_open_common() function to
handle the common code of all jtag3_open_* functions.  Centralize all
USB VID/PID definitions in usbdevs.h.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1283 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 13:06:03 +00:00
joerg_wunsch 52c59fade2 If the device is not open, don't try closing it.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1282 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 07:35:15 +00:00
joerg_wunsch adfea4623d usbdev_close() returns nothing.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1281 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 07:34:33 +00:00
joerg_wunsch d58a2d96f0 If there's no USB handle, bail out from all functions immediately.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1280 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 07:31:55 +00:00
joerg_wunsch d46b1ba752 In usbdev_open(), replace all calls to exit(1) by return -1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1279 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 07:20:32 +00:00
joerg_wunsch b1c64fbe92 Implement the Atmel EDBG/CMSIS-DAP driver protocol for JTAGICE3
(running firmware 3.x) and XplainedPro boards.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1278 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-26 17:54:32 +00:00
joerg_wunsch 9b9af4bc68 In usbdev_recv_frame(), fix a bug where a new recv request was issued
even though all desired data had aldready been received.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1277 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-22 20:30:16 +00:00
joerg_wunsch 66e2a16c9c Change the second parameter of the ser_open method from "baud" into a
"union pinfo", so the USB parameters can be passed without hacks.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1276 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-21 13:44:11 +00:00
joerg_wunsch f7cc3ff662 #include <stdint.h> so uint16_t is correctly defined.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1275 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-30 12:53:27 +00:00
joerg_wunsch 0dbb1ab2f0 Fix EEPROM size of ATmega256RFR2 et al.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1274 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-28 22:01:47 +00:00
joerg_wunsch e7fadbee3c [bug #41357] OS X: Avrdude messes with the usb stack?
* usb_libusb.c (usbdev_close): Only issue the usb_reset() for
Linux systems, as these are the only ones that seem to require
it under some circumstances.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1273 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-27 21:15:28 +00:00
joerg_wunsch 2c3e0e3596 * configure.ac (libelf): check against elf_getshdrstrndx() rather
than just elf_begin() only, so it is clear we found a sufficiently
recent libelf to work with.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1272 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-22 10:44:18 +00:00
joerg_wunsch a71bcc8a2c Update bug ID for STK500v1 patch for devices > 128 KiB.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1271 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-22 07:51:33 +00:00
joerg_wunsch 404ded3db6 Contributed by Alan Horstmann:
Fix handling of devices > 128 KiB in stk500v1 protocol
* stk500.c: Implement extended address byte handling.
* avrdude.conf.in (ATmega2560): enable stk500_devcode so
STK500v1 protocol actually starts at all.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1270 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-22 07:42:18 +00:00
joerg_wunsch b6fd404109 Implement the meat of FLIP version 1 protocol, and document it.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1269 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-17 16:54:33 +00:00
joerg_wunsch 774c46b860 * flip2.c (flip2_page_erase): Remove unimplemented function.
* dfu.h: Correctly conditionalize <usb.h> vs. <lusb0_usb.h>;
add adjustable timeout (struct dfu_dev); add dfu_abort()
* dfu.c (dfu_abort): New function; implement adjustable timeout.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1268 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-17 14:00:01 +00:00
joerg_wunsch b46a86284d * configure.ac (libhid): Turn from AC_TRY_RUN into
AC_TRY_COMPILE, so it also works for cross-compilation
setups.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1267 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-17 08:27:48 +00:00
joerg_wunsch 3dc4496761 Move the descriptor checks up from dfu_init() into the
FLIP protocol implementation.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1266 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 08:11:19 +00:00
joerg_wunsch bd260fe2a4 Clone a FLIPv1 protocol implementation from FLIPv2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1265 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:57:36 +00:00
joerg_wunsch 2424db9b17 Change name of flip2.h include file.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1264 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:42:53 +00:00
joerg_wunsch 06fea06d57 Also change the idempotency #ifdef to reflect the name change.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1263 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:36:44 +00:00
joerg_wunsch 0e259ebe3a * flip2.c: Rename from flip.c
* flip2.h: Rename from flip.h
* Makefile.am: Reflect the renaming.
* dfu.c: Update information how to get GPL.
* dfu.h: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1262 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:34:40 +00:00
joerg_wunsch f4c94d08be Add the 2013 ChangeLog file to distribution.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1261 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:28:53 +00:00
joerg_wunsch a8b4b59e82 In flip2_initialize(), check user is running on an Xmega
device.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1260 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-16 07:27:41 +00:00
joerg_wunsch c049e794dc Added some verbose-level messages.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1259 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-15 16:32:11 +00:00
joerg_wunsch 6818690c26 Submitted by Kirill Levchenko:
patch #7896: DFU FLIPv2 programming support
* pgm_type.c: Add the flip2 programmer type.
* config_gram.y: Allow for the usbid keyword in a device definition.
* avrdude.conf.in: Add usbpid values to those Xmega devices where
applicable.
* avrpart.h: Add usbpid device field.
* dfu.c: (New file.)
* dfu.h: (New file.)
* flip.c: (New file.)
* flip.h: (New file.)
* Makefile.am: Add new files.
* doc/avrdude.texi: Document the changes.
* avrdude.1: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1258 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-15 13:34:49 +00:00
joerg_wunsch bb47c0e310 Annual changelog rotation.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1257 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-15 13:16:34 +00:00
rliebscher c394dfb841 fixed description of pins for ft232r
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1256 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-01-13 20:42:27 +00:00
springob 9094b060a0 * pgm.c/pgm.h: fixed syntax error in const pointer to const
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1255 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-12-15 12:57:13 +00:00
joerg_wunsch 8ffb78dc2a bump version to 6.1-svn-20131205
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1254 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-12-05 16:33:11 +00:00
joerg_wunsch a87d7d7249 bug #40817: Elf file support (possibly) not working on 6.0.1 windows build
* fileio.c (fileio): open file in binary mode also for FMT_ELF




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1253 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-12-05 16:27:54 +00:00
rliebscher 0e9b1c2898 Rework of bitbanging functions setpin, getpin, highpulsepin to make simplier use of new pindefs data in pgm structure
* linuxgpio.c, bitbang.c, buspirate.c, par.c, pgm.h, term.c, serbb_*.c: changed 
	  interface of setpin, getpin, highpulsepin to take pin function as parameter 
	  (not the real number, which can be found by pgm->pinno[function])

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1252 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-12-04 19:02:55 +00:00
rliebscher bded1af4c7 bug #40748 linuxgpio doesn't work on Raspberry PI rev. 2.
* linuxgpio.c: fixed check for unused pins to ignore the inverse flag 
        * pindefs.c: fixed fill_old_pinlist to not create an empty mask with inverse flag set



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1251 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-11-30 12:11:32 +00:00
springob 897bf03884 * ATmega1284 variant added (same as ATmega1284p but with different signature)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1250 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-10-24 17:31:53 +00:00
springob 24ef76bffd * ATmega1284 variant added (same as ATmega1284p but with different signature)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1249 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-10-18 07:59:06 +00:00
hweisbach 68b2b5ced6 Add UM232H and C232H programmers
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1248 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-25 10:56:55 +00:00
joerg_wunsch faf274134b Submitted by Daniel Rozsnyo:
bug #40085: Typo fix in fuses report (for 6.1-svn-20130917)
* main.c: Fix a typo.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1247 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-22 21:23:12 +00:00
hweisbach 3f50b9dfcc Remove DRYRUN-option from avrftdi
This options was used during developing to examine the created
bytestream - even without an FTDI device present. avrftdi creates
correct bytestreams and thus, this is option is not of any use anymore.
To the contrary: it makes code unreadable, more complex and prone to error.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1246 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-19 16:28:11 +00:00
hweisbach 1b89c590dc task #12798 Please cleanup #ifdef notyet entries in avrftdi.c
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1245 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-19 16:07:35 +00:00
joerg_wunsch d292c1a394 bug #40055: AVRDUDE segfaults when writing eeprom
* main.c: Always clear the UF_AUTO_ERASE flag if either a
non-Xmega device was found, or the programmer does not offer a
page_erase method.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1242 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-18 05:54:37 +00:00
joerg_wunsch 2c443f466f We are post-6.0 now.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1241 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-17 21:20:25 +00:00
joerg_wunsch ce2836fa98 Prepare everything for 6.0-RELEASE.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1239 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-17 20:54:48 +00:00
joerg_wunsch f9267a5bb3 Give some more installation/building hints.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1238 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-17 20:50:30 +00:00
joerg_wunsch 7023e2345c * jtag3.c (jtag3_initialize): Fix a buffer overflow by limiting
the flash page cache size to at most "readsize".  For Xmegas with
a page size of 512 bytes, the maximum USB packet size was
overflowed, and subsequently, a memmove copied beyond the end of
the allocated buffer.
* jtag3.c (jtag3_read_byte): Add the correct offset also for the
various flash regions, so reading the apptable or boot regions
yields the correct data.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1237 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-17 15:06:35 +00:00
joerg_wunsch 05bff44a6e Submitted by Joakim Lubeck:
bug #40040: Support for ATtiny20 and ATtiny40
* avrdude.conf.in: Restructure the reduced-core tiny devices
to use a common entry .reduced_core_tiny; add ATtiny20 and
ATtiny40




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1236 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-16 19:40:15 +00:00
joerg_wunsch a8888ec385 Few minor clarifications.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1235 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-16 19:23:21 +00:00
joerg_wunsch aee84229c5 Mention the libelf/libelf-devel requirement for the ELF feature.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1234 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-16 15:05:44 +00:00
joerg_wunsch c7903a4153 In preparation for a release, move the new (partially incompatible with the
previous version) features on top so they will become immediately apparent
in the release notes.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1233 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-16 15:01:39 +00:00
joerg_wunsch e7c450c7e1 Fix a typo: s/ATxmega8E6/ATxmega8E5/
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1232 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-16 07:19:32 +00:00
joerg_wunsch 9957d541f2 Submitted by Joakim Lubeck:
bug #40033: Support for the XMegaE5 family
* avrdude.conf.in (ATxmega8E6, ATxmega16E5, ATxmega32E5): New
entries.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1231 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-15 19:50:53 +00:00