Commit Graph

1102 Commits

Author SHA1 Message Date
bsd 275f7edc86 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/avrdude@55 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 20:34:08 +00:00
bsd 4e6b8f102a 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/avrdude@54 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:47:33 +00:00
bsd 502c1a50db 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/avrdude@53 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:25:45 +00:00
bsd 2617074192 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/avrdude@52 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-26 17:22:40 +00:00
bsd d43bbc9dcd Get rid of the Usage file.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@51 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-25 16:24:08 +00:00
bsd dd7d98ccf4 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/avrdude@50 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-24 19:10:34 +00:00
bsd 46a4582009 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/avrdude@49 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-24 18:45:58 +00:00
bsd 27e5975df5 Don't gzip the man page.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@48 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 14:32:23 +00:00
bsd 64408303f1 .Nm macro fix. Submitted by Joerg.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@47 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 14:29:37 +00:00
bsd f93d659375 Cosmetic, don't output a preceding linefeed for usage().
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@46 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 02:12:12 +00:00
bsd fe4bb95f85 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/avrdude@45 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-22 01:59:47 +00:00
bsd af8d44bf4b 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/avrdude@44 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 16:34:28 +00:00
bsd 1fa26c9add 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/avrdude@43 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 15:38:55 +00:00
bsd 880a2a8fdd 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/avrdude@42 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 04:28:49 +00:00
bsd 8e1a65399c Add initial man page graciously contributed by Joerg Wunsch. Thanks
Joerg!


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@41 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-20 04:14:01 +00:00
bsd 62e35226ed 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/avrdude@40 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 03:43:16 +00:00
bsd ab38e77526 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/avrdude@39 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 03:10:53 +00:00
bsd b211c95bfe 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/avrdude@38 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 02:46:50 +00:00
bsd ea1ecceabe 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/avrdude@37 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-19 00:49:13 +00:00
bsd 5db692fbe5 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/avrdude@36 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-18 03:25:03 +00:00
bsd 1b177e45bf 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/avrdude@35 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-18 02:35:41 +00:00
bsd 6cb270c952 Automatically verify on-chip data with what we just programmed.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@34 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-15 04:18:39 +00:00
bsd a5875162a7 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/avrdude@33 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-15 02:28:46 +00:00
bsd adcede7780 Free a buffer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@32 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:43:14 +00:00
bsd a745d1f8e6 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/avrdude@31 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:32:36 +00:00
bsd 6c4cfd26a7 Add the "dump" and "write" interactive commands.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@30 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 21:11:18 +00:00
bsd f6d99aed59 Correctly produce and handle "end of record" for intel hex files.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@29 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-14 01:55:08 +00:00
bsd 0046f56151 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/avrdude@28 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 22:11:26 +00:00
bsd 0f9c0a5fab 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/avrdude@27 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:58:46 +00:00
bsd c2e91ab943 Add input file format auto-detection support.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@26 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:48:10 +00:00
bsd 59f9c394a8 Say what the defaults are.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@25 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 21:04:44 +00:00
bsd 4e0de4d4b2 New files.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@24 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:51:04 +00:00
bsd 684c4e84ac Correct usage text.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@23 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:50:03 +00:00
bsd 355742d644 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/avrdude@22 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:46:25 +00:00
bsd ca7d4f0957 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/avrdude@21 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:12:08 +00:00
bsd c7a592164b 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/avrdude@20 81a1dc3b-b13d-400b-aceb-764788c761c2
2001-01-13 20:00:17 +00:00
bsd f750d9a830 Update a comment.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@19 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 18:45:53 +00:00
bsd 19c9596816 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/avrdude@18 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 18:42:42 +00:00
bsd d7b3b4a6f6 Correct pin connection comments. Elaborate a bit on Vcc connection.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@17 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 02:35:34 +00:00
bsd 8f1f91601e 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/avrdude@16 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-31 02:24:50 +00:00
bsd 12a7e8514a Don't limit eeprom addresses.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@15 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-30 16:45:50 +00:00
bsd c030e39b3d Add support for the 8515. Make the addition for other devices easier.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@14 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-12-20 02:26:31 +00:00
bsd 2dca69dc00 Clear all bits except AVR_RESET when finished reading or programming
the Atmel device.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@13 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-27 16:45:17 +00:00
bsd 10560ddb0e update announcement message
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@12 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 02:00:39 +00:00
bsd b3e76e1a0e Update announcement message.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@11 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:59:32 +00:00
bsd 9c9f27c698 Return the correct return code from 'main()'.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@10 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:50:37 +00:00
bsd 8372ead3de 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/avrdude@9 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-07 01:48:53 +00:00
bsd 18c89843e6 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/avrdude@8 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 19:47:03 +00:00
bsd f194e44f8f Print out version information when invoked.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@7 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 18:51:32 +00:00
bsd 3517471a22 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/avrdude@6 81a1dc3b-b13d-400b-aceb-764788c761c2
2000-08-06 03:53:06 +00:00