Commit Graph

24 Commits

Author SHA1 Message Date
joerg_wunsch 8fdf4d4071 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
rliebscher 751b96182c 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 097ca1468f 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
rliebscher 4976fcf88e 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
rliebscher fbb740ffdf * 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
rliebscher 9ccde79fde 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 1c7843a191 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
joerg_wunsch 95a42e16d5 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 763f49b4fa 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 e1d8d6a5e2 Add <stdint.h> so this actually compiles again.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@965 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-08-12 15:56:21 +00:00
fischl fc589638df added TPI support for USBasp (patch #7440)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@961 81a1dc3b-b13d-400b-aceb-764788c761c2
2011-05-28 07:35:40 +00:00
springob 20a65eeeb8 * usbasp: replaced exit statements by return statements
* usbasp: check valid handle on usbasp_close() call


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@943 81a1dc3b-b13d-400b-aceb-764788c761c2
2010-04-25 12:36:36 +00:00
springob 6faf7bad31 * autodetection of libusb-1.0 added (for 64 bit windows 7 support)
* libusb-1.0 is used directly instead of libusb v0.1 when detected
* nibobee vid/pid added to usbasp programmer


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@941 81a1dc3b-b13d-400b-aceb-764788c761c2
2010-03-12 18:27:56 +00:00
fischl 6a17d2ca34 bug #28520: Programming with USBasp with low clock speed fails
* usbasp.c: Change blocksize depending on sck frequency to avoid usb transmition timeouts.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@897 81a1dc3b-b13d-400b-aceb-764788c761c2
2010-01-08 18:33:23 +00:00
fischl 17b9ad4f64 Based on patch #6484 commited by Jurgis Brigmanis:
* usbasp.c: added software control for ISP speed
* usbasp.h: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@815 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-02-28 13:10:47 +00:00
joerg_wunsch f55a48ea3b Fix a bunch of warnings.
* avr910.c (avr910_paged_load): possible unitialized use of
rd_size
* jtagmkI.c (jtagmkI_initialize): pointer signedness mixup
* jtagmkII.c (jtagmkII_print_parms1): propagate const'ness
of parameter
* usbasp.c (usbasp_transmit): poiner signedness mixup


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@775 81a1dc3b-b13d-400b-aceb-764788c761c2
2008-07-25 21:14:43 +00:00
joerg_wunsch 7d70684811 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
fischl c3d9d97ee1 usbasp.c: Added long addresses to support devices with more than 64kB (bug #20558)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@746 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-07-24 16:43:25 +00:00
fischl 1af6247869 usbasp.c: return error if communication with target isn't possible.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@729 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-02-02 16:27:49 +00:00
joerg_wunsch 817a1ce552 safemode.c: Obtain progname from avrdude.h rather than trying to roll our
own (duplicate) copy of it.

other files: Constify char pointers.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@725 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-30 13:41:54 +00:00
joerg_wunsch 1cae809b9b Something I always wanted to do: replace all those private "extern"
declarations in each file by a central header file "avrdude.h".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@721 81a1dc3b-b13d-400b-aceb-764788c761c2
2007-01-24 21:07:54 +00:00
joerg_wunsch 351f329ec8 Replace the fallback of avr_read_byte() and avr_write_byte() to
avr_read_byte_default() and avr_write_byte_default (resp.) by directly
calling the latter functions from within all programmers that don't
implement their own read_byte()/write_byte() methods.  In turn, make the
read_byte() and write_byte() methods mandatory, and the cmd() method
(direct ISP command) optional instead (it's effectively mandatory for
any programmer using avr_read_byte_default()/avr_write_byte_default()
though).  Remove all the pointless cmd() method stubs from those programmers
that don't need it.

Eliminate avr_read_byte() as it was now completely identical to
pgm->read_byte().


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@684 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-20 15:04:09 +00:00
joerg_wunsch 8b44b1e37a Submitted by Thomas Fischl:
* usbasp.c: Check for USBasp with new as well as old VID/PID
pair, warn the user about upgrading the firmware in case an
old one has been found.
* usbasp.h: Add new VID/PID.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@661 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-17 20:35:36 +00:00
joerg_wunsch 333be851b9 Contributed by Thomas Fischl: add support for USBasp.
patch #4686: Add support for USBasp, a simple USB programmer
* usbasp.c: New file, implement the USBasp driver.
* usbasp.h: New file, interface declarations for USBasp.
* Makefile.am: Wire the new files into the build.
* avrdude.conf.in: Add the usbasp programmer entry.
* config_gram.y: Add the usbasp token.
* lexer.l: (Ditto.)
* avrdude.1: Document the USBasp programmer.
* doc/avrdude.texi: (Ditto.)


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@656 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-09-10 20:41:00 +00:00