Commit Graph

680 Commits

Author SHA1 Message Date
Joerg Wunsch dbed2e283a This commit was manufactured by cvs2svn to create tag
'RELEASE_5_3_0'.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/tags/RELEASE_5_3_0@710 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:40:07 +00:00
Joerg Wunsch b2c5030890 Cosmetic: mention the current changes are now for 5.3.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@709 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:40:06 +00:00
Joerg Wunsch 1652c1b781 Mention frank-stk200 in the docs.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@708 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:05:56 +00:00
Joerg Wunsch 22fe8cd1e1 Bump version to 5.3, ready to release.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@707 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:01:30 +00:00
Joerg Wunsch 9749ffcd75 Submitted by Vince VG:
* avrdude.conf.in (frank-stk200): New programmer added.
Closes patch #5502: one other programmer


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@706 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 21:44:14 +00:00
Joerg Wunsch ac95d249d6 In usbOpenDevice(), clear the error code when returning successfully.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@705 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 21:21:14 +00:00
Joerg Wunsch f239ffa1d1 Submitted by Christian Starkjohann:
patch #5507: Support for AVR-Doper USB programmer in HID mode

* configure.ac: Add hooks to detect the Win32 HID library,
as well as the existence of <ddk/hidsdi.h>.
* Makefile.am: Add new files.
* my_ddk_hidsdi.h: (New file.)
* ser_avrdoper.c: (New file.)
* serial.h: Add declaration for avrdoper_serdev.
* stk500v2.c: Add hook to divert to the AVR Doper code.
* avrdude.1: Document the AVR Doper support.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@704 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-20 23:43:34 +00:00
Joerg Wunsch ef04ad29bf Submitted by ivanv at netman.ru
Fix length for single-byte write operations.
Closes bug #18527 JTAG ICE: fuse bits have been writen incorrectly


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@703 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-15 15:42:44 +00:00
Joerg Wunsch a1afb8ea4a In jtagmkII_paged_write(), remove a debugging
usleep(1000000) that accidentally crept in in rev 1.19.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@702 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 16:48:52 +00:00
Joerg Wunsch 631f057984 In ser_open(), do fill in fdp->ifd before already
using it in ser_setspeed().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@701 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 16:02:45 +00:00
Joerg Wunsch dfe36d084b Sigh, fix yet another printf() format warning (on 64-bit architectures).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@700 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 15:33:19 +00:00
Joerg Wunsch 7abd4c5bb2 In jtagmkI_close(), revert baud rate to the initial
value in case we had changed it.

Fixes bug #18262: JTAGMKI/JTAG1 Reset Bug


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@699 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 15:15:50 +00:00
Colin O Flynn f25cf95909 Colin O'Flynn <coflynn@newae.com>
* safemode.c: Stop ignoring return values!
      Closes bug #18339


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@698 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:41:59 +00:00
Joerg Wunsch 10eb9c7f5c Submitted by Nick Lott:
Fix signature for ATmega8515.

Closes bug #18348: ATMEGA8515 Signature is wrong in avrdude.conf


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@697 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:23:46 +00:00
Joerg Wunsch 08f272851c Actually return the number of bytes read or written in avr_read() or
avr_write(), respectively, in case the paged_load()/paged_write()
methods succeeded, rather than only 0.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@696 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:06:52 +00:00
Joerg Wunsch 35a87b9b6f Fix a bug introduced in rev. 1.69, when implementing the
fallback from each programmer's paged_load() or paged_write()
method, respectively.  The return value needs to be checked for
being greater or equal than 0 rather equal to 0 in order to
assume the operation has been successful.

Fixes bug #18489: avrdude is too slow (20 byte/s)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@695 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:01:54 +00:00
Joerg Wunsch ab86a7d09b Make the code compile warning-free:
- declare a dummy "struct timezone" for some Win32 systems (MinGW)
- fix a few printf() argument types
- get rid off the prevailing "all filedescriptors are of type int"
  attitude

The last item required a large sweep across the code, in order to
replace all "int fd"s by "struct filedescriptor *fd"s, and pass
pointers (as we cannot pass a union directly).  In return, the
code is now supposed to be fully 64-bit safe, rather than relying
on a 64-bit pointer being converted to a (32-bit) int and back
to a pointer as we did previously.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@694 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 12:47:35 +00:00
Joerg Wunsch fa205ce214 Implement EEPROM access through debugWire.
* jtagmkII.c: Extend the jtagmkII_read_byte() and
jtagmkII_write_byte() methods to handle EEPROM through
debugWire.

