Commit Graph

442 Commits

Author SHA1 Message Date
Brian S. Dean 94f22b15ee 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@162 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 15:05:56 +00:00
Brian S. Dean 8368f8317b 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@161 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 06:35:18 +00:00
Brian S. Dean ef2d595660 Add basic support for STK500.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@160 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-12-01 04:30:01 +00:00
Brian S. Dean 71a439397a 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@159 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-30 14:09:12 +00:00
Brian S. Dean 07c1849557 term.c - when in interactive terminal mode and dumping memory using
the 'dump <memtype>' command without any address information,
         and the end of memory is reached, wrap back around to zero on
         the next invocation.

CHANGELOG - describe changes

main.c - update version number


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@157 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-23 00:52:15 +00:00
Brian S. Dean 6f8adf7abc When getting ready to initiate communications with the AVR device,
first pull /RESET low for a short period of time before enabling the
buffer chip.  This sequence allows the AVR to be reset before the
buffer is enabled to avoid a short period of time where the AVR may be
driving the programming lines at the same time the programmer tries
to.  Of course, if a buffer is being used, then the /RESET line from
the programmer needs to be directly connected to the AVR /RESET line
and not via the buffer chip.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@156 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-23 00:47:29 +00:00
Brian S. Dean 2fa7a7c110 Update changelog.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@154 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-06 02:23:27 +00:00
Brian S. Dean 648d06f7ed Fix -Y option. Reported by Joerg Wunsch.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@153 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-06 02:19:57 +00:00
Brian S. Dean 98c0c7d4f4 Version update and CHANGELOG entry.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@151 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-01 14:46:20 +00:00
Brian S. Dean 7b11e0829d Be backward compatible with the 2-byte rewrite cycle counter which
appeared in version 2.1.0, but was changed to a 4 byte counter in
version 2.1.1.  Reminded by Joerg Wunsch.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@150 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-01 14:40:23 +00:00
Brian S. Dean c5a313abe3 Add '-V' (no verify) flag requested by Joerg Wunsch. Update the man
page.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@148 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-29 01:59:02 +00:00
Brian S. Dean de9b1ec6c9 Update man page and changelog.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@147 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-13 04:22:59 +00:00
Brian S. Dean 912ba29aef Update version number.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@146 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-13 04:19:39 +00:00
Brian S. Dean 20d682437b Remove --pedantic and -g from the compiler options.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@145 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-12 21:22:57 +00:00
Brian S. Dean dee4126fde Use a four byte value instead of a two byte value for the programming
cycle count stored at the end of EEPROM.  It seems as though Atmel was
greatly conservative in claiming a 1000 count reliability for the
FLASH.  I current have a part that has been reprogrammed 173330 times,
and counting.

Fix a compiler warning.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@144 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-11 19:36:56 +00:00
Brian S. Dean cba33d4b0f Fix ATMega128 instruction encoding for reading the low and high fuse
bits.  Thanks to Joerg Wunsch for tripping over this.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@143 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-11 19:32:12 +00:00
Brian S. Dean 5e3500045e Move erase-rewrite cycle increment to within the chip erase routine so
that it is tracked no matter where the erase was initiated: command
line mode or interactive mode, without code duplicaiton.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@141 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-08-01 02:06:48 +00:00
Brian S. Dean 3c5d46bdd1 Recent updates.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@140 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-08-01 01:06:54 +00:00
Brian S. Dean 85a69d3c06 Eliminate unused variables.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@139 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-08-01 01:01:17 +00:00
Brian S. Dean c7a17e849a Implement a way of tracking how many erase-rewrite cycles a part has
undergone.  This utilizes the last two bytes of EEPROM to maintain a
counter that is incremented each time the part is erased.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@138 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-08-01 01:00:03 +00:00
Brian S. Dean 777d96086a Fix a typo in a comment. Display the size of memory being written.
Display the correct memory name in an error message (previously
hardcoded).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@137 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-07-27 20:55:01 +00:00
Brian S. Dean dab67ba9c7 Add support for ATtiny15 - contributed by Asher Hoskins
<asher@crumbly.freeserve.co.uk>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@135 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-06-22 14:03:53 +00:00
Brian S. Dean 547be2d3ea Say what changed.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@133 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-04-23 22:18:06 +00:00
Brian S. Dean 58f44a5a26 Backup the config file to a timestamped name to keep from possibly
overwriting user-modified configs.

