Commit Graph

707 Commits

Author SHA1 Message Date
joerg_wunsch a60fc98584 Fix AVR910 devcodes. It seems that the AVR109 listing refers to
"BOOT"-type code, while the standard codes are different (usually one
below).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@740 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-16 21:29:36 +00:00
joerg_wunsch 036bfc95b5 In avr_read() and avr_write(), only use the paged_load and
paged_write backend functions iff the memory area in question has
a page_size != 0.

This is supposed to fix bug #19234: avrdude-5.3.1 segfaults when
stk500v1 tries to program an ATtiny15


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@739 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-16 20:15:13 +00:00
joerg_wunsch 7ca9fac139 Fall back to avr_{read,write}_byte_default().
Fixes bug #18803: Fuse reading regression in avrdude 5.3.1 with avr910
programmer


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@738 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-15 22:00:29 +00:00
joerg_wunsch 058a51a416 Rename the ATmega164 and ATmega324 into ATmega164P and ATmega324P,
resp.  Add an entry for the ATmega644P.

Fixes bug #19769: ATmega164p not recognized


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@737 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-15 20:39:40 +00:00
joerg_wunsch effa0a16cd In ser_send(), don't select() on the output fd before trying to write
something to the serial line.  That kind of polling isn't very useful
anyway, and it seems it breaks for the Linux CP210x USB<->RS-232
bridge driver which is certainly a bug in the driver, but we can just
avoid that bug alltogether.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@736 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-15 20:30:15 +00:00
joerg_wunsch 4b25f0b685 Fix the STK500v2 ISP delay parameter for
ATmega640/1280/1281/2560/2561.  Atmel has changed the XML
files after the initial release.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@735 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-15 20:25:48 +00:00
joerg_wunsch dbdea5a979 Style and indentation fixes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@734 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-15 20:23:50 +00:00
c_oflynn 6b4270e2d8 2007-05-01: Colin O'Flynn <coflynn@newae.com>
*Problem in verbose output of previous commit. I hoped to
   have all the verbose changes in a single commit, but that
   won't happen...
  *Main thing is fixed safemode to turn itself off when you can't
   read the fuses anyway. I don't know what I was thinking when
   I made it fail out of programmers that don't support fuse reading.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@733 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-02 23:05:21 +00:00
c_oflynn 7d0d997877 2007-05-01 Colin O'Flynn <coflynn@newae.com>
safemode.c: added verbose output


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@732 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-05-02 22:36:04 +00:00
c_oflynn 914e2ed3ec Colin O'Flynn <coflynn@newae.com>
*stk500generic.c: FIxed bug 19411


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@731 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-03-25 22:43:50 +00:00
joerg_wunsch 9b19452848 Add entries for AT90PWM2/3B.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@730 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-02-26 19:52:53 +00:00
fischl 1af6247869 usbasp.c: return error if communication with target isn't possible.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@729 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-02-02 16:27:49 +00:00
joerg_wunsch afe3356b9c Remove duplicate definition of token K_WRITEPAGE.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@728 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-02-01 22:07:39 +00:00
joerg_wunsch 06235497a7 Implement ATmega256x support for butterfly/avr109.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@727 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-30 15:47:53 +00:00
joerg_wunsch 00bed106a4 Fix subdir handling. Now finally, "make distcheck" will
include the documentation into the tarball even if the configure had been
run without the --enable-doc.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@726 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-30 14:41:57 +00:00
joerg_wunsch 817a1ce552 safemode.c: Obtain progname from avrdude.h rather than trying to roll our
own (duplicate) copy of it.

other files: Constify char pointers.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@725 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-30 13:41:54 +00:00
joerg_wunsch 7c7ba6733e More backend/library abstraction and generalization: turn the
list_parts() and list_programmers() functions into general list
iteration functions that call a caller-supplied callback for each
element.  Implement list_parts() and list_programmers() as private
functions in main.c based on that approach.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@724 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-29 20:41:47 +00:00
joerg_wunsch 3f8e4dfe8c Rearrange everything so it is now built into a libavrdude.a library,
and link main.c against that library.

Add AC_PROG_RANLIB to configure.ac as we are building a library now.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@723 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-25 20:51:11 +00:00
joerg_wunsch 07c1079415 Major code cleanup.
- Make all internal functions "static".
- Make sure each module's header and implementation file match.
- Remove all library-like functionality from main.c, so only
  the actual frontend remains in main.c.