* avrpart.h: Implement the "flash instruction" parameter.
* config_gram.y: (Ditto.)
* lexer.l: (Ditto.)
* avrdude.conf.in: (Ditto.)

* avrdude.1: Document the EEPROM access through dW.
* doc/avrdude.texi: (Ditto.)

* tools/get-dw-params.xsl: Extend to extract the flash
instruction field.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@693 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-23 07:07:06 +00:00
Joerg Wunsch 7d1d5424d2 In avr_read() and avr_write(), if the paged access returns a
failure, fall back to byte access.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@692 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-23 07:02:22 +00:00
Joerg Wunsch a473be7683 In jtagmkII_read_byte() and jtagmkII_write_byte(), return an error
upon failure now that the upper layers won't fall back to the cmd()
method anymore in that case.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@691 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 16:13:08 +00:00
Joerg Wunsch 84e401d795 Add debugWire entries for all devices where dW is known to exist
(according to the XML files).

Add an XSL stylesheet to extract the dW
parameters from the XML files.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@690 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 11:56:26 +00:00
Joerg Wunsch 17ac6b9989 Mention our debugWire support.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@689 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 11:19:10 +00:00
Joerg Wunsch 4108e10380 Implement debugWire programming support. Several limitations are
imposed by debugWire itself, so effectively, only flash ROM can be
read and written.

Currently, the required changes to avrdude.conf.in are only present
for the ATtiny44.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@688 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 23:23:37 +00:00
Joerg Wunsch 71cd3f3dd1 jtagmkI_close(): remove two unused variables.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@687 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 22:07:25 +00:00
Joerg Wunsch 47bc86120d Fix date of last changelog entry (copy&paste-o).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@686 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 21:35:26 +00:00
Joerg Wunsch 22879832f1 Add the default read_byte() and write_byte() methods here, too. Forgot
to commit these files in previous commit.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@685 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:08:13 +00:00
Joerg Wunsch a4fa4ea9fc Replace the fallback of avr_read_byte() and avr_write_byte() to
avr_read_byte_default() and avr_write_byte_default (resp.) by directly
calling the latter functions from within all programmers that don't
implement their own read_byte()/write_byte() methods.  In turn, make the
read_byte() and write_byte() methods mandatory, and the cmd() method
(direct ISP command) optional instead (it's effectively mandatory for
any programmer using avr_read_byte_default()/avr_write_byte_default()
though).  Remove all the pointless cmd() method stubs from those programmers
that don't need it.

Eliminate avr_read_byte() as it was now completely identical to
pgm->read_byte().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@684 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:04:09 +00:00
Joerg Wunsch 074b7a0868 Avoid sending a CMD_RESET when leaving programming mode, and CMD_GO
when closing the connection.  They cause the activity LED on the ICE
to continue to flicker, and are not necessary anyway (the target
starts to run by itself when leaving programmng mode).

This is a partial fix for bug #18262: JTAGMKI/JTAG1 Reset Bug


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@683 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-13 21:14:28 +00:00
Colin O Flynn 1da689ac37 * avrdude.conf.in: Add read support for lockbits on Tiny2313 device.
Applies patch #5538


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@682 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-12 16:11:55 +00:00
Joerg Wunsch c02384d670 Add signatures for ATmega325/3250/645/6450.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@681 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-09 23:06:55 +00:00
Joerg Wunsch 45d7a727cd Preserve ${LDFLAGS} inherited from environment for Win32 environments.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@680 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-08 12:37:05 +00:00
Joerg Wunsch d11d70ea6c Don't pretend --enable-doc were the default.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@679 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-07 20:32:41 +00:00
Joerg Wunsch 885333687c Fix the width of the efuse memory area for a number of AVRs.
Closes bug #18182: Wrong setting of eFuse configuration for
mega640/1280/1281/2560/2561 in avrdude 5.2


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@678 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-02 21:02:41 +00:00
Joerg Wunsch 197dc966e9 Implement and document HVSP and PP modes for the AVR Dragon.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@677 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-01 21:47:25 +00:00
Joerg Wunsch 25e7980b28 Implement a flags field in struct serdev, and populate it with a flag
that indicates whether the underlying communication can dynamically
change its speed or not.  This flag is set for true serial
communication but clear for USB communication.  Don't try to adjust
the speed when talking over a communication channel that doesn't
support it.  (The Dragon does not even support the respective
parameter.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@676 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-27 08:45:47 +00:00
Joerg Wunsch 38c5d278aa Add support for the AVR Dragon (JTAG and ISP mode).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@675 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-26 21:14:10 +00:00
Joerg Wunsch f2d7a52f51 This is post-release 5.2 now.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@674 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 14:57:18 +00:00
Joerg Wunsch 79ce8f34bf Bump version for release 5.2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@672 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 14:47:29 +00:00
Joerg Wunsch 2ccc76a66d Submitted by John Voltz: add AVR053 oscillator calibration.
* main.c: Add the -O option.
* pgm.c: Add the hook for the perform_osccal() method.
* pgm.h: (Ditto.)
* stk500v2.c: Implement perform_osccal().
* avrdude.1: Document the -O option.
* doc/avrdude.texi: (Ditto.)
Partially closes bug #17487: AVR RC oscillator calibration
routine not supported (feature request)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@671 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 14:34:24 +00:00
Joerg Wunsch 6b8fa85a0b Submitted by freckle@sf.net:
* stk500.c (stk500_paged_write): Send the command and the data
payload within a single write().
patch #5025: Improve stk500.c robustness

Submitted by Matthias Ringwald:
* stk500.c (stk500_open): do not flush the serial line after
getting in sync with the programmer.
patch #5293: stk500.c: no drain after sync (-> allow BTnode
Bootloader to work on cygwin)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@670 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 09:56:10 +00:00
Joerg Wunsch 8c215d1da5 Make the private prototype for gettimeofday() only visible if the
autoconfiguration figured out we need it.  The private implementation
has already been protected that way.