Add read/write instructions for all memory types for ATMEGA103,
ATMEGA128, ATMEGA16, and ATMEGA8.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@132 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-04-07 16:03:58 +00:00
Brian S. Dean 23e7383463 Add support for ATMEGA128; untested; requested by Jeff Gardner
<gardner@journey.com>.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@131 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-04-05 22:41:38 +00:00
Brian S. Dean c56b398291 Minor ordering.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@129 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-15 02:06:58 +00:00
Brian S. Dean 9057207b15 Update version numbers.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@128 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-15 02:05:19 +00:00
Brian S. Dean 6a1fb41b25 Summarize latest updates.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@127 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 03:19:45 +00:00
Brian S. Dean 98aec751d3 Make pwroff_after_write a yes/no field instead of a numeric.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@126 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 03:04:22 +00:00
Brian S. Dean ad097bee72 Document the pwroff_after_write flag.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@125 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 02:59:39 +00:00
Brian S. Dean 6f3f17ff0c Enable the extra part verbosity when verbosity >= 3.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@124 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 02:50:58 +00:00
Brian S. Dean 333d246562 Fix error reporting by avr_write_byte().
Fix setting of status LEDs under various write-fail conditions.

Add a flag to indicate that a memory type requires the device to
possibly be powered off and back on after a write to it.  This is due
to a hardware problem on some Atmel devices, see:

	http://www.atmel.com/atmel/acrobat/doc1280.pdf

Add greater verbosity to the part-display code when verbose>1 to
display avrprog's encoding of the defined programming instructions.
This is primarily for debugging purposes.


Part updates:

  * add the AT90S4414 part

  * add fuse and lock bit access instructions for the AT90S1200,
    AT90S4434, and AT90S8515.

  * add the pwroff_after_write flag to the fuse bits for the AT90S2333
    and AT90S4433 parts


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@123 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 02:48:07 +00:00
Brian S. Dean e4790aa020 Updates to the 2333 and 4433 parts, contributed by Joerg Wunsh.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@122 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-09 21:53:51 +00:00
Brian S. Dean 359a9bc85b Add changelog.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@121 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-18 02:46:06 +00:00
Brian S. Dean f1e5441b9c Add (c) to copyright.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@120 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-12 02:04:33 +00:00
Brian S. Dean 623f4c9618 Update version number. Update copyright.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@118 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-12 01:51:35 +00:00
Brian S. Dean bcf8b3782c Update copyright and add description of "default".
Submitted by: Joerg Wunsch <j@uriah.heep.sax.de>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@117 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-12 01:31:01 +00:00
Brian S. Dean 5952e5dee9 Fix programming of write-only memories (such as lock bits on the
2313).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@116 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-12 01:26:09 +00:00
Brian S. Dean 74634b1ee4 Update version.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@114 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:19:57 +00:00
Brian S. Dean 215d554be2 Clarify a comment.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@113 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:12:23 +00:00
Brian S. Dean c24a746989 fix address bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@112 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:07:29 +00:00
Brian S. Dean 6ecc07d2b7 Bring up to date.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@111 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:04:52 +00:00
Brian S. Dean c5992e0b3d Add the AVR3 progammer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@110 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-29 21:47:05 +00:00
Brian S. Dean a4204f236f Fix VCC assertion.
Make the BUFF pin a mask like VCC to allow multiple pins to be
asserted at the same time (STK200 has two buffer enable lines).

Add the STK200 programmer.

