Commit Graph

96 Commits

Author SHA1 Message Date
Rene Liebscher 5f8a599ce5 bug #40142 Floating point exception on Ubuntu 10.04
* avr.c: avoid division by zero in report_progress(), eg. when 
  writing an empty eeprom file were total becomes 0

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1340 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-11-14 10:22:52 +00:00
Axel Wachtler c6788bd795 added verbose level in avrdude_message()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1321 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-06-13 20:07:40 +00:00
Joerg Wunsch d09bc2e1fb Join the former "public" header files (avr.h avrpart.h pindefs.h
serial.h fileio.h safemode.h update.h pgm_type.h config.h confwin.h
lists.h) into a single header that can be included by anyone wanting
to link against the library.

Adapt everything to cope with this situation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1311 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-05-19 10:01:59 +00:00
Axel Wachtler eb5fcb581f Exchange of fprintf(stderr, ...) with avrdude_message(...).
This change was made for the shared library, since library functions
should not write to std-streams directly. Instead avrdude_message()
has to be implemented by the library user. For the avrdude application
this function is implemented in main.c.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1305 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-05-18 08:41:46 +00:00
Joerg Wunsch 0b5c79ab9a Fix counting pages for the non-verify read case. Previously,
yielded 0, resulting in a division by 0 in report_progress().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1221 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-13 12:48:13 +00:00
Joerg Wunsch 9697ebe2ec bug #35456 The progress bar for STK500V2 programmer is "wrong".
* avr.c (avr_read, avr_write): Change the progress reporting for
paged read/write from per-address to per-considered-page.  This
ought to give a realistic estimation about the time still to be
spent.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1220 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-13 09:42:47 +00:00
Joerg Wunsch 8ed6920948 Remove the erase cycle counter (options -y / -Y).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1203 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 20:13:37 +00:00
Joerg Wunsch 6c78b35b8f Fix all "unused variable" warnings that were encountered.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1200 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 11:05:13 +00:00
Rene Liebscher 1f8462ca58 check more error codes, fixed some leftover parts which still used MPSSE even when using bitbanging, reduced blocksize to get a more stable behaviour of bitbanging
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1185 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-20 20:11:49 +00:00
Hannes Weisbach be385b2b48 avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This
function sets the required guard time (which is passed in as parameter),
checks the TPI identification register, writes SKEY command + SKEY, and
finally polls the NVMEN bit in TPISR.

