Commit Graph

75 Commits

Author SHA1 Message Date
Joerg Wunsch c6a31e68c6 Add support for AT90USB646/647/1286/1287.
The 64 KB devices are actually guessed, as the datasheet and XML
files obviously contain a number of errors there.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@576 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-03-28 20:35:21 +00:00
Colin O Flynn 26d54b4499 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
Joerg Wunsch 4d966e4403 Fixed paged flash write operations for AT90PWMx devices
(error in datasheet).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@572 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-02-21 21:17:08 +00:00
Colin O Flynn b33708d0bd *avrdude.conf.in : Added bs2 and pagel to m162, patch 4766
CVS  ----------------------------------------------------------------------


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@567 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-01-17 21:01:25 +00:00
Joerg Wunsch d98636cfad Contributed by dcm@mit.edu: add support for the
AVRISP mkII device. (Savannah patch #4789.)
* serial.h: Declare usb_serdev_frame device descriptor.
* stk500v2.c: Implementation of the AVRISP mkII handling.
* usb_libusb.c: Add USB handling for short-frame delimited
AVRISP mkII USB protocol; add distinction of different
devices in usbdev_open().
* jtagmkII.c: Tell usbdev_open() to search for the JTAG ICE mkII.
* usbdevs.h: (New file.)
* Makefile.am: Add usbdevs.h, as well as some other forgotten
files "make distcheck" complained about.
* avrdude.conf.in: Add more aliases for the AVRISP mkII.
* avrdude.1: Document how to use the AVRISP mkII.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@564 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-01-12 23:13:50 +00:00
Joerg Wunsch d5965b20b9 Add EEPROM page instructions for the
ATmega169 so it will work for STK500v2.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@563 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-01-12 20:56:43 +00:00
Joerg Wunsch 5c32ab8ec9 Add support for ATtiny24/44/84.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@562 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-12-16 22:39:39 +00:00
Colin O Flynn 0163f7076b *avrdude.conf.in: added support for m162 using stk500v2
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@561 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-12-07 19:19:20 +00:00
Joerg Wunsch b4e112fa5e Fix the number of significant bits for the efuse memory in
ATmega48/88/168; the datasheet is a bit off here as well.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@560 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-12-01 19:55:17 +00:00
Joerg Wunsch dfc2fdc0f3 Enable parport access on x86_64 Linux and amd64 FreeBSD systems.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@554 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-28 09:47:23 +00:00
Joerg Wunsch 78fe202b59 Initial import of JTAG ICE mkI support.
The very basic functionality (paged flash read/write, erase, terminal
mode reads, fuse writes) works fine.  There are still the following
issues right now:

. paged EEPROM write (i.e. through -U eeprom:w:...) only works on an
  erased EEPROM
. byte-access flash and EEPROM writes (i.e. in terminal mode) fail
. documentation needs to be updated still


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@547 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-25 06:14:06 +00:00
Colin O Flynn 7c090061d5 Added support for stk500v2 for AtMega168
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@545 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-05 13:02:55 +00:00
Colin O Flynn 85a202387a avrdude.conf.in:
-added support for ATMega168, patch #4532 thanks to Manfred Bartz


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@544 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-04 13:51:32 +00:00
Joerg Wunsch 7dba7155a2 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 2674dc1deb Add the required address bits for calibration memory space...
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@537 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-14 20:00:01 +00:00
Joerg Wunsch 699d5c4e8b Fix the size of the calibration memory in the ATmega8515.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@536 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-14 19:33:19 +00:00
Joerg Wunsch 505e320a1b Add support for the ATmega640/1280/1281 devices.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@535 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-09 09:29:24 +00:00
Brian S. Dean 6cb8065508 Patch #4078: add VCC pin definition for DAPA programmer. This patch
was the whole programmer submission which was already added through
another request, but the former lacked the VCC definition.  Pick it up
from this patch.

Submitted by: tmohr@s.netic.de


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@511 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 00:44:20 +00:00
Joerg Wunsch 1a6537e3bd Fix the poll values for the ATmega103's EEPROM so they eventually
match the XML file.

This fixes
bug #7492: EEPROM writing fail on atmega103 with atavrisp


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@509 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 21:01:35 +00:00
Joerg Wunsch 297f1d6b3e Oops, forgot to implement the calibration byte address bits.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@507 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 19:57:15 +00:00
Joerg Wunsch 9f2832188b The ATmega128 has four oscillator calibration bytes, not only a single
one.

This closes
bug #11496: Memory bank calibration on atmega128 should have 4 bytes


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@506 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 19:54:47 +00:00
Brian S. Dean b25b64ed3f Add DAPA programmer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@502 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:34:22 +00:00
Brian S. Dean d04795b399 I thought I had already committed this but I don't see it in CVS.
This fixes EEPROM access using the STK500V2 programmer, partially
undoing part of a previous general fixup commit.  Choose the correct
read/write operations with the stk500v2 program function - the correct
one depends on the memory type.  EEPROM is byte addressable so uses
read/write.  FLASH is word addressable and so uses read_lo/write_lo.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@501 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:23:14 +00:00
Joerg Wunsch 8bf2adbed2 Make "jtag2" an alias for "jtag2fast", people will certainly love it
that way. ;-)  For those who want the 19200 Bd one, add "jtag2slow".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@495 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-14 19:49:27 +00:00
Brian S. Dean 0b1110f360 Change bit 0 of the ATmega169 efuse 'write' opcode from 'x' (ignore)
to 'i' (input).  Even though this bit should be ignored, it should not
be changed.  The 'x' setting sets the bit to zero which programs it
and could cause undefined behaviour.  Setting to 'i' enables it to be
rewritten to its old value.