Fix EEPROM address line selection for several parts.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@109 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-29 21:37:20 +00:00
Brian S. Dean d52f6630a5 fix spelling error
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@107 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-15 22:17:46 +00:00
Brian S. Dean d18c2c2cd0 Change "WARNING" to "NOTE" when overwriting the avrprog.conf file.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@106 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-24 01:48:59 +00:00
Brian S. Dean 9592cb6194 Add my e-mail address.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@105 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-24 01:47:10 +00:00
Brian S. Dean d42b213342 Add comments about instruction formats. Correct an instruction
specification (cut&paste error).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@104 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-24 01:44:06 +00:00
Brian S. Dean 5851770d13 In interactive mode, reset the address and length if we start dumping
a memory type different than the previous one.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@103 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 18:54:11 +00:00
Brian S. Dean a495fc6417 Allow instruction data to be specified more flexibly, which can be
used to make the instruction input more readable in the config file.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@102 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 05:50:59 +00:00
Brian S. Dean fcc065f5aa Bump version number.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@101 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 02:47:59 +00:00
Brian S. Dean 3c1dcf6119 This is a jajor re-write of the programming algorithms. The Atmel
serial programming instructions are not very orthoganal, i.e., the
"read fuse bits" instruction on an ATMega103 is an entirely different
opcode and data format from the _same_ instruction for an ATMega163!
Thus, it becomes impossible to have a single instruction encoding
(varying the data) across the chip lines.

This set of changes allows and requires instruction encodings to be
defined on a per-part basis within the configuration file.  Hopefully
I've defined the encoding scheme in a general enough way so it is
useful in describing the instruction formats for yet-to-be invented
Atmel chips.  I've tried hard to make it match very closely with the
specification in Atmel's data sheets for their parts.  It's a little
more verbose than what I initially hoped for, but I've tried to keep
it as concise as I could, while still remaining reasonably flexible.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@100 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 02:46:55 +00:00
Brian S. Dean 18908eccc2 Add support for ATMega163.
Add support for reading/writing ATMega163 lock and fuse bits.
Unfortunately, in looking at the specs for other ATMega parts, they
use entirely different instruction formats for these commands.  Thus,
these routines won't work for the ATMega103, for example.

Add support for sending raw command bytes via the interactive terminal
interface.  This allows one to execute any programming instruction on
the target device, whether or not avrprog supports it explicitly or
not.  Thus, one can use this feature to program fuse / lock bits, or
access any other feature of a current or future device that avrprog
does not know how to do.

Add in comments, an experimental instruction format in the
configuration file.  If this works out, it would allow supporting new
parts and non-orthoganal instructions across existing parts without
making avrprog code changes.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@99 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-19 17:44:24 +00:00
Brian S. Dean b9d8d845da Add ATMEGA163 part.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@98 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-17 20:48:17 +00:00
Brian S. Dean f517945e6e output formatting
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@97 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-11 01:58:21 +00:00
Brian S. Dean 9812c223ed Get ppi.h from /usr/include, not /sys.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@96 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-05 01:41:08 +00:00
Brian S. Dean 7e7c14e638 Correct version string.
Update read/write status more frequently.
Prefix ATMega parts with an 'm'.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@95 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-31 02:18:08 +00:00
Brian S. Dean 1df789a051 Change ording for memory display.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@93 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 23:46:59 +00:00
Brian S. Dean 3932edf5c2 comment
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@92 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 23:34:07 +00:00
Brian S. Dean 216ed6b0f7 Fix (again, hopefully) page addressing for the ATMega parts.
Rename the poorly chosen name "bank" to "page" for page addressing.
Atmel calls it "page" in their documentation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@91 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 23:32:30 +00:00
Brian S. Dean eef6b701c9 Fix an (non)exit.
Silence a couple of compiler warnings.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@89 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 02:50:27 +00:00
Brian S. Dean fdd9e0f4bc Fix ATMega flash addressing. Add an ATMEGA16 part. Perform sanity
checking on the memory parameters for parts that do bank addressing.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@88 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 02:47:55 +00:00
Brian S. Dean 7b039ccd6c Add copyright.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@86 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 02:49:10 +00:00
Brian S. Dean 28076baf46 Add copyrights.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@85 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 02:46:59 +00:00
Brian S. Dean a7786a1a55 Attempt to install avrprog.conf.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@83 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:28:23 +00:00
Brian S. Dean a0ea22aee7 Correct dt006 pinout.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@82 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:16:12 +00:00
Brian S. Dean 9048a30982 Try and detect an old-style config file and print an appropriate error
message and a suggestion for correcting it.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@81 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:11:56 +00:00
Brian S. Dean e88ba65e10 Update the man page.
Miscellaneous minor cleanups.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@80 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:00:09 +00:00
Brian S. Dean 842d2d798a Use lex/yacc for parsing the config file. Re-work the config file
format using a more human-readable format.

