Commit Graph

611 Commits

Author SHA1 Message Date
Joerg Wunsch 496ab3fd81 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@539 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-11-01 23:02:06 +00:00
Joerg Wunsch a1c528dbe2 Fix yet another sign extension bug introduced by renaming "unsigned char"
to "char".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@538 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-20 11:36:19 +00:00
Joerg Wunsch 50b587155d Add the required address bits for calibration memory space...
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@537 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-14 20:00:01 +00:00
Joerg Wunsch d1342a1984 Fix the size of the calibration memory in the ATmega8515.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@536 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-14 19:33:19 +00:00
Joerg Wunsch f9331bc6b4 Add support for the ATmega640/1280/1281 devices.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@535 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-10-09 09:29:24 +00:00
Joerg Wunsch 08e0114447 Polish up the docs a bit. Use smallexample instead of example for
wide tty output.  Document a trick to find out about the serial
numbers of all JTAG ICEs attached to USB.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@534 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-27 08:25:18 +00:00
Joerg Wunsch 0f12718ab6 A number of fixes for the libusb handling:
. use the correct endpoint, depending on whether we are going to read
  or write
. when opening the USB device, set the configuration according to the
  config entry, and properly claim the interface
. when closing, release the interface again

With these changes, it works now with libusb-win32 as well.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@533 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-26 12:19:01 +00:00
Joerg Wunsch 1b3d1fb776 In jtagmkII_paged_write(), default the pages size to 256 early enough
so the buffer will then be allocated correctly.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@532 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-26 12:16:45 +00:00
Brian S. Dean 63aab0383c Previous commit was the wrong fix, instead look for an alternate file
for the texi2html split conditional.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@530 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-22 17:51:59 +00:00
Joerg Wunsch 367a80150f * main.c(do_op): use mem->desc in place of upd->memtype to
give the full name of the respective memory area, instead of
the (possibly abbreviated) name the user typed in the -U option.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@529 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-22 14:14:14 +00:00
Brian S. Dean 551aff83c5 Fix conditional for the directory existance test.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@528 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 21:06:15 +00:00
Joerg Wunsch f366d16c75 Add the forgotten -B option (JTAG bit clock) to the getopt() option
string.  Actually evaluate that number as microseconds then, as the
documentation used to state already.

While being there, re-sort the -s option into alphabetical order.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@527 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 15:02:02 +00:00
Brian S. Dean 736905dcdb Reset the version to 5.0cvs for post 5.0 release development.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@526 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 02:32:49 +00:00
Brian S. Dean 3fc237abff Document the -s option.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@525 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 02:00:58 +00:00
Brian S. Dean e792a592f5 Provide more information on safemode operation.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@524 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:54:19 +00:00
Brian S. Dean 93105b3214 Document Version 5.0.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@523 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:45:48 +00:00
Brian S. Dean d9a67805b5 Add Colin O'Flynn to the contributors list for his safemode support.
Document the addition of the latest safemode update in the change log.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@522 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:43:19 +00:00
Brian S. Dean ee515ad636 Update version to 5.0.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@521 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:37:02 +00:00
Brian S. Dean e5fb5ed3a6 All declarations need to be at the top of the block.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@520 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 01:26:54 +00:00
Brian S. Dean e2a99a00a4 This is Colin O'Flynn's mega patch for updating safemode support:
* add support for parts with just 'fuse' memory

    * if any fuse memories are altered, reflect those changes in the
      post-programming safemode check so that safemode no longer
      complains about fuses which were intentionally altered; this
      eliminates the need to completely disable safemode using -u in
      order to program fuses.

    * provide -s option which will not ask to restore fuses, it will
      just do it

Submitted by: Colin O'Flynn <coflynn@newae.com>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@519 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-21 00:20:32 +00:00
Joerg Wunsch 56b04c2511 Use a slightly different approach to avoid the signed/unsigned warning.
Pointed out by: Brian Dean


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@518 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-20 04:53:09 +00:00
Joerg Wunsch 71aa89490e Make the device code received unsigned, so it wouldn't sign-extend if
it is beyond 0x80.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@517 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-19 14:22:30 +00:00
Joerg Wunsch 9823296d6f Forgot to add Michael Holzt to that file in my previous commit.
He's the author of the serbb contribution.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@516 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-19 05:36:37 +00:00
Joerg Wunsch 305c28943d In lieu of Michael Holzt, add his serbb serial bit-bang code so it
will be available in the upcoming avrdude release.

