Commit Graph

524 Commits

Author SHA1 Message Date
Rene Liebscher d02083b738 * avrdude.conf.in: used parent parts for some other parts, added
abstract .xmega part as parent for xmegas
* main.c: hide parts starting with '.' from parts list


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1046 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-27 21:14:34 +00:00
Rene Liebscher d72a56ef01 patch #7688: Implement parent programmers feature
* avrdude.conf.in: updated documentation comment and some programmers 
    have now parents
  * config_gram.y: initpgm will now called at first use of programmer 
    in main. parser sets only the function pointer in the pgm structure.
    Pin and pin lists definitions can now be empty to remove the parents
    setting.
  * doc/avrdude.texi: updated documentation
  * main.c: added call to pgm->initpgm after locate_programmer
  * pgm.[hc]: added field initpgm in structure, added function pgm_dup


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1045 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-22 12:31:54 +00:00
Rene Liebscher 0e14a476f5 bug #21797: AT90PWM316: New part description
* avrdude.conf.in: added pwm316 with parent pwm3b but 16KB flash


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1044 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-22 09:24:22 +00:00
Joerg Wunsch 9250b467f7 libusb-win32 recently changed the name of their header file from usb.h
to lusb0_usb.h (for whatever reason).  Autoprobe for the filename
during configure, and include whatever is appropriate.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1043 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-20 09:39:56 +00:00
Rene Liebscher 7c85f6875e * avr.c: Unsigned variable was used for return code of paged_write/load
functions. So a negative return code led never to a fallback to byte
  functions.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1042 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-19 20:06:52 +00:00
Rene Liebscher 0a84dcee24 bug #34302: Feature request : device configuration with parent classes
* config_gram.y: if memory section is overwritten old entry is removed
        
(not in original patch)
* config_gram.y: if programmer or part is defined twice, a warning is
  output and the first instance is removed
        
General cleanup and free functions, so valgrind does not report any lost
blocks at program end.
* avrpart.[hc]: added avr_free_(opcode|mem|part) functions
* pgm.[hc]: added pgm_free function
* update.[hc]: added free_update functions
* config.[hc]: added cleanup_config function, use yylex_destroy to reset
  the lexer after usage. (So it can be reused.)
* main.c: add cleanup_main function which is called by atexit() (This 
  frees all lists so that at program exit only really lost memory is 
  reported by valgrind.)
* usbasp.c: added libusb_free_device_list() and libusb_exit() calls to
  avoid lost memory
* buspirate.c: moved memory allocation from initpgm to setup and added 
  free in teardown
* configure.ac: add definition of HAVE_YYLEX_DESTROY if $LEX is flex.
* Makefile.am: added . in front of SUBDIRS to build avrdude before trying
  to use it for creating the part list for the docs.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1041 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-17 20:56:37 +00:00
Rene Liebscher 572d3236bf * usbasp.c: USB vid/pid/vendor/product from config file are used, for
id "usbasp" nibobee and old usbasp are tried as they were currently
  implemented within usbasp
* avrdude.conf.in: added usb params to "usbasp", added new entry "nibobee"
  with params which were hardcoded in usbasp.c, and added an entry
  "usbasb-clone" which only checks vid/pid.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1040 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-17 17:37:23 +00:00