Read part descriptions from the config file now instead of hard-coding
them.

Update usage().

Cleanup unused code.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@79 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-14 23:17:26 +00:00
Brian S. Dean 799081f34c First cut at supporting the ATmega 103 which uses bank addressing and
has a 128K flash.

Due to the bank addressing required, interactive update of the flash
is not supported, though the eeprom can be updated interactively.
Both memories can be programmed via non-interactive mode.

Intel Hex Record type '04' is now generated as required for outputing
memory contents that go beyond 64K.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@78 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-14 02:53:21 +00:00
Brian S. Dean ae8da8be39 Style fixes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@77 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-13 03:13:13 +00:00
Brian S. Dean f6ecd737f2 Commit changes in preparation for support the ATMega line.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@76 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-13 03:12:52 +00:00
Brian S. Dean 1be8f106f9 Don't override CFLAGS.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@74 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-01 16:58:03 +00:00
Brian S. Dean 5c621a1c18 Correct default pin assignment.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@73 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-01 14:16:41 +00:00
Brian S. Dean 2751b4c9f1 Remove debugging code - it served its purpose.
Update copyrights.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@72 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-01 14:04:46 +00:00
Brian S. Dean 9bf7daebda Be sure to read the exit specs after the pin configuration has been
assigned, otherwise, we may apply the exit specs to the wrong pins.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@71 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-21 03:27:20 +00:00
Brian S. Dean cb5dc43be2 debugging
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@70 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-21 02:57:58 +00:00
Brian S. Dean a5ddfc0b6b Prefix pin config entries in the config file with a "c:". Later, I
might make part descriptions read in this way and we can use a
different letter for those (p).  This will make the parsing easier to
distinguish between the entry types.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@69 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-20 03:19:31 +00:00
Brian S. Dean ead4cc7e17 Initialize pin configuration description.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@68 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-20 00:43:08 +00:00
Brian S. Dean 6981b65d59 Make the pin definitions configurable based on entries in a config
file.  This makes supporting other programmers much easier.

Rename AVRprog.pdf to avrprog.pdf.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@67 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-19 17:04:25 +00:00
Brian S. Dean e87b062769 Remove this image file from the repository.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@66 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-04-29 14:23:20 +00:00
Brian S. Dean 7245810e40 Remove this image, use AVRprog.pdf as the preferred schematic for the
programmer.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@65 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-04-26 00:51:06 +00:00
Brian S. Dean 7c72f57373 Add a schematic provided by Joerg Wunch and also update the manual
page (also updated by Joerg) to reference the schematic.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@63 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-04-25 22:35:14 +00:00
Brian S. Dean d7345c439f Automate dependency generation.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@62 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-02-25 17:39:58 +00:00
Brian S. Dean 4507e46dd9 Turn off ready led when finished programming.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@61 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-02-08 01:42:09 +00:00
Brian S. Dean 3ac7d00941 update version
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@60 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-02-08 01:22:18 +00:00
Brian S. Dean 573110d04d Correct a few comments.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@59 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-02-08 01:08:30 +00:00
Brian S. Dean 2e8dcc0f9e Makefile : update dependencies
avr.c : correct status led updates

