Commit Graph

56 Commits

Author SHA1 Message Date
Brian S. Dean 935548add3 This is patch # 4338, obsoletes patch #4327, provides fixes for bugs
#13693, #13871, and #14212.

This provides bug fixes to the STK500V2 programmer type.  From the
patch information:

    - incorrect token used from avrdude.conf.in

    - wrong command sent to programmer, hence no write to eeprom.

    - programmer was said to start writing at 0x0000 and continue page
      by page and was not repositionned when a gap was found in the
      hex file, or when the hex file start address was not
      0x0000. Hence the verify procedure was correct, not the write
      procedure.

    - speed up of flash write to skip empty pages (full of 0xFF) by
      re-enabling a dedicated function for that task.

    - stk500v2_paged_load() was not returning the number of byte read,
      so empty hex files were generated when reading memory.

Submitted by:  Bernard Fouch <bernard.fouche@kuantic.com>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@490 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-28 22:23:35 +00:00
Brian S. Dean 98146769f3 Remove some debug code accidentally left in.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@484 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-07-26 04:59:50 +00:00
Brian S. Dean 1fc5484234 The stk500v2_getsync() function was improperly checking for success,
thus it was falsely reporting that it failed when it was actually
working correctly.  Fixed.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@482 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-07-26 02:56:29 +00:00
Joerg Wunsch c2abd46745 Revert the serial_recv() timeout handling as it used to be before my
yesterday's changes (i.e. before rev. 1.10 of ser_posix.c), that is,
exit(1) in case of a timeout.  Previously, the upper layers didn't see
the timeout at all.

Quite possible that some of these drivers could handle a timeout more
intelligently though.  At least for the rather sophisticated STK500v2
protocol, I think it should be possible to retry the request.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@460 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-11 17:09:22 +00:00
Joerg Wunsch 89b8ceb5d0 Properly close commend in $ Id $.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@455 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 20:58:45 +00:00
Joerg Wunsch 04831af970 Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).

Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).

The JTAG ICE mkII support should be considered alpha to beta quality
at this point.  Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required.  Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).

Note that for the JTAG ICE, I did change a few things in the internal
API.  Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation).  Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character.  The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery.  The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00