avr.h: Add prototype definitions of avr_tpi_program_enable() and
avr_tpi_chip_erase().
avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command
and the SKEY bytes.
tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY
bytes, but in the reverse order of tpi_skey.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
Hannes Weisbach 5b7952ade8 avr.c: Add generic TPI chip erase function
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1166 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:43:47 +00:00
Hannes Weisbach bf49c4ee1f avr.c: Fix avr_tpi_poll_nvmbsy() polling returned data instead return
code

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:30 +00:00
Joerg Wunsch 147137a218 Replace outdated FSF postal address by a reference to
the GPL info on their website.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1107 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-20 14:03:50 +00:00
Joerg Wunsch b9a38193a0 Xmega page erase implementation for JTAGICEmkII
* jtagmkII.c: Handle flash pages sizes > 256 bytes, implement
page_erase() method
* avrdude.conf.in: Change flash pagesize for all Xmega devices
to 512 bytes
* avr.c: Implement auto_erase, using page_erase if available
* avr.h: Remove unused parameters from avr_read(), replace
unused parameter in avr_write)() by auto_erase
* stk500v2.c: Handle flash page sizes > 256 bytes
* update.c (do_op): Handle new updateflags parameter
* main.c: Implement auto_erase as page_erase if possible
* update.h (enum updateflags): New enum
* pgm.h (struct programmer_t): Add page_erase method



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1089 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-05-04 10:02:30 +00:00
Joerg Wunsch 0025747234 bug #30451: Accessing some Xmega memory sections gives not
supported error
* stk500v2.c: Handle all Xmega memory sections (except
"prodsig" which is not documented in AVR079)
* fileio.c: Treat the "boot", "application", and "apptable"
regions (which are actually subregions of "flash") all as
being flash, i.e. suppress trailing 0xFF bytes when reading
them
* avr.c: (Dito.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1075 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-03-29 14:32:18 +00:00
Rene Liebscher 7c85f6875e * avr.c: Unsigned variable was used for return code of paged_write/load
functions. So a negative return code led never to a fallback to byte
  functions.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1042 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-19 20:06:52 +00:00
Joerg Wunsch 833da9f117 * avr.c (avr_read, avr_write): Don't bail out on TPI parts if
their programmer doesn't provide a (low-level) cmd_tpi method;
instead, fall back to the normal programmer methods which are
supposed to handle the situation.
This fixes a regression where the recent bitbang-TPI implementation
broke TPI handling of STK600/AVRISPmkII.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1008 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 11:15:06 +00:00
Joerg Wunsch d742827da1 Mega-commit to bring in memory tagging.
Each memory image byte is now tagged as it's being read from a file.
Only bytes read from a file will be written or verified (modulo page
granularity requirements).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1007 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-14 21:49:42 +00:00
Joerg Wunsch 2465726abb bug #34027: avrdude AT90S1200 Problem (part 1 - bitbang
programmers)
* config_gram.y: Introduce new keyword "is_at90s1200".
* lexer.l: (Ditto.)
* avrdude.conf.in: Applew new keyword to the AT90S1200 device.
* avrpart.h: Introduce new flag AVRPART_IS_AT90S1200, reflecting
the is_at90s1200 configuration keyword.
* bitbang.c (bitbang_initialize): Replace existing test for
AT90S1200 by AVRPART_IS_AT90S1200
* avr.c (avr_write_byte_default): Avoid the pre-write reading for
the AT90S1200, as this appears to sometimes corrupt the high byte
by pre-programming the low byte just written into it.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1002 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-29 09:25:04 +00:00
Joerg Wunsch d74d9e647e Add Darell's email address, so it's consistent with the other authors.
Add the forgotten tpi.h file.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@978 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-24 07:40:48 +00:00
Joerg Wunsch ce3000d960 Submitted by Darell Tan:
patch #7244: TPI bitbang implementation
* bitbang.c: Add TPI bitbang stuff.
* bitbang.h: (Ditto.)
* avr.c: (Ditto.)
* avr.h: (Ditto.)
* pgm.c: (Ditto.)
* pgm.h: (Ditto.)
* serbb_posix.c: Wire bitbang_cmd_tpi into the struct pgm.
* serbb_win32.c: (Ditto.)
* par.c: (Ditto.)
* doc/avrdude.texi: Document the TPI bitbang support.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@976 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-23 21:03:36 +00:00
Joerg Wunsch 7f6c42846c Various fixes for Xmega devices.
* avrdude.conf.in: Correctly declare EEPROM page sizes for
all Xmega devices (0x20 instead of 0x100).
* avr.c: If a memory region has a page size declared, try
using the paged IO routines regardless of the target memory
name.  Xmega EEPROM requires to be written in paged mode.
Correctly use a long (rather than unsigned long) variable to
evaluate the success status of the paged mode write attempt.
* stk500v2.c: Don't apply TIF space offsets twice (bug #27995:
AVRDUDE 5.8svn fails to program and read XMEGA); use
stk500v2_loadaddr() prior to paged mode (EEPROM and flash) writes,
otherwise programming of flash areas will fail; while being there,
check the return value of stk500v2_loadaddr() everywhere; use the
correct write/erase mode bits (same as AVR Studio does).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@907 81a1dc3b-b13d-400b-aceb-764788c761c2
2010-01-12 15:42:40 +00:00
Joerg Wunsch a5f42858ea Contributed by Zoltan Laday:
patch #6825: xmega problems with JTAGICEmkII
* jtagmkII.c: Many fixes for Xmega devices.
* jtagmkII_private.h: Add various new constants required for
Xmega devices.
* avrdude.conf.in: New devices: ATXMEGA64A1, ATXMEGA192A1,
ATXMEGA256A1, ATXMEGA64A3, ATXMEGA128A3, ATXMEGA192A3,
ATXMEGA256A3, ATXMEGA256A3B, ATXMEGA16A4, ATXMEGA32A4,
ATXMEGA64A4, ATXMEGA128A4
* avr.c (avr_read, avr_write): Add more names for (Xmega)
memory areas that require paged operation.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@821 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-06-24 21:32:12 +00:00
Joerg Wunsch 5d0bfcaf4c First implementation of ATxmega support. By now, only the
PDI mode of the STK600 is supported.  Single-byte EEPROM
(and flash) updates do not work yet.
* avr.c: "boot" memory is a candidate memory region for paged
operations, besides "flash" and "eeprom".
* avrdude.conf.in: add ATxmega128A1 and ATxmega128A1revD
* avrpart.h: add the AVRPART_HAS_PDI flag (used to distinguish
ATxmega parts from classic AVRs), the nvm_base part field, and
the offset field for a memory region.
* config_gram.y: add "has_pdi", "nvm_base", and "offset"
* lexer.l: (Ditto.)
* main.c: disable auto_erase for ATxmega parts
* stk500v2.c: implement the XPROG functionality, and divert to
this for ATxmega parts
* avrdude.1: Document the changes.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@777 81a1dc3b-b13d-400b-aceb-764788c761c2
2008-07-26 22:53:40 +00:00
Joerg Wunsch d95b876d19 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 5bf9e2d9f2 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 27e16e8371 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 24990aff9c 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 76e7613841 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 946810fb81 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 afb13a9936 Replace the fallback of avr_read_byte() and avr_write_byte() to
avr_read_byte_default() and avr_write_byte_default (resp.) by directly
calling the latter functions from within all programmers that don't
implement their own read_byte()/write_byte() methods.  In turn, make the
read_byte() and write_byte() methods mandatory, and the cmd() method
(direct ISP command) optional instead (it's effectively mandatory for
any programmer using avr_read_byte_default()/avr_write_byte_default()
though).  Remove all the pointless cmd() method stubs from those programmers
that don't need it.