term.c : update status leds on write, make the address and length
         arguments for dump optional.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@58 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-02-08 01:05:05 +00:00
Brian S. Dean b039ab74eb Version 1.1
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@57 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 21:18:40 +00:00
Brian S. Dean 610cc80b42 Hmmm ... cvs co -D <timestamp> does not work. Change the revision
timestamp to a full date/time value.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@56 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 20:45:05 +00:00
Brian S. Dean 706950bea8 Add a -V option to display the version information about each
component module.  This is intended for support purposes, so that I
can tell unambiguously what version a binary out in the field is.

Additionally, display a revision timestamp along with the version
number.  This also is intended for aiding in support and is the Unix
time of the latest component module.  Having this, should allow me to
do a "cvs co -D timestamp avrprog" and get exactly the source of the
version that is being reported.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@55 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 20:34:08 +00:00
Brian S. Dean 2c231c04cb Return the maximum address (+1) written as opposed to the actual number of
bytes written.  The presence of an Intel Hex address record can cause
these two number to be different; but the callers of this routine need
the former.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@54 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:47:33 +00:00
Brian S. Dean ec5597ec92 Fix a place where we were exiting without applying the exit-specs.
Wrap a long line.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@53 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:25:45 +00:00
Brian S. Dean 616921e905 avr.c: Update a comment.
fileio.c: Properly handle all the Intel Hex record types that I can
          find information about.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@52 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:22:40 +00:00
Brian S. Dean 87e20f7e9e Get rid of the Usage file.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@51 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-25 16:24:08 +00:00
Brian S. Dean 199e2ec125 Move pin definitions to their own file.
First pass at providing feedback via the optionally connected leds.  I
don't actually have any of these attached to my programmer, so I can
only guess as whether this is toggling them on and off correctly.

Also, enable and disable the optional 74367 buffer.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@50 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-24 19:10:34 +00:00
Brian S. Dean 21f22d2657 Rearrange the pinout for the programmer to be a little more logical.
Provide hooks to support a buffered programmer, pin 6 is now used to
enable a buffer that can be used to isolate the target system from the
parallel port pins.  This is important when programming the target
in-system.

Totally change the way the pin definitions are defined.  Actually
set/clear pins based on the way more intuitive pin number, instead of
PPI data register, bit number combination.  A table of pin data is
used so that any hardware inversion done by the parallel port is
accounted for, what you set is actually what appears at the pin.
Retain the old method for handling Vcc, however, because the hold
method is much easier to use when setting / retrieving multiple pins
simultaneously.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@49 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-24 18:45:58 +00:00
Brian S. Dean 56f12581a5 Don't gzip the man page.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@48 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 14:32:23 +00:00
Brian S. Dean f3207251a8 .Nm macro fix. Submitted by Joerg.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@47 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 14:29:37 +00:00
Brian S. Dean 2c64c80778 Cosmetic, don't output a preceding linefeed for usage().
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@46 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 02:12:12 +00:00
Brian S. Dean 7d7ce8cb11 Makefile : use gzip -f for man page installation so that we don't get
prompted.

avr.c avr.h fileio.c term.c :

     Change the avrpart data structure so that the typedef AVRMEM is
     used as an index into an array for the sizes of the memory types
     and also for pointers to buffers that represent the chip data for
     that memory type.  This removes a lot of conditional code of the
     form:

		switch (memtype) {
			case AVR_FLASH :
		 	...
		}

     Also, re-code avr_read_byte() and avr_write_byte() to properly
     handle the flash memory type without having to tell them whether
     they should program the high byte or the low byte - figure that
     out from the address itself.  For flash memory type, these
     routines now take the actual byte address instead of the word
     address.  This _greatly_ simplifies many otherwise simple
     operations, such a reading or writing a range of memory, by not
     having to worry about whether the address starts on an odd byte
     or an even byte.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@45 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 01:59:47 +00:00