His addition has been implemented by means of a generalized bit-bang
interface that contains the common part between serial and paralle
bit-bang devices, and specialed backends for the serial and parallel
port connections.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@515 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 20:12:23 +00:00
Joerg Wunsch 2d992bd6ea Record my recent changes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@514 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 19:43:04 +00:00
Brian S. Dean 3cd7546e74 Bring this file up to date.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@513 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 01:16:39 +00:00
Brian S. Dean 61157b7985 Document some recent changes.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@512 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 01:01:57 +00:00
Brian S. Dean 733391725b 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@511 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 00:44:20 +00:00
Brian S. Dean bfbe775df8 This is patch #3277 which appears to fix a number of issues with the
avr910 programmer.

Original Submission: The attached patch against avrdude 4.4.0 fixes
the following problems with paged writes in avr910.c:

  - failure to re-set address after page writes;
  - no polling or delay after page writes;
  - no page writes when not using auto-increment;
  - an extraneous page write when data ends on page boundary.

Submitted by: "Nic" <avrdude@schraudolph.org>


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@510 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-18 00:28:19 +00:00
Joerg Wunsch afbe273a6a 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@509 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 21:01:35 +00:00
Joerg Wunsch 859a5aee59 Improve the doc generation a bit.
Do not rebuild the docs again if they are up-to-date.  This avoids as
well that they are rebuilt during "make install".

Use mv -f instead of plain mv in order to install the docs into the
respective subdirs, in order to avoid silly questions for non-writable
destination files.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@508 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 20:04:31 +00:00
Joerg Wunsch 133e824f8d Oops, forgot to implement the calibration byte address bits.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@507 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 19:57:15 +00:00
Joerg Wunsch 12d7cceb2b 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@506 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 19:54:47 +00:00
Joerg Wunsch 8c1da56fe2 Merge the changes from avrdude.1 rev 1.47.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@505 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 19:12:20 +00:00
Brian S. Dean 814abdde80 Document -q -q. Expand a little on the description of the 'part'
command.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@504 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-17 15:23:05 +00:00
Brian S. Dean 17d6c4e14c Implement -q -q to be very very quiet.
Submitted by: andyw@pobox.com


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@503 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:52:42 +00:00
Brian S. Dean 8cb8923eca Add DAPA programmer.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@502 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:34:22 +00:00
Brian S. Dean ae1a671a68 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@501 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 21:23:14 +00:00
Joerg Wunsch 66a5f13b2c avrdude.1: document the memtypes for -U
doc/avrdude.texi: (Ditto.)
Closes bug #13501: <memtype> should be listed in the man page


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@500 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 20:38:29 +00:00
Joerg Wunsch f6c2213871 * doc/Makefile.am: add logic to detect the misf^H^H^H^H
gratitous API change in recent versions of texi2html where
the output directory has changed names.
Fix for:
bug #13026: The build fails with texi2html 1.76
bug #12715: make issues during install
patch #3091: commandline fix for latest version of texi2html


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@499 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 20:18:37 +00:00
Joerg Wunsch dccd12548d * jtagmkII.c (jtagmkII_paged_load): return the number of bytes read.
This makes EEPROM block reads work again.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@498 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 15:52:28 +00:00
Joerg Wunsch 59e0241a40 * usb_libusb.c (usbdev_drain): actually implement draining to aid
synchronizing against a JTAG ICE in weird state.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@497 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 15:01:52 +00:00
Joerg Wunsch 2d30c6588b Improve the initializion sequence of the butterfly so it is more likely
to synchronize with the device.

bug #9787 overview: avrdude 4.4.0 correct butterfly interface


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@496 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-16 14:54:55 +00:00
Joerg Wunsch a4f79a194a 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@495 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-14 19:49:27 +00:00
Brian S. Dean 2e7ce68927 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@494 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-09-14 02:11:49 +00:00
Joerg Wunsch cfe306e66d Add Brian's ChangeLog entry for the warning cleanup.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@493 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-30 04:47:23 +00:00
Joerg Wunsch 6d420f9a61 Consitently use unsigned char for buffers to avoid warnings.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@492 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-30 04:44:29 +00:00
Brian S. Dean 5b6506ff17 Eliminate compiler warnings. GCC 4.x elicits many signedness warnings
when passing unsigned char * when char * is in the prototype and vice
versa.  Clean these up along with a few others.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@491 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-30 01:30:05 +00:00
Brian S. Dean b7810ccb40 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@490 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-28 22:23:35 +00:00
Joerg Wunsch 7a68b92089 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@489 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-08-28 19:37:59 +00:00