A better solution might be to read the fuse byte, apply the new value
while leaving the 'x' bit alone, then writing the value back.  The
current fix is a workaround which allows the developer to change the
bit.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@494 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-14 02:11:49 +00:00
Brian S. Dean 935548add3 This is patch # 4338, obsoletes patch #4327, provides fixes for bugs
#13693, #13871, and #14212.

This provides bug fixes to the STK500V2 programmer type.  From the
patch information:

    - incorrect token used from avrdude.conf.in

    - wrong command sent to programmer, hence no write to eeprom.

    - programmer was said to start writing at 0x0000 and continue page
      by page and was not repositionned when a gap was found in the
      hex file, or when the hex file start address was not
      0x0000. Hence the verify procedure was correct, not the write
      procedure.

    - speed up of flash write to skip empty pages (full of 0xFF) by
      re-enabling a dedicated function for that task.

    - stk500v2_paged_load() was not returning the number of byte read,
      so empty hex files were generated when reading memory.

Submitted by:  Bernard Fouch <bernard.fouche@kuantic.com>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@490 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-28 22:23:35 +00:00
Joerg Wunsch 8261a6acd7 Add support for the ATtiny25/45/85. Note that only the ATtiny45
appears to have a complete XML description right now.

Document all the recently added new devices: AT90PWM2/3,
ATmega164/324/644, ATmega329x/649x, ATtiny25/45/85.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@489 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-28 19:37:59 +00:00
Joerg Wunsch b93ae0b36e Fix the EEPROM sizes for the ATmega329x/649x devices. I somehow got them
twice initially.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@488 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-17 19:40:21 +00:00
Joerg Wunsch 254ad2c419 Add support for the AT90PWM2/3. The XML files don't appear to list
all the details right now, so some of the parameters are guessed.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@487 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-16 19:34:56 +00:00
Joerg Wunsch 975d7b786a Extend the butterfly code to fully support AVR109 boot loaders. Notable
changes to butterfly.c include:

. do not exit for unsupported devices but return -1 from the init function
  instead; that way the -F option can be used to continue anyway

. honor the -b option as arbitrary bootloaders could be implemented with
  any baud rate, not just the fixed 19200 Bd used by the butterfly

. implement functionality to read the fuse and lock bits, and write the
  (boot) lock bits, resp.

. fix the signature byte order

The remaining files document the new functionality.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@486 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-07-28 16:06:35 +00:00
Joerg Wunsch fcd9cf2e09 According to the part description XML file, set AllowFullPageBitStream for
the AT90CAN128 to "no".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@477 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-06-15 04:46:12 +00:00
Joerg Wunsch 8a91d9afec Add "efuse" sections to the ATmega164/324/644 definitions.
Iff enter_progmode failed with RSP_ILLEGAL_JTAG_ID, give the user a
hint that their JTAGEN fuse might be unset.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@476 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-06-14 21:44:34 +00:00
Joerg Wunsch b35ab14409 Add support for the ATmega164/324/644.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@475 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-06-14 20:18:42 +00:00
Joerg Wunsch d16ca35686 Fix broken page/intrapage address bit assignments for the ATmega649x.
Now loading flash works on these devices even for simple parallel ISP
adapters.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@474 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-06-13 21:24:06 +00:00
Joerg Wunsch 79994f82b7 Add support for the ATmega329x/649x chips. Note that STK500v1 is not
officially supported for this device.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@473 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-06-11 21:27:09 +00:00
Joerg Wunsch 5b7a7a5711 Add an "jtag2fast" programmer that connects to the JTAG ICE at 115200 Bd.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@463 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-14 07:57:24 +00:00
Joerg Wunsch a5a700f7a1 Quite some cleanup of the JTAG ICE mkII stuff.
. Implement the new EECRAddress field in the device descriptor that is
  required by the 4.x firmware; make an uneducated guess about what
  firmware requires what length of device descriptor -- perhaps Atmel
  can be convinced to publish an official matrix for that.