Eliminate avr_read_byte() as it was now completely identical to
pgm->read_byte().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@684 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:04:09 +00:00
Joerg Wunsch d9935e8562 * avrdude.conf.in: Add page mode parameters for all "eeprom" memory
definitions that are organized in pages.

* avr.c (avr_write_byte_default): Consider using the loadpage
instructions only if the respective memory is marked "paged".

Closes bug #17199: EEPROM fails verification on ATmega645 with
pony-stk200 hardware
Closes bug #16849: EEPROM write fails for AT90USB1287 with mode 0x41
Closes bug #15146: stk500v2_paged_write: loadpage instruction not
defined for part


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@622 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-22 22:05:19 +00:00
Joerg Wunsch 554fe39832 Start implementing support for ATmega256x;
jtag2 and bitbang programmers are working, stk500v2
still needs to be done.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@581 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-05-23 22:27:43 +00:00
Brian S. Dean 02f8ed3add All declarations need to be at the top of the block.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@520 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:26:54 +00:00
Brian S. Dean c941cf8ab4 This is Colin O'Flynn's mega patch for updating safemode support:
* add support for parts with just 'fuse' memory

    * if any fuse memories are altered, reflect those changes in the
      post-programming safemode check so that safemode no longer
      complains about fuses which were intentionally altered; this
      eliminates the need to completely disable safemode using -u in
      order to program fuses.

    * provide -s option which will not ask to restore fuses, it will
      just do it

Submitted by: Colin O'Flynn <coflynn@newae.com>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@519 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 00:20:32 +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 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
Jan-Hinnerk Reichert 8620dd9f11 *main.c,avr.c,avr.h,par.c,stk500.c: Add function avr_chip_erase() to unify handling of cycle-count. Makes cycle-count work for avr910-programmers
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@394 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-01-03 18:04:54 +00:00
Jan-Hinnerk Reichert 81dc6cd8d4 *avrpart.c,avr.c: Moved elementary functions on types OPCODE, AVRMEM and AVRPART from avr.c to new file avrpart.c
*avr.h: Removed prototypes for moved functions
*avrpart.h: Added prototypes for functions in avrpart.c
*Makefile.am: Added new file avrpart.c


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@388 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-30 16:42:10 +00:00
Theodore A. Roth 0b146ed206 * avr.c (avr_write_byte_default): Improve polling algorithm to speed up
programming of byte oriented parallel programmers.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@380 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-19 18:11:59 +00:00
Theodore A. Roth b76fa0fbcd * avr.c (avr_read_byte): If pgm->read_byte method fails, retry with
avr_read_byte_default.
* avr.c (avr_write_byte): If pgm->write_byte method fails, retry with
avr_write_byte_default.
* avr910.c (avr910_cmd): Implement using universal command.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@364 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-09-05 16:40:55 +00:00
Theodore A. Roth 71536a7097 * avr.c:
* avr.h:
* avr910.c:
* main.c:
* stk500.c:
New progress reporting implementation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@337 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-07-29 22:08:21 +00:00
Brian S. Dean b09107e9af Optimize flash memory handling a little bit by ignoring 0xff data that
resides above the last non-0xff data value in the address space.  Only
do this for flash memory since writing a 0xff to flash is a no-op.
This has the affect of creating smaller output files when dumping
memory contents from flash if the program in flash does not consume
the whole memory space.  It also results in shorter programming times
when avrdude is asked to load a file into flash that has lots of 0xff
filled data past the last non-0xff data value.

I think this is basically where Alexey was going with his s-record
routine, but this should have a similar affect for all the I/O
routines.  The main difference is that Alexey's also optimized 0xff
from the beginning of the address space and was not limited to flash.

I think that these optimizations should be limited to the flash since
it is currently the only memory that treats 0xff as special.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@331 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-05-22 02:33:17 +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 db1fd5124e 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
Brian S. Dean a61708b2b9 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
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 8ba95cd0c3 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