Brian S. Dean bd2cdb3571 Return error codes instead of exiting, thus making sure that we exit
only via main() so that the exitspecs are properly applied.

When reading input data from a file, remember how many bytes were read
and write and verify only that many bytes.

Don't complain when an input file size is smaller than the memory size
we are programming.  This is normal.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@44 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 16:34:28 +00:00
Brian S. Dean 683cb34d25 Correct checksum calculation; failure to account for the value of the
record type was causing non-zero record types to be calculated
incorrectly.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@43 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 15:38:55 +00:00
Brian S. Dean ed18f3de7e Makefile : install the man page
main.c : drop the giant usage text now that we have a man page.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@42 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 04:28:49 +00:00
Brian S. Dean bfd4ad5038 Add initial man page graciously contributed by Joerg Wunsch. Thanks
Joerg!


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@41 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 04:14:01 +00:00
Brian S. Dean efabaf371d Accept abbreviations for eeprom and flash for the dump and write
commands.

Fix small bug keeping 1 character command lines from being added to
the history.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@40 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 03:43:16 +00:00
Brian S. Dean 2bec699e3e Implement enough state in cmd_dump so that if it is called with no
arguments, it successively dumps the next chunk of data of the same
previously specified length.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@39 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 03:10:53 +00:00
Brian S. Dean f96acbd9a3 The program was getting too large for a single file. Split it up into
more modular pieces.

Also, accept command abbreviations as long as they are not ambiguous.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@38 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 02:46:50 +00:00
Brian S. Dean 07054a24c9 Add ability to specify the state of the power and reset pins on
program exit.  Default to leaving the pins in the state they were when
we found them.

Contributed by: Joerg Wunsch


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@37 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 00:49:13 +00:00
Brian S. Dean ac2b638ce7 Switch to using readline() for getting terminal input. I can't seem
to get the history capabilities working yet, but even so, it does
better handling of the prompt and strips newlines for us, so it's
still a win.

Add a few new commands for terminal mode: help, sig, part, erase.
Display rudimentory help using the help command.

Add some function prototypes.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@36 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-18 03:25:03 +00:00
Brian S. Dean f5aea67633 Change -c (interactive command mode) to the more intuitive -t
(terminal mode).

Make binary format the default for output.

Update the parts table with corrections for old values and add some
new values.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@35 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-18 02:35:41 +00:00
Brian S. Dean 898d3ef213 Automatically verify on-chip data with what we just programmed.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@34 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-15 04:18:39 +00:00
Brian S. Dean 15af3fdede Prepare the Makefile for integration into the FreeBSD ports tree.
Fix a few "may be used uninitialized" bugs found by -Wall.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@33 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-15 02:28:46 +00:00
Brian S. Dean 47dd9bfd18 Free a buffer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@32 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:43:14 +00:00
Brian S. Dean 96b7d82eb2 Use a smarter programming algorithm - read the existing data byte
first and only write the new one if it is different.

Add -n option which is a test mode in which the chip is not actually
updated.  This option does not affect writes in interactive mode.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@31 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:32:36 +00:00
Brian S. Dean 96fbb1b2de Add the "dump" and "write" interactive commands.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@30 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:11:18 +00:00
Brian S. Dean 87cc83070f Correctly produce and handle "end of record" for intel hex files.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@29 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 01:55:08 +00:00
Brian S. Dean f6016de46c Re-enable writing to the chip. I should probably should make this a
command-line selectable option so that I don't keep forgetting and
committing it with it disabled.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@28 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 22:11:26 +00:00
Brian S. Dean a0adf5cd4f Add a newline before exiting due to command line errors. Perform a
bit more option compatibility testing between -c, -i, and -o.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@27 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:58:46 +00:00
Brian S. Dean 1729c5ab2f Add input file format auto-detection support.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@26 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:48:10 +00:00
Brian S. Dean c2916f0d76 Say what the defaults are.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@25 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:04:44 +00:00
Brian S. Dean 75042b07ee New files.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@24 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:51:04 +00:00
Brian S. Dean d6de99f17e Correct usage text.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@23 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:50:03 +00:00
Brian S. Dean 7981bad682 Parameterize a few additional items per chip. Print out all per-chip
parameters on startup.  Use the per-chip parameters in the code
instead of hard-coded values for the 2313.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@22 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:46:25 +00:00
Brian S. Dean e28189e50c Fix filename assignment error.
Clean up debugging code a little, utilize fileio() instead of making
direct calls to b2ihex().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@21 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:12:08 +00:00
Brian S. Dean 8d38ffbd4a A lot of general code cleanup.
Re-work command line options to be more intuitive.

