Commit Graph

26 Commits

Author SHA1 Message Date
Joerg Wunsch 7c554b0035 bug #55734: USBtiny programming of ATmega328p broken by Patch #9278
* usbtiny.c (usbtiny_initialize): undo change from patch #9728



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1459 81a1dc3b-b13d-400b-aceb-764788c761c2
2021-11-07 15:44:18 +00:00
Joerg Wunsch 2c4f9d23b4 patch #9732: usbtiny_paged_load overflows buffer e.g. when reading EEPROM
* usbtiny.c (usbtiny_paged_load, usbtiny_paged_write): ensure chunk
does not overflow memory area

Submitted by Joel Ray Holveck




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1444 81a1dc3b-b13d-400b-aceb-764788c761c2
2020-09-18 21:16:13 +00:00
Joerg Wunsch bb7be5efe6 Submitted by Martino Facchin:
patch #9728: Fix UsbTiny programmer
* usbtiny.c (usbtiny_initialize): Only consider
pgm->program_enable successful if returning 0




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1429 81a1dc3b-b13d-400b-aceb-764788c761c2
2019-01-05 23:16:11 +00:00
Joerg Wunsch 2b9108b58f Submitted by David Mosberger-Tang
patch #8924: Enable TPI for usbtiny
* usbtiny.c: Extend to handle TPI targets
* configure.ac: Probe for <netinet/in.h>



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1412 81a1dc3b-b13d-400b-aceb-764788c761c2
2018-01-12 23:31:35 +00:00
Axel Wachtler c6788bd795 added verbose level in avrdude_message()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1321 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-06-13 20:07:40 +00:00
Joerg Wunsch d09bc2e1fb Join the former "public" header files (avr.h avrpart.h pindefs.h
serial.h fileio.h safemode.h update.h pgm_type.h config.h confwin.h
lists.h) into a single header that can be included by anyone wanting
to link against the library.