. Specify EECR in the config file where required.  Obviously, only
  locations that differ from the 0x3c default are mentioned in the
  XML files, so by now, this only affects the AT90CAN128 for us.

. After clarification with Atmel, EnablePageProgramming should really
  default to 1, and only cleared if specified by an XML parameter.  So
  far, only the XML files for the ATmega256x and ATmega406 do specify
  it at all, and they specify a 1, too.

. Drop the entire OCDEN fuse heuristic.  If OCDEN is unprogrammed at
  startup, issue a warning that single-byte EEPROM updates won't be
  possible.  Leave it to the user to program the fuse if desired.
  That way, we won't run into any issue of prematurely wearing out the
  hfuse EEPROM cell.  Interestingly enough, this also solved the
  problem of the target not restarting from scratch upon sign-off.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@461 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-11 20:06:23 +00:00
Joerg Wunsch bf8d7260df I missed to commit the allowfullpagebitstream attributes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@456 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 21:04:55 +00:00
Joerg Wunsch 04831af970 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
Brian S. Dean 9a0e4afb9a Add support for "Xilinx JTAG cable".
Contributed by: Tymm <tymm@booyaka.com>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@437 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-12-22 01:30:30 +00:00
Brian S. Dean 15a0e05a7b Add support for the AT90CAN128. Not sure if all the instruction
encoding is correct, specifically the address bits don't exactly match
those of the preliminary datasheet that I have, but I don't see how
they could be right.  Tested with STK500 and it works there.
Instruction encodings have not been tested due to lack of a parallel
port on my Mac.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@436 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-12-22 01:24:39 +00:00
Jan-Hinnerk Reichert 66ce0f3cf4 avrdude.conf.in: Added support for ATtiny2313 (contributed by Bob Paddock)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@421 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-07-04 12:09:29 +00:00
Joerg Wunsch bc055e0fb6 Fix writing the efuse bits for the ATmega169. The original pattern
was based on a typo in the datasheet which Atmel agreed is going to be
fixed.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@420 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-06-25 14:28:26 +00:00
Jan-Hinnerk Reichert 91d893eb52 avrdude.conf.in: Added support for tiny13 (contributed by Pawel Moll), mega48 and mega88 (contributed by Galen Seitz)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@418 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-06-22 17:38:54 +00:00
Brian S. Dean 9c1f837677 Add the Futurlec programming cable definition.
Contributed by:  Gianmario.Scotti@nokia.com


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@406 81a1dc3b-b13d-400b-aceb-764788c761c2
2004-01-27 15:16:16 +00:00
Jan-Hinnerk Reichert 816ff2623e * 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
Brian S. Dean bceb249858 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
Brian S. Dean 578b25d1e2 Config file cleanup and part additions:
* The second poll value for flash is corrected for all devices

  * Delays are corrected for all devices, I have a datasheet for on my
    harddisk

  * mega161 is added

  * avr910_devcode added for all devices except mega64, mega162,
    mega169 and mega8535. Numbers are taken from uisp-source.

Contributed by Jan-Hinnerk Reichert <jan-hinnerk_reichert@hamburg.de>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@382 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-20 04:05:53 +00:00
Brian S. Dean 965b0f52bc Add ATmega64 part.
Contributed by Erik Christiansen <erik@dd.nec.com.au>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@378 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-14 04:43:55 +00:00
Joerg Wunsch 595d056a91 Add "fuse" and "lock" definitions for the AT90S8535. Actually, this is
stolen from the AT90S8515 since the datasheet says it's the same there.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@377 81a1dc3b-b13d-400b-aceb-764788c761c2
2003-11-08 21:15:42 +00:00