Commit Graph

111 Commits

Author SHA1 Message Date
c_oflynn c3f6c7e21c 2006-02-27 Colin O'Flynn <coflynn@newae.com>
Contributed by Wim Lewis, add support for checking device
        signatures in detail (patch #4924 and #4925)
    * avrdude.conf.in: Add signatures
    * avrpart.c: Set default signature
    * avrpart.h: Variable for signature
    * config_gram.y: More signature reading
    * lexer.l: Define that signatures exist
    * main.c: Read signatures and check them against hardware


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@573 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-02-27 17:18:42 +00:00
c_oflynn c1bd17edb2 * main.c, stk500v2.c: Added patch 4804 from eolson@mit.edu
Which stops sck from being writtend needlessly


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@568 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-01-17 21:11:39 +00:00
c_oflynn d0bd1ae69f Colin O'Flynn <coflynn@newae.com>
* main.c: Fixed a typo in safemode variable names, fixed bug 15113


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@566 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-01-17 20:17:43 +00:00
joerg_wunsch 5564934a4e Make avrdude Solaris-compatible.
* Makefile.am: distclean avrdude.conf.
* avrdude.conf.in: make the parallel-port programmers optional.
* bitbang.c: move the bitbang features out into PROGRAMMER.
* configure.ac: introduce --enable-parport, add Solaris.
* lexer.l: replace str by strng to work around problems in some
versions of flex.
* main.c: move getexitspecs into the respective programmer's
domain; replace rindex by the C-standard strrchr.
* par.c: make parallel port optional.
* par.h: everything but par_initpgm() is private now.
* pgm.h: add setping/getping/highpulsepin/getexitspecs.
* serbb_posix.c: generalize bitbang interface; replace
cfmakeraw() by explicit code.
* serbb_win32.c: generalize bitbang interface.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@539 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-01 23:02:06 +00:00
joerg_wunsch dfbfb64e5f * main.c(do_op): use mem->desc in place of upd->memtype to
give the full name of the respective memory area, instead of
the (possibly abbreviated) name the user typed in the -U option.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@529 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-22 14:14:14 +00:00
joerg_wunsch 21a6c44ee3 Add the forgotten -B option (JTAG bit clock) to the getopt() option
string.  Actually evaluate that number as microseconds then, as the
documentation used to state already.

While being there, re-sort the -s option into alphabetical order.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@527 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 15:02:02 +00:00
bdean d53e6d7b25 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
bdean 461ffc9d80 Implement -q -q to be very very quiet.
Submitted by: andyw@pobox.com


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@503 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:52:42 +00:00
bdean c844bd1236 Don't call exit() directly here - set the exit value and jump to the
main_exit: label to ensure the programmer is released correctly.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@483 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-07-26 04:13:34 +00:00
bdean c37cefab01 Update version and copyright message.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@467 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-14 14:56:00 +00:00
bdean e457898255 Change the default port to 'serial' for the newly added serial
programmers stk500v2 and jtagmkii.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@466 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-14 14:49:39 +00:00
joerg_wunsch b49dc8f645 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
bdean 1041ecd45e Exit non-zero if safe-mode reverts fuse bits that were requested on
the command-line.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@450 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-02-11 19:03:53 +00:00
bdean 5a7b9e59b6 Variable declarations must only appear at the beginning of a block.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@449 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-02-10 18:37:37 +00:00
bdean b5f3b84182 Style police: white space only change; consistent indentation, wrap
long lines to < 80 columns.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@447 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-02-10 16:34:55 +00:00
arcanum 3428a9985f Add Safe Mode. Fuse settings will be restored at the end of a programming session unless the -u switch is specified.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@440 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-01-24 21:26:11 +00:00
bdean bbc5d1e0c3 Replace my e-mail address with my url when displaying copyright
information.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@439 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-12-22 02:06:13 +00:00
bdean e4f8608da4 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
troth 7a19068063 * main.c (main): Don't indent CPP directives.
When showing update progress in a no tty situation, use unbuffered IO
for all systems, not just win32 native.
Update copyright year when printing version.
Remove warning about native win32 being experimental.
Split a line string.
* ppiwin.c: Update copyright year.
Add cvs Id keyword.
(usleep): Cleanup debug CPP directives to improve readability.
* ser_win32.c: Include <stdio.h> to fix failing build.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@430 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-07-15 17:29:35 +00:00
hinni 10272c5a55 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 7f67edcce0 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
bdean 518ff9d2f8 Allow the baud rate to be specified on the command line with a new -b
switch.  The specified baud rate will override the default serial port
baud rate for a particular programmer.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@416 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-05-19 23:00:38 +00:00
hinni 34c5ee9f0d * main.c: Removed deprecated options.
* doc/TODO: Still need to remove these options from documentation


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@410 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-02-09 23:43:42 +00:00
hinni 3ee1be5529 * 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
hinni 2a725d152f *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
hinni cdd82f5dfc *avrpart.c,main.c: Moved list_parts() and locate_part() from main.c to avrpart.c
*avrpart.h: Added prototypes for list_parts() and locate_part()


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@389 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-30 16:49:00 +00:00
joerg_wunsch 9dd5e43b20 Make the -U parser tolerate colons in filenames.
Document the change, including changing one of the texinfo examples
to use a Windows-like filename that contains a space (and thus
requires quoting).

This fixes bug #6764.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@386 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-26 22:05:02 +00:00
bdean 0b71c0672c Revert to honoring the return code from pgm->pgm_enable() within the
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
2003-08-31 15:40:59 +00:00
bdean 776104ea0c Perform an auto erase before programming if the flash memory is
anywhere specified to be written by any of the -U requests.

To remain backward compatible with previous versions, disable this
feature if any of the old-style memory specification operations are
specified (-i, -o).

Implement the -D option to explicitly disable the auto erase default.

Deprecate the old-style memory specification options (-f, -i, -I, -m,
and -o) in favor of the new -U option which allows one to operate on
multiple memories on a single command line.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@356 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-29 23:17:32 +00:00
bdean 1de16c56ed Declare size and vsize as 'int'. These represent the size of the AVR
memory read or written (or up to where continuous 0xff begins in the
case of flash memory).  An 'int' should be plenty big enough for that.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@354 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-29 00:14:22 +00:00
arcanum 51a3d56245 * avr910.c:
* fileio.c:
    * main.c:
    * stk500.c:
    More code cleanup to remove warnings.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@352 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-28 23:02:25 +00:00
bdean 386f8f19db Fix placement of local variable - variables must be declared before
any statements within a block.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@349 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-28 13:52:52 +00:00
troth 1abe56733f * main.c (update_progress_no_tty): Properly terminate progress. Also
fixes stk500 problem where number of bytes written is less than a page.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@348 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-28 05:37:57 +00:00
arcanum c9a242e254 * fileio.c:
* main.c:
    * ppiwin.c:
    * ser_posix.c:
    * stk500.c:
    Minor code cleanup to remove warnings.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@346 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-25 15:55:48 +00:00
bdean 6183fc22a2 Remove debugging printf.
Update manual to reflect the new -U option.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@342 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-24 18:05:46 +00:00
bdean eecf43999d Introduce a new option, -U, for performing memory operions. Its
argument is a 4 field string (fields seperated by colons) which
indicate what memory type to operate on, what operation to perform is
(read, write, or verify), the filename to read from, write to, or
verify against, and an optional file format field.  Multple -U options
can be specified to operate on more than one memory at a time with a
single invocation.  For example, to update both the flash and the
eeprom at the same time one can now specify the following:

	avrdude -p -e -U flash:w:main.hex:i -U eeprom:w:eeprom.hex:i


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@341 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-08-21 04:52:36 +00:00
bdean d6287689c1 Add elapsed time information to the new progress bar.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@338 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-07-30 23:01:52 +00:00
troth 5bf7290268 * 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
bdean a44054650f fileio.c : Remove superfluous assignment of 'fname'.
main.c : print out '<stdin>' and '<stdout>' instead of '-' when using
         stdio for I/O.

Thanks to Francisco T. A. Silva <ftas@geodigitus.com.br> for catching
this, and the error fixed by the previous commit as well.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@325 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-05-07 22:13:46 +00:00
bdean 98d1f804ae unbreak '-i' option argument
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@320 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-04-19 23:31:51 +00:00
bdean fa3d83df02 Add a shortcut option, '-I' which is the same as '-i' but defaults the
file format type to 'immediate mode' where the filename is assumed to
be the memory data itself.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@318 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-04-19 23:06:01 +00:00
bdean 7007ab14ba Implement and "immediate mode" for file input - this allows one to
specify byte values on the command line instead of via a file.  This
can be good for specifying fuse bytes and eliminates the need to
create single-byte files or using interactive terminal mode for these
single-byte memories.  Requested by several folks on the mailing list.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@317 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-04-19 18:41:35 +00:00
troth ae3f4e852f * avrdude.conf.in: Add avr910 and pavr programmers.
* config_gram.y: Add parsing of avr910 programmer.
* lexer.l: Add avr910 token.
* avr910.c: [this is still work in progress]
Add some debug output.
Add probe for programmer presense.
* main.c: Set port to default_serial if programmer type is avr910.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@292 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-16 18:19:37 +00:00
bdean ee96643119 Get rid of a debugging printf.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@280 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-12 00:06:45 +00:00
arcanum 1b9666eff4 Change software version from hardcoded value to getting it from the configuration.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@269 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-06 19:18:40 +00:00
bdean 02aa33e2a4 Check the programmer type against 'STK500' instead of the programmer
name when checking to see if we should default to the default_serial
port instead of the default_parallel port.  This has us do the right
thing for the new 'avrisp' programmer.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@262 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 04:57:03 +00:00
bdean 174397969c Print out a list of valid parts for '-p ?' and a list of valid
programmers for '-c ?'.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@254 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 00:53:49 +00:00
arcanum aac7d66784 Integrate Windows search of config files.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@231 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-24 23:13:55 +00:00
arcanum 1ff068469e Usage back to stderr.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@224 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-24 17:27:38 +00:00
bdean 66d2a710db 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