Commit Graph

38 Commits

Author SHA1 Message Date
Brian S. Dean 55380e6cbb Woops, didn't really mean to commit those changes that slipped in with
the last commit.  Those were just there for testing.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@209 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-20 19:47:16 +00:00
Brian S. Dean 0e9ef447a0 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
Brian S. Dean 8aa98920ef Add a few parameters needed for parallel programming: assignment of
PAGEL and BS2 signals and the disposition of the reset pin
('dedicated' or 'io').


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@202 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-20 14:11:34 +00:00
Joerg Wunsch 7795a53427 My colleague contributed a part definition for the AT90S2343.
Submitted by:	Mirko Kaffka <mirko@mkaffka.de>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@198 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-19 09:01:54 +00:00
Theodore A. Roth e46a58c1cc Add support for mega169. (tested with stk500 with 1.7 firmware)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@197 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-18 19:09:07 +00:00
Theodore A. Roth ab3fc147d4 Add commments to separate parts (makes it easier for the eye to parse).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@196 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-18 18:47:59 +00:00
Brian S. Dean 46233d2241 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
Brian S. Dean 17427c0645 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
Brian S. Dean 5a8ebeb1ce 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
Brian S. Dean dcca02ebbf 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
Brian S. Dean a193330803 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/avrdude@159 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-11-30 14:09:12 +00:00
Brian S. Dean 916ade1c43 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/avrdude@143 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-10-11 19:32:12 +00:00
Brian S. Dean 975614df3b Add support for ATtiny15 - contributed by Asher Hoskins
<asher@crumbly.freeserve.co.uk>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@135 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-06-22 14:03:53 +00:00
Brian S. Dean 99ac342e05 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/avrdude@132 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-04-07 16:03:58 +00:00
Brian S. Dean 4b6223fff4 Add support for ATMEGA128; untested; requested by Jeff Gardner
<gardner@journey.com>.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@131 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-04-05 22:41:38 +00:00
Brian S. Dean 12b331ccd4 Minor ordering.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@129 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-15 02:06:58 +00:00
Brian S. Dean 6ad21f0424 Make pwroff_after_write a yes/no field instead of a numeric.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@126 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 03:04:22 +00:00
Brian S. Dean f7b64467de Document the pwroff_after_write flag.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@125 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 02:59:39 +00:00
Brian S. Dean fa956af92c 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/avrdude@123 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-14 02:48:07 +00:00
Brian S. Dean 253015fb41 Updates to the 2333 and 4433 parts, contributed by Joerg Wunsh.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@122 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-02-09 21:53:51 +00:00
Brian S. Dean 5ae32d55a1 Clarify a comment.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@113 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:12:23 +00:00
Brian S. Dean ce4395014c fix address bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@112 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-30 00:07:29 +00:00
Brian S. Dean bb4a4a889d Add the AVR3 progammer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@110 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-29 21:47:05 +00:00
Brian S. Dean 10b8034ba9 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/avrdude@109 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-29 21:37:20 +00:00
Brian S. Dean 06dd7455b0 fix spelling error
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@107 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-12-15 22:17:46 +00:00
Brian S. Dean 27ea11ae30 Add comments about instruction formats. Correct an instruction
specification (cut&paste error).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@104 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-24 01:44:06 +00:00
Brian S. Dean b50ce8fabd 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/avrdude@102 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 05:50:59 +00:00
Brian S. Dean fb233af934 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/avrdude@100 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 02:46:55 +00:00
Brian S. Dean f1af5d3981 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/avrdude@99 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-19 17:44:24 +00:00
Brian S. Dean 76fb1330af Add ATMEGA163 part.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@98 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-17 20:48:17 +00:00
Brian S. Dean b9e5d16c95 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/avrdude@95 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-31 02:18:08 +00:00
Brian S. Dean 90d4f82fc9 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/avrdude@91 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 23:32:30 +00:00
Brian S. Dean c934f8cc7a 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/avrdude@88 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 02:47:55 +00:00
Brian S. Dean 136651146f Correct dt006 pinout.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@82 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:16:12 +00:00
Brian S. Dean 8350520e26 Update the man page.
Miscellaneous minor cleanups.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@80 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 00:00:09 +00:00
Brian S. Dean 3d8f8bcd45 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/avrdude@79 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-14 23:17:26 +00:00
Brian S. Dean 3cdf00c76c 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/avrdude@69 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-20 03:19:31 +00:00
Brian S. Dean 9003ed1183 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/avrdude@67 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-09-19 17:04:25 +00:00