Commit Graph

258 Commits

Author SHA1 Message Date
Joerg Wunsch 84b633e41d 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/avrdude@693 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-23 07:07:06 +00:00
Joerg Wunsch 946810fb81 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/avrdude@692 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-23 07:02:22 +00:00
Joerg Wunsch 0e054fac95 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/avrdude@691 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 16:13:08 +00:00
Joerg Wunsch 04203ce892 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/avrdude@690 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 11:56:26 +00:00
Joerg Wunsch 9b9df3e773 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/avrdude@688 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 23:23:37 +00:00
Joerg Wunsch 432ee9035b jtagmkI_close(): remove two unused variables.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@687 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 22:07:25 +00:00
Joerg Wunsch 9461d2d3f7 Fix date of last changelog entry (copy&paste-o).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@686 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 21:35:26 +00:00
Joerg Wunsch 41c5e95ab3 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/avrdude@685 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:08:13 +00:00
Joerg Wunsch afb13a9936 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/avrdude@684 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:04:09 +00:00
Joerg Wunsch 23aeb38d13 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/avrdude@683 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-13 21:14:28 +00:00
Colin O Flynn 08d75b98cb * avrdude.conf.in: Add read support for lockbits on Tiny2313 device.
Applies patch #5538


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@682 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-12 16:11:55 +00:00
Joerg Wunsch 615eb73a13 Add signatures for ATmega325/3250/645/6450.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@681 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-09 23:06:55 +00:00
Joerg Wunsch 6d92b75e34 Preserve ${LDFLAGS} inherited from environment for Win32 environments.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@680 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-08 12:37:05 +00:00
Joerg Wunsch 4c1e35fd41 Don't pretend --enable-doc were the default.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@679 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-07 20:32:41 +00:00
Joerg Wunsch 898d885c84 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/avrdude@678 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-02 21:02:41 +00:00
Joerg Wunsch 31f93ccb59 Implement and document HVSP and PP modes for the AVR Dragon.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@677 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-01 21:47:25 +00:00
Joerg Wunsch 4e81a6be72 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/avrdude@676 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-27 08:45:47 +00:00
Joerg Wunsch 90d6100d88 Add support for the AVR Dragon (JTAG and ISP mode).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@675 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-26 21:14:10 +00:00
Joerg Wunsch 381da63571 Bump version for release 5.2.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@672 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 14:47:29 +00:00
Joerg Wunsch 2cfccda03d 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/avrdude@671 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 14:34:24 +00:00
Joerg Wunsch 57028107ff 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/avrdude@670 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-10-09 09:56:10 +00:00
Joerg Wunsch 700ad46615 Fix prototype for gettimeofday().
Closes bug #17884: another gettimeofday conflict under win32/cygwin


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@667 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-29 20:52:32 +00:00
Joerg Wunsch 65d1632701 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/avrdude@666 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-24 13:35:40 +00:00
Joerg Wunsch 73cfe88386 * 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/avrdude@665 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-20 21:32:18 +00:00
Joerg Wunsch bf388ff428 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/avrdude@663 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-19 22:27:30 +00:00
Joerg Wunsch 9747c576a3 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/avrdude@662 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-18 21:48:36 +00:00
Joerg Wunsch 32c8b8a430 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/avrdude@661 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-17 20:35:36 +00:00
Joerg Wunsch 0380312754 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/avrdude@660 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-15 21:41:29 +00:00
Joerg Wunsch 51012e9af8 Convert some of the tables to multitables
in order to beautify the result.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@657 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-12 12:01:34 +00:00
Joerg Wunsch 637e389ef3 Contributed by Thomas Fischl: add support for USBasp.
patch #4686: Add support for USBasp, a simple USB programmer
* usbasp.c: New file, implement the USBasp driver.
* usbasp.h: New file, interface declarations for USBasp.
* Makefile.am: Wire the new files into the build.
* avrdude.conf.in: Add the usbasp programmer entry.
* config_gram.y: Add the usbasp token.
* lexer.l: (Ditto.)
* avrdude.1: Document the USBasp programmer.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@656 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-10 20:41:00 +00:00
Joerg Wunsch 501a1606b4 Implement -U filename as a shorthand for -U flash:w:filename:a.
This has once been suggested by Brian Dean.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@655 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-08 21:52:45 +00:00
Joerg Wunsch 876d75a1a8 Implement numerical output formats for decimal, hexadecimal, octal,
and binary numbers.

Closes bug #16129: more output formats for fuse bits (avrdude
enhancement request)

