Commit Graph

20 Commits

Author SHA1 Message Date
Joerg Wunsch 5c8f87e395 In lieu of Michael Holzt, add his serbb serial bit-bang code so it
will be available in the upcoming avrdude release.

His addition has been implemented by means of a generalized bit-bang
interface that contains the common part between serial and paralle
bit-bang devices, and specialed backends for the serial and parallel
port connections.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@515 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 20:12:23 +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
Brian S. Dean 6249f94515 Update code copyrights.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@438 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-12-22 01:52:45 +00:00
Jan-Hinnerk Reichert 80f996b49a stk500.c, term.c, doc/avrdude.texi, avrdude.1: added "sck"-command to the terminal mode. This command allows slowing down of the SCK of STK500-programmers.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@427 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-07-07 08:59:07 +00:00
Jan-Hinnerk Reichert 7b4466c24b Removed unnecessary includes of config.h
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@426 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-07-05 15:04:19 +00:00
kiwi64ajs be4f46c49e merged in changes to allow native Win32 build with no cygwin DLL dependancy
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@419 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-06-24 11:05:07 +00:00
Jan-Hinnerk Reichert 51491c6916 * pgm.[ch], main.c, par.c, avr910.c, butterfly.c, stk500.c:
Move save/restore-functionality into open/close.
	* par.c: open/close now saves/restores PPICTRL, too.
	* TODO: exitspecs don't work if RESET is in PPICTRL.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@407 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-01-28 20:01:44 +00:00
Jan-Hinnerk Reichert 816ff2623e * avr910.c, pgm.c, pgm.h, config_gram.y, lexer.l: Add new configuration parameter baudrate to support avr910-programmers with non-standard baudrates
* avrdude.conf.in, doc/avrdude.texi: Added "baudrate" to documentation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@398 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-01-03 18:36:44 +00:00
Joerg Wunsch 4e704ad695 Add support for displaying and changing the various STK500 operational
parameters.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@336 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-07-24 21:26:28 +00:00
Theodore A. Roth 4415c52f08 * avr.c (avr_write): Add call to pgm->write_setup() before the write loop.
* avr910.c: Change all show_func_info() calls to no_show_func_info().
Add read/write to/from flash/eeprom memory functionality.
* pgm.c: Initialize pgm->write_setup.
* pgm.h: Add write_setup field to PROGRAMMER structure.
* ser_posix.c: Remove unneeded cast in verbosity code.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@299 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-24 07:09:16 +00:00
Theodore A. Roth 4165644dd9 * avr.c: Add avr_read_byte_default().
Have avr_read_byte() call pgm->read_byte() or avr_read_byte_default().
Add avr_write_byte_default().
Have avr_write_byte() call pgm->write_byte or avr_write_byte_default().
* pgm.c: Initialize pgm->write_byte and pgm->read_byte.
* pgm.h: Add write_byte and read_byte fields to struct programmer_t.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@296 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-23 23:22:50 +00:00
Theodore A. Roth 3782460fb5 * avr.c (avr_read): Use pgm->read_sig_bytes to read signature bytes if
available.
* avr910.c (avr910_vfy_cmd_sent): New function.
(avr910_chip_erase): Add support for chip erase.
(avr910_enter_prog_mode): New function.
(avr910_leave_prog_mode): New function.
(avr910_initialize): Add code to select device type and enter prog mode.
(avr910_close): Leave programming mode before closing serial port.
(avr910_read_sig_bytes): New function.
(avr910_initpgm): Add avr910_read_sig_bytes method to pgm initializer.
* avrdude.conf.in: Add note about deprecating devicecode.
Change all occurences of devicecode to stk500_devcode.
Add avr910_devcode to a few parts for testing.
* avrpart.h (struct avrpart): Change devicecode field to stk500_devcode.
(struct avrpart): Add avr910_devcode field.
* config_gram.y: Add K_STK500_DEVCODE and K_AVR910_DEVCODE tokens.
Generate an error if devicecode is found in the config file.
Handle parsing of avr910_devcode and stk500_devcode.
* lexer.l: Handle parsing of avr910_devcode and stk500_devcode.
* pgm.c: Initialize pgm->read_sig_bytes field.
* pgm.h: Add pgm->read_sig_bytes field.
* stk500.c: Use stk500_devcode instead of devicecode.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@293 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-17 06:20:02 +00:00
Brian S. Dean 04da94efb9 Add the ability to read a per-user config file located at
$HOME/.avrduderc.  Entries from .avrduderc take precedence over those
from the system wide config file in ${PREFIX}/etc/avrdude.conf.

Track and display the config file name and line number when we print
out the available parts and programmers.  This is useful in case
someone has overridden a definition in their .avrduderc file and is
wondering why the definition in the system wide config file is not
being used.

Remove the default programmer 'stk500' from the distributed config
file.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@222 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-22 16:45:13 +00:00
Brian S. Dean ee8bf2d5fc Makefile: include a target to automatically generate the dependency
list.

All others


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@177 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-08 04:17:25 +00:00
Brian S. Dean 08e8c6e8ee Re-license using the GNU GPL. Thanks to Ted Roth for the patch.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@172 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-06 19:08:33 +00:00
Brian S. Dean 1e0c4f8756 Get rid of the verbose printing of individual file CVS version ids.
This was intended to be used for identifying code in the field for
incoming bug reports, but I've never really found it all that useful.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@171 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-06 05:45:06 +00:00
Brian S. Dean 5a8ebeb1ce The STK500 can perform paged read/write operations even on standard
"non-paged" parts.  Take advantage of that and use the faster internal
routines of the STK500 for those parts as well.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@162 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 15:05:56 +00:00
Brian S. Dean d36b48d92b Optimize reading and writing for the STK500 programmer if the part
supports paged reads and writes.  This greatly decreases the
program/verify time from about 4.5 minutes down to about 10 seconds in
a 12K program size test case.

Print out the hardware and firmware version for the STK500 if verbose
is enabled.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@161 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 06:35:18 +00:00
Brian S. Dean dcca02ebbf Add basic support for STK500.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@160 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 04:30:01 +00:00
Brian S. Dean a193330803 Seperate programmer operations out into a driver-like interface so
that programmers other than the direct parallel port connection can be
supported.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@159 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-30 14:09:12 +00:00