Adapt everything to cope with this situation.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1311 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-05-19 10:01:59 +00:00
Axel Wachtler eb5fcb581f Exchange of fprintf(stderr, ...) with avrdude_message(...).
This change was made for the shared library, since library functions
should not write to std-streams directly. Instead avrdude_message()
has to be implemented by the library user. For the avrdude application
this function is implemented in main.c.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1305 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-05-18 08:41:46 +00:00
Joerg Wunsch 343330fddd Turn the usbpid parameter of the programmer into a list of PIDs. Make
the JTAGICE3 programmer handle a list of PIDs, by trying each of them
in sequence.  Use a single, central jtag3_open_common() function to
handle the common code of all jtag3_open_* functions.  Centralize all
USB VID/PID definitions in usbdevs.h.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1283 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-02-27 13:06:03 +00:00
Joerg Wunsch db1cce8bf4 bug #39794: warnings when building avrdude 6.0rc1 under CentOS 6.4
* buspirate.c: Turn the "cmd" argument of the various methods into
a "const unsigned char *"; while doing this, declare all arrays being
passed as arguments to be pointers rather than arrays, as the latter
obfuscates the way arrays are being passed to a callee in C.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1196 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 20:22:53 +00:00
Rene Liebscher 6351fa6b0a patch #7932 Read USBtiny VID and PID from avrdude.conf if provided.
* avrdude.conf.in: added usbpid, usbvid to usbtiny
	* usbtiny.[ch]: use usbpid, usbpid if provided in config file

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1134 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-01-29 18:33:34 +00:00
Joerg Wunsch 147137a218 Replace outdated FSF postal address by a reference to
the GPL info on their website.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1107 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-11-20 14:03:50 +00:00
Joerg Wunsch bde3c841e5 * usbtiny.c (usbtiny_paged_load, usbtiny_paged_write):
fix breakage introduced by the recent page handling reorg;
it used to cause an infinite loop



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1091 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-06-07 14:07:17 +00:00
Rene Liebscher c1095de822 Parser does not need to know all programmer types now, new programmers
will update only the table in pgm_type.c.
  * config_gram.y, lexer.l: removed programmer type keywords,
    use now locate_programmer_type() function
  * pgm_type.[ch]: added new files for table of programmer types
  * main.c: allow list of programmer types by -c ?type
  * avrdude.conf.in: changed all type keywords to quoted strings
  * doc/avrdude.texi: changed description of type definition, list
    of valid types is now included from generated file
  * doc/Makefile.am: generate list of programmer types for doc
  * all programmers [hc]: add xxx_desc string for description of programmer


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1051 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-31 17:03:43 +00:00
Joerg Wunsch a68791b705 Add a connection_type attribute to each programmer, rather than
trying to hard-code the default port name in main.c.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1047 81a1dc3b-b13d-400b-aceb-764788c761c2
2012-01-30 17:08:48 +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
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 d742827da1 Mega-commit to bring in memory tagging.
Each memory image byte is now tagged as it's being read from a file.
Only bytes read from a file will be written or verified (modulo page
granularity requirements).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1007 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-09-14 21:49:42 +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 31e69c7ecd Submitted by Grygoriy Fuchedzhy:
bug #31779: Add support for addressing usbtinyisp with -P option
* usbtiny.c (usbtiny_open): Add logic to distinguish multiple USBtinyISP
programmers by their bus:device tuple.
* doc/avrdude.texi: Document the new functionality.
* avrdude.1: (Ditto.)




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@974 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-17 15:24:09 +00:00
Joerg Wunsch d427db8e3a Replace printf() by fprintf(stderr)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@939 81a1dc3b-b13d-400b-aceb-764788c761c2
2010-03-05 08:28:42 +00:00
Joerg Wunsch 8b35dc3620 More fixes for Solaris, including fixes for the Sunpro compiler:
* avr.h: Remove stray semicolon.
* configure.ac: Add check for predefined types uint_t and ulong_t.
* confwin.c: Include "avrdude.h" on top to avoid empty translation
unit warning.
* ppwin.c: (Ditto.)
* ser_win32.c: (Ditto.)
* serbb_win32.c: (Ditto.)
* jtagmkII.c (jtagmkII_recv): remove unreachable "return".
* stk500.c (stk500_initialize): (Ditto.)
* par.c: Test for both, __sun__ and __sun to see whether we are
being compiled on Solaris.
* ppi.c: (Ditto.)
* stk500v2.c: Implement the DEBUG and DEBUGRECV macros in a way
that is compatible with the ISO C99 standard.
* usbtiny.c: Only typedef uint_t and ulong_t if they have not
been found already by the autoconf checks.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@804 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-02-23 22:04:57 +00:00
Joerg Wunsch 0c29ebc694 Replace all but one (very unlikely to trigger) exit(1)
by return -1.  exit(1) from a library function is not going to make
many friends upstream (in particular the day someone uses that as
part of a GUI frontend).


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@800 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-02-18 20:20:56 +00:00
Joerg Wunsch 92b50e0e12 Submitted by Dick Streefland:
patch #6749: make reading from the USBtinyISP programmer more robust

Add code to retry failed communication attempts.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@799 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-02-18 20:10:32 +00:00
Joerg Wunsch 4f316d8f99 Submitted by limor <limor@ladyada.net>
* usbtiny.c (usbtiny_cmd): Replace sizeof() by a fixed constant
4 for the result array, because otherwise it would take the size
of a pointer which miserably fails on 64-bit machines.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@787 81a1dc3b-b13d-400b-aceb-764788c761c2
2008-11-06 09:47:37 +00:00
Joerg Wunsch 58a3d35757 main.c, pgm.c, pgm.h: Add setup and teardown hooks to the programmer
definition.  If present, call the setup hook immediately after finding
the respective programmer object, and schedule the teardown hook to be
called upon exit.  This allows the programmer implementation to
dynamically allocate private programmer data.

avr910.c, butterfly.c, jtagmkI.c, jtagmkII.c, stk500v2.c, usbasp.c,
usbtiny.c: Convert static programmer data into dynamically allocated
data.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@764 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-11-07 20:36:12 +00:00
Joerg Wunsch 190a4b87e8 Submitted by <ladyada@gmail.com>:
Patch #6233: Add support for USBtinyISP programmer
* usbtiny.c: New file.
* usbtiny.h: (Ditto.)
* Makefile.am: Include usbtiny into the build.
* avrdude.conf.in: (Ditto.)
* config_gram.y: (Ditto.)
* lexer.l: (Ditto.)
* avrdude.1: Document the usbtiny support.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@749 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-10-29 18:03:02 +00:00