* fileio.c: Implement fileio_num() and the itoa_simple() helper function.
* fileio.h: Add new file formats to FILEFMT.
* main.c: Parse the new file formats.
* avrdude.1: Document all this.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@654 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-08 21:28:24 +00:00
Joerg Wunsch b118ea42ca Hide two debug/trace statements behind "verbose".
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@653 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-08 21:10:05 +00:00
Joerg Wunsch 76b13550bc CPP statements start in column #1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@652 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-08 19:46:45 +00:00
Joerg Wunsch a41fdc3385 Describe how to disable the DWEN fuse.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@651 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-07 20:42:01 +00:00
Joerg Wunsch 9a961e3054 Translate numerical response codes to strings.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@650 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-07 19:57:59 +00:00
Joerg Wunsch 27216a0cd6 The avr109 programmer type no longer chokes on a wrong avr910 device
ID, so remove that description.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@648 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-07 19:34:17 +00:00
Joerg Wunsch 8d207dbaf1 When failing to start in ISP mode, try debugWire instead. This
requires the user to eventually restart AVRDUE from scratch then.

jtagmkII_reset() had to get a second parameter in order to record
the reset mode.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@647 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-06 22:37:30 +00:00
Joerg Wunsch 995bd68034 Add support for the JTAG ICE mkII in ISP mode.
* avrdude.conf.in (jtag2isp): New programmer entry.
* config_gram.y: Add K_JTAG_MKII_ISP.
* jtagmkII.c: Restructure and export some more functions.
* jtagmkII.h: Declare exported functions.
* jtagmkII_private.h: Prepare file to be included in stk500v2.c.
* lexer.l: Add jtagmkii_isp token.
* stk500v2.c: Implement glue to jtagmkII.c.
* stk500v2.h: Declare stk500v2_jtagmkII_initpgm().
* avrdude.1: Document the new programmer support.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@643 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-06 20:06:07 +00:00
Joerg Wunsch 7c235970a1 Add date and time of compilation to the verbose greeting message.
Idea taken from patch #3172: Adds date and time of compile to usage
message


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@642 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-01 21:15:03 +00:00
Joerg Wunsch 86f70682e2 Contributed by <avrdude@zevv.nl> as
patch #4372: Better synchronization for stk500

Sync three times, and drop any noise inbetween.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@641 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-01 21:00:36 +00:00
Joerg Wunsch 0da2134afc Add entries for the ATtiny261/461/861 devices.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@640 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-01 20:48:04 +00:00
Joerg Wunsch 4a55a6583a * butterfly.c: Remove the device support decision based on
the old AVR910 device codes; we've got signature verification
now so better rely on that.

* avr910.c: Revert the signature bytes returned, as it already
happened in butterfly.c.  This closes bug #14998: Signature Bytes
read in wrong order (avr910 mode)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@638 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-01 10:03:12 +00:00
Joerg Wunsch ccc928603f Submitted by Wim Lewis.
Improve error handling.

patch #4923: Better error reporting for serial-bitbang programmers


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@637 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-31 22:07:39 +00:00
Joerg Wunsch ded7ebf2e4 Introduce a "stk500v1" entry, so we can switch the default "stk500" to
"stk500v2" some day.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@636 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-31 21:19:58 +00:00
Joerg Wunsch 9e0c0b850a The major part of this change has been contributed by
<andyw@pobox.com>.

Implements patch #4635: Add support for terminal/console servers for
serial programmers

* ser_posix.c: Add net_open(), and divert to it for net:host:port.
* ser_win32.c: Recognize net:host:port, and bail out.
* avrdude.1: Document the net:host:port connection option.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@635 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-31 20:52:47 +00:00
Joerg Wunsch 8ce2ee704c Fix for bug #16627: Butterfly programmer does not reset after programming
Wait for the device's response after sending an "E" command.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@634 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-31 11:02:25 +00:00
Joerg Wunsch b5e7797c33 Tentative fix for bug #16156: Problem with Si-Prog
Disable reset before closing.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@633 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-31 10:55:20 +00:00
Joerg Wunsch 56aa52e7dd Rewrite the serbb code so the pin numbering matches the
DB9 connector, and fix some related bugs in serbb_posix.c.
Closes bug #16265: dasa2 does not work under posix

* avrdude.conf.in: New serbb pin numbering; added "siprog"
as an alias for "ponyser".
* serbb_posix.c: New pin numbering, fix some confusion.
* serbb_win32.c: New pin numbering.

The generic and Posix-related parts of these changes have
been contributed by Hanns-Konrad Unger


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@631 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-30 14:08:37 +00:00
Joerg Wunsch 5264e5511b Contributed by the anonymous developer of patch #5096:
Add an entry for the Altera byteblaster.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@630 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-30 05:13:15 +00:00