Rene Liebscher f39e538c6b bug #35261 avrftdi uses wrong interface in avrftdi_paged_(write|load)
* avrftdi.c: Fixed interface and implementation of avrftdi_paged_(write|load)
patch #7672 adding support for O-Link (FTDI based JTAG) as programmer
* avrdude.conf.in: added o-link entry


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1039 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-10 18:19:40 +00:00
Rene Liebscher 581b66b3a2 patch #7699 Read additional config files
* main.c: Added reading of additional config files
* avrdude.1: updated man page
* doc/avrdude.texi: updated documentation


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1038 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-10 18:07:19 +00:00
Joerg Wunsch 3b0b63edad Submitted by Bob Frazier:
bug #35208: avrdude 5.11 on freebsd 8.2-STABLE does not reset
Arduino Uno properly
* arduino.c (arduino_open): Bump the timeout between pulling
the DTR and RTS lines low and high.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1036 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-10 07:22:20 +00:00
Rene Liebscher d34978a124 Fixed following findings reported by cppcheck
* avr910.c:625 (error) Possible null pointer dereference: cmd - otherwise it is redundant to check if cmd is null at line 624
	* avr910.c:626 (error) Possible null pointer dereference: cmd - otherwise it is redundant to check if cmd is null at line 624
	* avr910.c:168 (information) The scope of the variable 'devtype_1st' can be reduced
	* avr910.c:169 (information) The scope of the variable 'dev_supported' can be reduced
	* avrftdi.c:647 (error) Using sizeof for array given as function argument returns the size of pointer.
	* stk500v2.c:3347 (error) Memory leak: b
	* stk500v2.c:3452 (error) Memory leak: b
	* usbasp.c:554 (error) Using sizeof for array given as function argument returns the size of pointer.
	* usbasp.c:485 (information) The scope of the variable 'dly' can be reduced

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1035 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-08 17:09:40 +00:00
Joerg Wunsch 0b3feb71b8 Reported by Jason Kotzin:
* usbasp.c (usbasp_spi_paged_load, usbasp_spi_paged_write):
Fix buffer address calculation.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1034 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-03 22:38:59 +00:00
Rene Liebscher 965f879ab6 patch #7629 add support for atmega48p
* avrdude.conf.in: Added m48p with parent m48 + different signature

* avrdude.conf.in: made part parents (m88p = m88 + different signature, m168p = m168 + different signature)

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1033 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-03 14:01:10 +00:00
Rene Liebscher 9086368beb bug #21663 AT90PWM efuse incorrect
bug #30438 efuse bits written as 0 on at90pwmxx parts
* avrdude.conf.in: (pwm2, pwm2b, pwm3, pwm3b) <efuse.write>: Write 
  eight bits

* avrdude.conf.in: made part parents (pwm3 = pwm2, pwm3b = pwm2b, 
  pwm2b = pwm2 + different signature)
	
* ChangeLog-2011: New file, rotate ChangeLog for new year.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1032 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-02 15:20:18 +00:00
Rene Liebscher bb29664c84 * avrdude.conf.in: Added is_at90s1200 option to part description
* doc/avrdude.texi: Added missing options to part definition
* config_gram.y: Fixed resetting of is_at90s1200 and is_avr32 flags

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1031 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-30 23:03:42 +00:00
Rene Liebscher b848e21fd9 patch #7693: Fix config file atmel URLs (+ URLs in avrdude.texi and avrpart.h)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1030 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-30 19:43:11 +00:00
Joerg Wunsch e1ed50e8e6 * ser_posix.c (baud_lookup_table): Conditionalize the inclusion of
non-standard baud rates (only baud rates up to B38400 are
standardized by the Single UNIX Specification).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1029 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-30 16:38:58 +00:00
Rene Liebscher 7b66c21c05 bug #34302: Feature request : device configuration with parent classes
(not in original patch) 
* avrpart.c: New function avr_dup_opcode. avr_dup_mem/avr_dup_part-
	functions now duplicate the opcodes in their op-array to avoid memory leaks.
* doc/avrdude.texi: Added description of part parent f

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1028 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-29 16:51:44 +00:00
Rene Liebscher 64b32eb829 patch #7687: Autogenerating programmers and parts lists for docs
* doc/Makefile.am: Add rule how to create avrdude before generating parts list

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1027 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-29 13:24:02 +00:00
Rene Liebscher 42a0bec885 patch #7687: Autogenerating programmers and parts lists for docs
(generating the parts lists, programmers lists follows later)

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1026 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-29 12:53:20 +00:00
Rene Liebscher abb87167cf * configure.ac: Add writing of definition of confsubst to config.status, so it can run alone, not only called by configure.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1025 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-22 19:44:37 +00:00
Rene Liebscher df51dbd421 patch #7680: Fixing timeout problem in ser_recv in ser_win32.c
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1024 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-12-17 20:18:36 +00:00
Joerg Wunsch 2279ba026f Replace "cvs" in version number by "svn".
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1018 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-10-19 09:23:24 +00:00
Joerg Wunsch 8770c07d35 bug #34518: loading intel hex files > 64k using record-type 4
(Extended Linear Address Record)