- Add C++ brackets to all header files.

That effectively leaves the various module C files as something like
an "avrdude library", with main.c being the currently only frontend
program for that library.  In theory, it should be possible to write
different frontends using the same library backend functions though.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@722 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-24 22:43:46 +00:00
joerg_wunsch 1cae809b9b Something I always wanted to do: replace all those private "extern"
declarations in each file by a central header file "avrdude.h".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@721 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-24 21:07:54 +00:00
joerg_wunsch 2c6b2309d5 ATmega8: Bump the delay values for flash
and EEPROM, based on the current Atmel XML file.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@720 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-13 22:57:14 +00:00
joerg_wunsch dfdd8c0ea5 * configure.ac: Improve the detection of the Win32 HID library,
and the presence of the header ddk/hidsdi.h.  It now works
correctly under Cygwin and several flavours of MinGW.

* Makefile.am: Add new LIBHID pattern.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@719 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-12 22:41:05 +00:00
joerg_wunsch b991041fe3 * butterfly.c (butterfly_initialize): when sending the 'T'
command (which is ignored by current AVR109 bootloaders),
send the first reply from the list of supported device
codes back rather than using avrdude.conf's idea about
an AVR910 device code.  Apparently, this solves disagreements
between different versions of at least the ATmega8 AVR910
device code.

Closes bug #18727: Writing flash failed


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@718 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-11 20:20:25 +00:00
joerg_wunsch ebad612f9a Reported by Till Harbaum:
Change HVSP reset timing for ATtiny25/45/85 from
500 microseconds to 1 ms, matching the most recent Atmel XML
specs.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@717 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-07 22:36:45 +00:00
joerg_wunsch 065eaa9bda ChangeLog rotation.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@716 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-07 22:34:21 +00:00
joerg_wunsch 159be5f675 We are post-release (again).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@715 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-22 23:21:53 +00:00
joerg_wunsch cb7646c7b6 Actually bump version to 5.3.1 now.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@713 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-22 22:55:33 +00:00
joerg_wunsch 1ad3f961f1 * configure.ac (AC_INIT): Bump version to 5.3.1.
* avrdude.conf.in (frank-stk200): Fix syntax error.
* ser_avrdoper.c: Make #ifdef for Win32/libhid
consistent with the initial check: use the HID driver
only iff found, otherwise use libusb.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@712 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-22 22:52:34 +00:00
joerg_wunsch 857c1ba558 We are now post release 5.3.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@711 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:48:14 +00:00
joerg_wunsch 2fc6741f06 Cosmetic: mention the current changes are now for 5.3.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@709 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:40:06 +00:00
joerg_wunsch 8f04e0fd1c Mention frank-stk200 in the docs.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@708 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:05:56 +00:00
joerg_wunsch 6dad64ee01 Bump version to 5.3, ready to release.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@707 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 22:01:30 +00:00
joerg_wunsch ff1fcf6c5d 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/avrdude@706 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 21:44:14 +00:00
joerg_wunsch 6523398ca8 In usbOpenDevice(), clear the error code when returning successfully.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@705 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-21 21:21:14 +00:00
joerg_wunsch 26e8bc656a 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/avrdude@704 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-20 23:43:34 +00:00
joerg_wunsch 97e45d71bb 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/avrdude@703 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-15 15:42:44 +00:00
joerg_wunsch 4652c6428a 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/avrdude@702 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 16:48:52 +00:00
joerg_wunsch ee0dcf32bc 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/avrdude@701 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 16:02:45 +00:00
joerg_wunsch 863e3f6c92 Sigh, fix yet another printf() format warning (on 64-bit architectures).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@700 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 15:33:19 +00:00
joerg_wunsch dd48976e55 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/avrdude@699 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 15:15:50 +00:00
c_oflynn b4807ef7da 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/avrdude@698 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:41:59 +00:00
joerg_wunsch 5b53108e63 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/avrdude@697 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:23:46 +00:00
joerg_wunsch 6cd309f1c0 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/avrdude@696 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:06:52 +00:00
joerg_wunsch 4beee5ff79 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/avrdude@695 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 14:01:54 +00:00
joerg_wunsch 31fa98b708 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/avrdude@694 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-12-11 12:47:35 +00:00
joerg_wunsch 8bd117dccf 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 aef8e953ab 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 4bbd40415d 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 134947dc7f 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 098a6c6bea Mention our debugWire support.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@689 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 11:19:10 +00:00