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
than memory device size.
(stk500_paged_write): Send whole block at once.
(stk500_paged_load): Limit blocks read to no bigger than memory
device size.
[Contributed by Bill Somerville <bill@classdesign.com>, this fixes
bug #5713.]
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@376 81a1dc3b-b13d-400b-aceb-764788c761c2
stk500 initialization routine. However, allow one to use the -F
option to ignore a bad return code from that function. I think this
still allows what Joerg intended, i.e., providing a way to still get
into terminal mode so that one can recover from setting bad STK500
values which may keep the chip from entering programming mode.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@359 81a1dc3b-b13d-400b-aceb-764788c761c2
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
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
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
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
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
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
Jason Kyle for the needed protocol information.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@248 81a1dc3b-b13d-400b-aceb-764788c761c2
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
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
* .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
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
* 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
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
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
"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
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