Commit Graph

29 Commits

Author SHA1 Message Date
troth 58f2a417cb * 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
troth 746f6f4421 * Makefile.am (avrdude_SOURCES): Add avr910.[ch], serial.h and
ser_posix.c files.
* avr910.c: New file (stubs for avr910 serial programmer).
* avr910.h: New file.
* ser_posix.c: New file.
* ser_win32.c: New file (just stubs for now).
* serial.h: New file.
* stk500.c: Move all the code for accessing the posix serial ports
into ser_posix. This will make a native win32 port easier and allows
the avr910 programmer to share the serial code.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@289 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-13 03:52:19 +00:00
bdean b128964e9b Disable debugging printf.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@276 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-10 22:58:21 +00:00
bdean 43417206df Make the page size used for non-paged parts for the 'paged_write'
command be 128 bytes.  This cuts 6 seconds off the programming time
for uploading a 6K file into an AT90S8515 vs the time loading the same
file using a 16 byte buffer, and the response feedback is still good.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@261 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 04:37:09 +00:00
bdean 86dbad54c5 Fix stk500 page write (Program Page command). This is supported after
all on non-paged-memory parts.  The problem was that the page size was
defaulting to 256 (maximum for the stk500), but the timeout for a
response from the stk500 before declaring it dead was only 0.5
seconds.  But it takes much longer than 0.5 seconds to program 256
bytes, so we just weren't waiting long enough.

Fix this in two ways - increase the timeout to 5 seconds, and decrease
the page size to 16 bytes for non-paged parts.  The programming time
for 16 bytes is short enough to provide the user with some feedback
that something is happening.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@260 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 04:30:20 +00:00
bdean 6e9bdf2a6e Don't call the programmer's 'paged_write' routine unless the memory
itself is paged as it doesn't appear to work otherwise.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@259 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 02:35:50 +00:00
bdean 4f9b61168c Don't try to set extended device programming parameters if they
haven't been specified in the config file for the part.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@250 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-04 14:33:19 +00:00
bdean 5a60659d9e Set extended device parameters for all firmware versions.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@249 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-04 02:11:41 +00:00
bdean e6c66498fa First attempt at supporting STK500 firmware past 1.10. Thanks to
Jason Kyle for the needed protocol information.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@248 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-04 02:03:11 +00:00
bdean 2367f41d5f Add the ability to specify which pin to pulse when retrying entry into
programming mode.  Use 'retry_pulse' in the per-part specification
that can currently take values of 'reset' or 'sck', the default being
'sck' which preserves the previous behaviour.  Some newer parts
indicate that /RESET should be pulsed, while older parts say to pulse
SCK.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@212 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-21 17:24:47 +00:00
bdean 5c554ef79d Fix pseudo/full parallel mode selection logic.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@210 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-20 19:50:32 +00:00
bdean 36195d4655 Add 'serial' and 'parallel' keywords to the grammar so that one can
say whether parts support these programming modes or not.  Possible
values for 'serial' are 'yes' or 'no'.  Possible values for 'parallel'
are 'yes', 'no', or 'pseudo'.  Add a bit mask of flags to the AVRPART
structure to capture these settings.  Use these within
stk500_initialize() to set the device parameters correctly.

Defaults for 'serial' and 'parallel' are 'yes' unless specified
otherwise.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@208 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-20 19:46:23 +00:00
arcanum 770e3b55c2 Add error message for fail to enter programming mode. Fix typos.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@203 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-20 18:09:57 +00:00
troth 1997cc5188 These changes add basic support for a autoconf/automake based build system.
* .cvsignore: Ignore autoconf files.
	* AUTHORS: New file.
	* ChangeLog: New file.
	* Makefile: Removed file.
	* Makefile.am: New file.
	* NEWS: New file.
	* README: New file.
	* bootstrap: New file.
	* configure.ac: New file.
	* avr.c: Include ac_cfg.h (generated by autoconf).
	* config.c: Include ac_cfg.h.
	Include config_gram.h instead of y.tab.h.
	* config.h: If HAS_YYSTYPE is not defined, define YYSTYPE.
	* config_gram.y: Include ac_cfg.h.
	* fileio.c: Include ac_cfg.h.
	* lexer.l: Include config_gram.h instead of y.tab.h.
	* lists.c: Include ac_cfg.h.
	* main.c: Include ac_cfg.h.
	* par.c: Include ac_cfg.h.
	* pgm.c: Include ac_cfg.h.
	* ppi.c: Include ac_cfg.h.
	* stk500.c: Include ac_cfg.h.
	* term.c: Include ac_cfg.h.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@192 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-14 20:34:03 +00:00
bdean c5d9b556ea Fix typos. Fix error messages.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@191 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-14 04:09:50 +00:00
bdean dca2176204 Split higher level parallel port programmer code off from ppi.c into
its own file par.c, leaving low level parallel port accessor routines
in ppi.c to help with portability.  Change the programmer type to
'PAR' now instead of 'PPI' - 'PAR' represents the parallel port
programmer type.

Be more liberal with 'static' function declarations within the
programmer implimentation files - these functions should never be
called directly - always use the programmer function references.

There are still a few places in 'main.c' that directly reference the
parallel programmer explicitly (par_getpinmask).  These should be
fixed somehow.

Axe a few unused functions.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@190 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-13 19:27:50 +00:00
troth 0d58d31f3a Remove need for inttypes.h.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@188 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-12 17:47:47 +00:00
troth 3176513162 * linux_ppdev.h: New file.
* ppi.c: Include system dependant parallel port interface file.
(ppi_open): Add call to ppi_claim().
(ppi_close): Add call to ppi_release().
* ppi.h: Define ppi_claim() and ppi_release() as NOPs if not previously
    defined.
* stk500.c: Include inttypes header to quell compiler warning.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@184 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-11 23:50:31 +00:00
joerg_wunsch 6e82f6ee9c Fix some implicit declaration warnings.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@183 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-11 21:58:07 +00:00
bsd 2c651eb7bf 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
bsd b7c08f5901 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
bsd f983234f46 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
bsd c1bcfe53a7 Change the name from AVRPROG to AVRDUDE.
This change represents a name change only.  There is currently an
effort to port AVRPROG to other platforms including Linux and Windows.
Since Atmel's programmer binary that's included within their AVR
Studio software is named AVRPROG.EXE on the Windows OS, there is the
chance for confusion if we keep calling this program AVRPROG as well.
Up until now the name hasn't really been a problem since there was no
chance to confuse 'avrprog' on Unix with Atmel's AVRPROG because
Atmel's tools only run on Windows.  But with the Unix 'avrprog'
possibly being ported to Windows, I felt a name change was the best
way to avoid problems.

So - from this point forward, my FreeBSD Unix program formerly known
as AVRPROG will subsequently be known as AVRDUDE (AVR Downloader/UploaDEr).

This change also represents a time when the AVRDUDE sources move from
my own private repository to a public repository.  This will give
other developers a chance to port AVRDUDE to other platforms and
extend its functionality to support additional programming hardware,
etc.

So goodbye AVRPROG, welcome AVRDUDE!


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@170 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-06 05:13:32 +00:00
bsd 9bb4ed7d28 Remove unused code.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@165 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 20:10:12 +00:00
bsd 992ffd6758 Document changes since the previous version in the CHANGELOG.
Cleanup stk500.c a bit.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@164 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 20:09:38 +00:00
bsd b2c1b19017 Fix cut and paste braino.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@163 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 15:10:23 +00:00
bsd e722fbc587 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
bsd b3cc1535b6 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
bsd da6e6490a4 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