Commit Graph

36 Commits

Author SHA1 Message Date
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
hinni 1fe6d367ce * avr910.c, pgm.c, pgm.h, config_gram.y, lexer.l: Add new configuration parameter baudrate to support avr910-programmers with non-standard baudrates
* avrdude.conf.in, doc/avrdude.texi: Added "baudrate" to documentation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@398 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-01-03 18:36:44 +00:00
bdean 885d915a1c Add support for the Atmel Butterfly board which talks to the
Butterfly's supplied bootloader firmware.

Contributed by: Michael Mayer <michael-mayer@gmx.de>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@387 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-30 15:16:48 +00:00
troth 58f2a417cb * 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
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 5a65e71d37 Do that last commit slightly differently - this way results in no
shift-reduce conflicts.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@256 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 01:19:17 +00:00
bdean afbb106145 It shouldn't be an error to have an empty configuration file. This
causes some shift-reduce conflicts, but I think they are OK.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@255 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-03-05 01:13:57 +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
bdean 61ab2bc318 Introduce 'default_programmer' to the config file instead of requiring
one of the programmers to be tagged "default" within its definition.

Also, axe the notion of a compiled-in default programmer.  It is
kind've pointless now that nearly all configuration comes from the
config file, thus, avrdude is not very useful without the config file,
and thus, having a programmer compiled-in offers little or no benefit.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@218 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-21 21:07:43 +00:00
bdean 2c01281231 Add port name defaults to the config file instead of hard-coding.
This adds 'default_parallel' and 'default_serial' keywords to the
grammar, which take quoted string arguments.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@214 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-21 18:46:51 +00:00
bdean 2367f41d5f 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
bdean 36195d4655 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
bdean 9de52d215d 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
troth 1997cc5188 These changes add basic support for a autoconf/automake based build system.
* .cvsignore: Ignore autoconf files.
	* AUTHORS: New file.
	* ChangeLog: New file.
	* Makefile: Removed file.
	* Makefile.am: New file.
	* NEWS: New file.
	* README: New file.
	* bootstrap: New file.
	* configure.ac: New file.
	* avr.c: Include ac_cfg.h (generated by autoconf).
	* config.c: Include ac_cfg.h.
	Include config_gram.h instead of y.tab.h.
	* config.h: If HAS_YYSTYPE is not defined, define YYSTYPE.
	* config_gram.y: Include ac_cfg.h.
	* fileio.c: Include ac_cfg.h.
	* lexer.l: Include config_gram.h instead of y.tab.h.
	* lists.c: Include ac_cfg.h.
	* main.c: Include ac_cfg.h.
	* par.c: Include ac_cfg.h.
	* pgm.c: Include ac_cfg.h.
	* ppi.c: Include ac_cfg.h.
	* stk500.c: Include ac_cfg.h.
	* term.c: Include ac_cfg.h.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@192 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-14 20:34:03 +00:00
bdean dca2176204 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
joerg_wunsch 546e18c753 Declare the internally used static functions on top, to get rid of the
compiler warnings.

Reported by:	bison-generated parsers


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@185 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-12 09:08:10 +00:00
joerg_wunsch 1201b3321b Move the C declarations to the top of the file. While [b]yacc doesn't
care, bison does, and this is normally the way it's meant to be
anyway.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@182 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-11 21:27:06 +00:00
bsd 2c651eb7bf Makefile: include a target to automatically generate the dependency
list.

All others


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@177 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-08 04:17:25 +00:00
bsd 54e7ce88d3 Add GPL to the Makefile and config_gram.y.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@174 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-06 19:54:46 +00:00
bsd f983234f46 Get rid of the verbose printing of individual file CVS version ids.
This was intended to be used for identifying code in the field for
incoming bug reports, but I've never really found it all that useful.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@171 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-02-06 05:45:06 +00:00
bsd c1bcfe53a7 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
bsd da6e6490a4 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
bsd 580ff186eb 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
bsd fb1765f1a7 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
bsd 4337d15fc4 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
bsd 21694fbbaf Update version number. Update copyright.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@118 81a1dc3b-b13d-400b-aceb-764788c761c2
2002-01-12 01:51:35 +00:00
bsd 2a4402b055 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
bsd ba28dbd72a 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/avrdude@103 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-11-21 18:54:11 +00:00
bsd ec7682ac94 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
bsd efb9aaf8aa 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
bsd 9a28000280 comment
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@92 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 23:34:07 +00:00
bsd 5abf255801 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
bsd 4654c9425e Fix an (non)exit.
Silence a couple of compiler warnings.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@89 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-16 02:50:27 +00:00
bsd d899f57fec 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
bsd 1d67a8516f Add copyrights.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@85 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-10-15 02:46:59 +00:00
bsd f8677f8d4c 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