Replace the change from r928 (handling of 0x8000000 offset in AVR32
files) by a completely different logic that no longer breaks hex files
for other devices starting with an offset; also apply a similar change
to S-record files, as well as when writing files.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1017 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-10-10 13:42:08 +00:00
Joerg Wunsch 57010bf9ba Remove stray printf()s by fprintf(stderr).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1015 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 20:08:15 +00:00
Joerg Wunsch 642d152748 Restrict the cyclecounter readout to those cases where
it has been explicitly requested (by -y or -Y), rather than always
attempting to read the last EEPROM bytes.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1014 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 15:20:59 +00:00
Joerg Wunsch c3d58bcd7a * stk500v2.c (stk600_xprog_paged_load, stk600_xprog_paged_write):
Fix regression in the AVRISPmkII/STK600 TPI handling introduced
by the USBasp's TPI implementation which added a pagesize even for
the minor memory regions of TPI devices.  Also fix wrong offset
introduced by the memory tagging patch.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1009 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 13:04:36 +00:00
Joerg Wunsch 833da9f117 * avr.c (avr_read, avr_write): Don't bail out on TPI parts if
their programmer doesn't provide a (low-level) cmd_tpi method;
instead, fall back to the normal programmer methods which are
supposed to handle the situation.
This fixes a regression where the recent bitbang-TPI implementation
broke TPI handling of STK600/AVRISPmkII.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1008 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-15 11:15:06 +00:00
Joerg Wunsch 0926a2cbd7 In stk500v2_command(), treat warnings as errors rather than success.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1006 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-13 15:14:53 +00:00
Joerg Wunsch 37eb8e8456 Document the programmer type restrictions for AT90S1200 devices.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1005 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-30 07:28:21 +00:00
Joerg Wunsch 768a8fc8bc bug #34027: avrdude AT90S1200 Problem (part 2 - stk500v2 and relatives)
* stk500v2.c (stk500v2_initialize): For the AT90S1200, release
/RESET for a moment before reinitializing, as this is required by
its programming protocol.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1004 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-30 07:19:21 +00:00
Joerg Wunsch b50c690e76 In AC_CHECK_LIB for libftdi, check for ftdi_usb_get_strings() rathern
than ftdi_init(), as this is a more specific thing to search for in
order to make sure getting a recent enough libftdi.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1003 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-30 07:16:22 +00:00
Joerg Wunsch 2465726abb bug #34027: avrdude AT90S1200 Problem (part 1 - bitbang
programmers)
* config_gram.y: Introduce new keyword "is_at90s1200".
* lexer.l: (Ditto.)
* avrdude.conf.in: Applew new keyword to the AT90S1200 device.
* avrpart.h: Introduce new flag AVRPART_IS_AT90S1200, reflecting
the is_at90s1200 configuration keyword.
* bitbang.c (bitbang_initialize): Replace existing test for
AT90S1200 by AVRPART_IS_AT90S1200
* avr.c (avr_write_byte_default): Avoid the pre-write reading for
the AT90S1200, as this appears to sometimes corrupt the high byte
by pre-programming the low byte just written into it.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1002 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-29 09:25:04 +00:00
Joerg Wunsch 1a136ebb90 Bump version for post-5.11.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@997 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-27 21:23:57 +00:00
Joerg Wunsch fb16558779 Bump version for AVRDUDE 5.11.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@995 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-27 19:49:39 +00:00
Joerg Wunsch 7583fc88a7 Update the list of supported AVR devices.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@994 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 21:12:33 +00:00
Joerg Wunsch a7a510a179 Add -lusb as "other libraries" when checking
for libftdi.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@993 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 21:05:53 +00:00
Joerg Wunsch 1d3ca0d77a Submitted by Juergen Weigert:
patch #7056: adding support for mikrokopter bootloader to butterfly
* butterfly.c: Add some specific logic to handle the
mikrokopter.de butterfly bootloader.
* butterfly.h: Add one related function declaration.
* config_gram.y: Add butterfly_mk keyword.
* lexer.l: (Ditto.)
* avrdude.conf.in: Add entry for butterfly_mk.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@991 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 20:50:32 +00:00
Joerg Wunsch 9f5346954e Submitted by Stefan Tomanek:
patch #7542: add default_bitclock to configuration files




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@988 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 20:30:26 +00:00
Joerg Wunsch 86432b91d9 Submitted by Brett Hagman:
Add support for the "Wiring" board/bootloader
* wiring.c: New file.
* wiring.h: (Ditto.)
* Makefile.am: Add new files.
* stk500v2_private.h: Reorganize so some functions and struct
pdata are globally known.
* stk500v2.c: (Ditto.)
* stk500v2.h: (Ditto.)
* lexer.l: Add new programmer keywords.
* config_gram.y: (Ditto.)
* avrdude.conf.in: Add "wiring" programmer entry.
* avrdude.1: Document the new programmer.
* doc/avrdude.texi: (Ditto.)
* AUTHORS: Add Brett Hagman.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@987 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 20:22:09 +00:00
Joerg Wunsch 822378d009 Submitted by an anonymous contributor on the mailinglist:
* avrdude.conf (jtagkey): Add a definition for the Amontec
JTAGKey



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@986 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 20:01:38 +00:00
Joerg Wunsch 6b09628d0a Submitted by Juergen Weigert:
bug #22720: avrdude-5.5 ignores buff settings in avrdude.conf
(Note that the actual bug the subject is about has been fixed
long ago.)
* update.c (do_op): fix a diagnostic message
* pgm.h: add exit_datahigh field
* par.c: set and act upon the exit_datahigh field
* avrdude.1: document the new -E options
* doc/avrdude.texi: (Ditto.)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@985 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 12:35:08 +00:00
Joerg Wunsch fef650b787 Add the macro BUILT_SOURCES so automake's dependency tracking will work.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@984 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 12:04:51 +00:00
Joerg Wunsch 1f8dc4dc52 bug #33114: Segfault after setting the DWEN fuse with Dragon
* jtagII.c (jtagmkII_getsync): Instead of exit()ing from
deep within the tree when detecting the "need debugWIRE"
situation, properly pass this up as a return code.
* jtagII_private.h (JTAGII_GETSYNC_FAIL_GRACEFUL): New constant.
* stk500v2.c (stk500v2_jtagmkII_open): Don't tell anything
anymore when receiving a JTAGII_GETSYNC_FAIL_GRACEFUL from
jtagmkII_getsync(); silently give up (all necessary has been
said already).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@983 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 10:05:09 +00:00
Joerg Wunsch a97f200ff7 Reported by Jason Hecker:
* usbasp.c (libusb_to_errno): Conditionalize some error codes
that apparently are lacking on MinGW.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@982 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-26 05:46:50 +00:00
Joerg Wunsch fda14b69ec Fix warnings.
* ser_avrdoper.c: add <stdlib.h> so exit() is declared.
* usbtiny.c (usbtiny_open): provide an initializer to a
"may be used uninitialized" variable (since GCC could not
fully detect the logic behind).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@981 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-25 19:03:10 +00:00
Joerg Wunsch 65c37a3374 Add a check for FreeBSD's libusb-1.0 compatible library that is found
in libusb.a/.so on FreeBSD 8+.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@980 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-25 18:41:48 +00:00
Joerg Wunsch 46c7bf38ec Submitted by Doug Springer, based on work by
Wolfgang Moser, Ville Voipio, Hannes Weisbach
patch #7486: Patch to add FT2232C/D, FT2232H, FT4232H,
usbvid, usbpid, usbdev for USB support - Based on #7062
* avrftdi.c: New file.
* avrftdi.h: (Ditto.)
* configure.ac: Add check for libftdi.
* config_gram.y: Add AVRFTDI and per-programmer USB string
keywords.
* lexer.l: (Ditto.)
* avrdude.conf.in: Add avrftdi and 2232HIO programmers.
* pgm.h: Add USB parameters.
* Makefile.am: Add avrftdi.c and avrftdi.h.
* AUTHORS: Mention the new authors.
* avrdude.1: Document the changes.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@979 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-25 16:12:30 +00:00
Joerg Wunsch 36642a1269 Allow for the GNU FDL as an alternate option to the existing
documentation license.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@977 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-23 21:12:14 +00:00
Joerg Wunsch ce3000d960 Submitted by Darell Tan:
patch #7244: TPI bitbang implementation
* bitbang.c: Add TPI bitbang stuff.
* bitbang.h: (Ditto.)
* avr.c: (Ditto.)
* avr.h: (Ditto.)
* pgm.c: (Ditto.)
* pgm.h: (Ditto.)
* serbb_posix.c: Wire bitbang_cmd_tpi into the struct pgm.
* serbb_win32.c: (Ditto.)
* par.c: (Ditto.)
* doc/avrdude.texi: Document the TPI bitbang support.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@976 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-23 21:03:36 +00:00