Support Intel Hex input and output file formats.  Provide hooks to
support Motorola S-Record as well.

Add a few more part-specific parameters to the avrpart structure.

Only write the flash or eeprom if the data to be written is not 0xff.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@20 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:00:17 +00:00
Brian S. Dean 801242dba7 Update a comment.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@19 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 18:45:53 +00:00
Brian S. Dean a7b078354a Provide the ability to tie additionally tie pins 6-9 of the parallel
port to Vcc in order to supply more current.

Fix a typo on the size of the S1200's Flash.

Bring RESET low when programming is completed.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@18 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 18:42:42 +00:00
Brian S. Dean 9e65914d36 Correct pin connection comments. Elaborate a bit on Vcc connection.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@17 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 02:35:34 +00:00
Brian S. Dean 019b9583c0 Update after receiving some good feedback from Joerg Wunsch. We
should now be able to program AT90S1200's.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@16 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 02:24:50 +00:00
Brian S. Dean accb2e63b2 Don't limit eeprom addresses.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@15 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-30 16:45:50 +00:00
Brian S. Dean bb4c63cdcc Add support for the 8515. Make the addition for other devices easier.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@14 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-20 02:26:31 +00:00
Brian S. Dean 07a4b587b7 Clear all bits except AVR_RESET when finished reading or programming
the Atmel device.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@13 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-27 16:45:17 +00:00
Brian S. Dean fcec1e3543 update announcement message
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@12 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 02:00:39 +00:00
Brian S. Dean f468d4f4cc Update announcement message.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@11 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:59:32 +00:00
Brian S. Dean 486e0fd2af Return the correct return code from 'main()'.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@10 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:50:37 +00:00
Brian S. Dean dae1a56af6 Add ppi_pulse() function and fix ppi_toggle() to actully toggle
instead of pulse.

Make all abnormal returns after the parallel port has been opened go
through a single exit point at the bottom of 'main()'.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@9 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:48:53 +00:00
Brian S. Dean dedd92130c Makefile: add --pedantic compiler option
avrprog.c:

	Add lots of comments, move getop() variable declarations to
	the top of the program.

	Add a typedef name to the AVR memory type and use it for
	function declarations.

	Add a usleep() delay in the sense loop to avoid becoming a cpu
	hog.

	Print out a version string so that folks know what version of
	the software they are running.

	Be sure and close the parallel device and the i/o file when
	terminating abnormally.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@8 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 19:47:03 +00:00
Brian S. Dean 945ceb7ab9 Print out version information when invoked.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@7 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 18:51:32 +00:00
Brian S. Dean 886b7d0839 Makefile: Add an install target.
avrprog.c:

  Add license.

  Document the header a bit better.

  Add capability to read out and display the device signature bytes.

  Add capability to power the device from the parallel port.

  Eliminate debug print facility.

  Provide 'avr_cmd()' function.

  When memory locations don't program, generate a newline so that the
  information is not overwritten and lost.

  Don't print out the message about needing to specify a file if the
  user is not requesting an operation that requires the file.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@6 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 03:53:06 +00:00
Brian S. Dean a46085d055 Pring usage when no arguments are supplied.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@5 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-05 05:14:17 +00:00
Brian S. Dean 6c5355c8ce This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@3 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-05 05:12:50 +00:00