This should finally really fix bug #17884: another gettimeofday
conflict under win32/cygwin


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@669 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-30 20:48:17 +00:00
Joerg Wunsch 860aea6e04 The return type of gettimeofday() is actually `int' not `void'.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@668 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-30 19:36:22 +00:00
Joerg Wunsch 0353e3ade9 Fix prototype for gettimeofday().
Closes bug #17884: another gettimeofday conflict under win32/cygwin


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@667 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-29 20:52:32 +00:00
Joerg Wunsch f39e957354 Submitted by Thomas Fischl (initially):
Add the CoreFoundation and IOKit framework linker flags on MacOS X
when configuring for USB support.

patch #4685: Libusb on MacOS X: detection and additional includes

Thanks to Matthias Ringwald for testing the reworked patch.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@666 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-24 13:35:40 +00:00
Joerg Wunsch b8d0a34c44 * avr910.c: As there is a lot of ambiguity about the AVR910
device codes, allow the user to override the device code
verification with the -F option.
* main.c: Make ovsigck a global variable.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@665 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-20 21:32:18 +00:00
Joerg Wunsch 0734c16f98 Sync NEWS with latest changes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@664 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-19 22:33:53 +00:00
Joerg Wunsch 73f657ac41 Add the "stk500generic" programmer that auto-probes for STK500
either firmware version 1 or 2.
* Makefile.am (avrdude_SOURCES): add the new files
stk500generic.c and stk500generic.h.
* avrdude.conf.in: Add the stk500generic programmer type, and
change the "stk500" entry to point to this programmer.
* config_gram.y: Add the stk500generic keyword.
* lexer.l: (Ditto.)
* stk500.c: Change the stk500v1 code to not call exit()
prematurely when failing to open the programmer, but instead
return an error status.
* stk500generic.c: (New file.) Stub programmer implementation.
Probe for either stk500v1 or stk500v2, and adjust the current pgm
appropriately.
* stk500generic.h: (New file.) Declare the public interface(s)
of stk500generic.c.
* doc/avrdude.texi: Document the changed behaviour of stk500.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@663 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-19 22:27:30 +00:00
Joerg Wunsch 2e86c833ce Various fixes for ancient processors and their capabilities. For the
AT90S1200 and the AT90S8515, fuse bit handling via ISP, and lock bit
reading via ISP are not supported at all.  For the AT90S4414 (small
brother of the AT90S8515), add the ability to write the lock bits, and
add a definition for the fuse bits (usable for HV programming).  For
the AT90S2313, add the "fuse" memory range, so it's available for HV
programming.

Resolves bug #17796: avrdude will not program or verify lockbits with
Atmel STK protocol programmers


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@662 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-18 21:48:36 +00:00
Joerg Wunsch f3dfeb6ecf Submitted by Thomas Fischl:
* usbasp.c: Check for USBasp with new as well as old VID/PID
pair, warn the user about upgrading the firmware in case an
old one has been found.
* usbasp.h: Add new VID/PID.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@661 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-17 20:35:36 +00:00
Joerg Wunsch 8e5f9c7e1b Fix some mistakes for the ATtinyX61 family:
. high fuse has 8 bits
. there is an extended fuse (just one bit)
. the calibration area is only 1 byte


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@660 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-15 21:41:29 +00:00