Commit Graph

1150 Commits

Author SHA1 Message Date
Joerg Wunsch 46399cbecf Remove the erase cycle counter (options -y / -Y).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1203 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 20:13:37 +00:00
Joerg Wunsch f2a859946a bug #39691 Buffer overrun when reading EEPROM byte with JTAGICE3
* jtag3.c (jtag3_initialize): initialize the eeprom_pagesize
private attribute so the page cache will actually be usable



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1202 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 11:58:31 +00:00
Joerg Wunsch 2b73747187 bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0
* jtag3.c (jtag3_read_byte, jtag3_write_byte): Correctly apply the
relevant part of mem->offset as the address to operate on.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1201 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 11:32:47 +00:00
Joerg Wunsch e1337cde63 Fix all "unused variable" warnings that were encountered.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1200 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-03 11:05:13 +00:00
Joerg Wunsch e242f4acc1 Submitted by Travis Griggs:
bug #38307: Can't write usersig of an xmega256a3
* stk500v2.c (stk600_xprog_page_erase): allow erasing the usersig space.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1199 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 21:10:44 +00:00
Joerg Wunsch 951ee532fd Submitted by Robert Niemi:
bug #35800: Compilation error on certain systems if parport is disabled
* linux_ppdev.h: Conditionalize inclusion of <linux/parport.h> and
<linux/ppdev.h> on HAVE_PARPORT




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1198 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 20:53:12 +00:00
Joerg Wunsch ae18160bc1 bug #39794: warnings when building avrdude 6.0rc1 under CentOS 6.4
* pickit.c (usb_open_device): Use %p rather than %X to print "handle"
which is a pointer
* jtag3.c (jtag3_initialize): Initialize "flashsize" to be sure it
proceeds with a valid value.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1197 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 20:30:09 +00:00
Joerg Wunsch 1e42dde472 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@1196 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 20:22:53 +00:00
Joerg Wunsch 80dcdfc9ea bug #38023: avrdude doesn't return an error code when attempting
to upload an invalid Intel HEX file
* fileio.c (ihex2b): Turn the "No end of file record found" warning
into an error if no valid record was found at all.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1195 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 18:18:15 +00:00
Joerg Wunsch 95cace0939 Submitted by Claus-Justus Heine:
bug #38713: Compilation of the documentation breaks with texinfo-5
* doc/avrdude.texi: Turn @itemx into @item, add @headitem to STK600
Routing/Socket card table



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1194 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 17:56:01 +00:00
Joerg Wunsch d6c362d31c Add a missing pair of braces.
Thanks to Joakim Lubeck for spotting this.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1193 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 09:57:09 +00:00
Joerg Wunsch 33ac0622fa Add -vvv trace code to the non-TPI functions in USBasp, too.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1192 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 06:43:06 +00:00
Joerg Wunsch f747521b39 * usbasp.c (usbasp_tpi_paged_load): Calculate correct
buffer address.
* usbasp.c (usbasp_tpi_paged_write): Calculate correct
buffer address; don't issue a SECTION_ERASE command for
each page (a CHIP_ERASE has been done before anyway);
remove the code that attempted to handle partial page
writes, as all writes are now done with a full page.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1191 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-01 20:54:56 +00:00
Joerg Wunsch 3ec648749d Add more trace output, by now only to the TPI functions.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1190 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-01 20:48:17 +00:00
Joerg Wunsch c5f714342b Add -vvvv trace output to usbasp_transmit().
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1189 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-08-31 07:32:18 +00:00
Joerg Wunsch b47607549e bug #39893: Verification failure with AVRISPmkII and Xmega
* stk500v2.c (stk600_xprog_page_erase): Fix argument that is
passed to stk600_xprog_memtype()



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1188 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-08-30 06:49:40 +00:00
Joerg Wunsch 858a800f5d * fileio.c (elf2b): replace elf_getshstrndx() by
elf_getshdrstrndx() as the former one is deprecated



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1187 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-07-11 21:43:11 +00:00
Rene Liebscher a8117f20d5 reverted accidently checked in debug setting
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1186 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-20 20:45:12 +00:00
Rene Liebscher 10caeca025 check more error codes, fixed some leftover parts which still used MPSSE even when using bitbanging, reduced blocksize to get a more stable behaviour of bitbanging
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1185 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-20 20:11:49 +00:00
Rene Liebscher da9c2fe1c8 use bitbanging on ftdi mpsse when wrong pins are used
* avrftdi.c, avrftdi_private.h: added additional pin check and bitbanging fallback
	* pindefs.[ch]: added a flag to enable/disable output
	* ft245r.c: changes because of added flag above

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1184 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-19 17:40:32 +00:00
Joerg Wunsch 021240ac3c Submitted by "Malte" and John McCorquodale:
patch #7876 JTAGICE mkII fails to connect to attiny if debugwire
is enabled AND target has a very slow clock
* jtagmkII.c (jtagmkII_getsync): When leaving debugWIRE mode
temporarily, immediately retry with ISP, rather than leaving.
* stk500v2 (stk500v2_program_enable): Implemented similar logic
for the JTAGICE3.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1183 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 16:23:55 +00:00
Joerg Wunsch efbf84950e Wrap long lines.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1182 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 16:09:55 +00:00
Joerg Wunsch 1569cd8b8d Try various compiler names until one succeeds.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1181 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 14:02:45 +00:00
Rene Liebscher f2bcdc87b8 * configure.ac: reactivate check for TYPE_232H, which does not exist in libftdi < 0.20
* avrftdi*.*: changed include check for libftdi/libusb, deactivate 232H if not available
* ft245r.c: changed include check for libftdi/libusb

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1180 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 17:11:35 +00:00
Joerg Wunsch 58dd75556f Add option -l logfile to redirect diagnostic messages to a logfile rather
than stderr.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1179 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 09:11:32 +00:00
Joerg Wunsch b9a400a34c Break long lines.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1178 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 08:11:19 +00:00
Rene Liebscher f11db218a7 * avrftdi*.*: accept also old libftdi (0.20 still works with it), added powerup to initialize
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1177 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 20:05:02 +00:00
Rene Liebscher d201c4d11a removed some debug code from file ft245r.c
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1176 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 19:03:58 +00:00
Rene Liebscher 9ae148ffbe * configure.ac: if both found libftdi and libftdi1 use only libftdi1
* avrdude.conf.in: fixed buff pins of avrftdi programmers (low active buffer need now inverted numbers)
	* avrftdi*.*: accept also old libftdi (0.20 still works with it), added powerup to initialize
	* ft245r.c: accept libftdi1, code cleanup and make it more similar to avrfdti (os they might be merged someday)

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1175 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 18:55:19 +00:00
Joerg Wunsch 065d688a8f Add a small script to cross-compile a Win32 binary under Unix.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1174 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-14 20:35:41 +00:00
Joerg Wunsch 19880def06 Bump version to 6.0rc1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1173 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-08 17:35:28 +00:00
Joerg Wunsch 724f44c234 Add forgotten avrftdi_private.h.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1172 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-08 17:34:00 +00:00
Hannes Weisbach 9e81c10f08 avrftdi: add pgm->power[up|down], fix pgm->enable|disable
avrftdi.c: add pgm->power[up|down] functions and fill
pgm->enable|disable with proper functionality, as suggested by
rliebscher.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1171 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:13 +00:00
Hannes Weisbach 62ee4ec3c5 avrftdi: apply patch by rliebscher.
Use pin_checklist[] of size N_PINS instead N_PINS - 1, to avoid future
problems. Also remove pins_check from set_pin; instead use mask[0] == 0
to check wether to do something or not.

avrftdi_private.h: Change size of pin_checklist[] to N_PINS.
avrftdi.c: Adapt code to new size of pin_checklist. Remove pins_check
from set_pin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1170 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:06 +00:00
Rene Liebscher 5e06d73fc2 * pindefs.h: use unsigned int if stdint.h is not available and UINT_MAX is 0xffffffff
otherwise use unsinged long
* ft245r.c: added support for more pin functions led, vcc, buff

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1169 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 19:21:38 +00:00
Hannes Weisbach 272e78ac00 avrftdi_tpi.[c|h]: integrate avr_tpi_[program_enable,chip_erase]()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1168 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:50:42 +00:00
Hannes Weisbach 2f6ad9c3ed avr.c: Adds avr_tpi_program_enable
Generic function enabling external programming on TPI devices. This
function sets the required guard time (which is passed in as parameter),
checks the TPI identification register, writes SKEY command + SKEY, and
finally polls the NVMEN bit in TPISR.

avr.h: Add prototype definitions of avr_tpi_program_enable() and
avr_tpi_chip_erase().
avrftdi_tpi.c: Removes tpi_skey_cmd array, containing the SKEY command
and the SKEY bytes.
tpi.h: Adds tpi_skey_cmd array, containing the SKEY command and the SKEY
bytes, but in the reverse order of tpi_skey.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
Hannes Weisbach 716fbbfe17 avr.c: Add generic TPI chip erase function
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1166 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:43:47 +00:00
Hannes Weisbach 2ef3c19545 avrftdi.c: Fail on wrong pin configuration
also change error return value of set_pin from 1 to -1.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1165 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:05:27 +00:00
Hannes Weisbach ca81aeb139 avrftdi: Change to new 0-based pin definitions
avrdude.conf.in: Change all programmers' pin definitions to 0-based
avrftdi.c: incorporate new 0-based pindef infrastructure
avrftdi_private.h: Add pin_checklist_t to avrftdi_t for runtime pin
checking in pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1164 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:15 +00:00
Hannes Weisbach 548e8bef49 avrftdi: Use pgm->setpin instead of pgm->cookie->set_pin
avrftdi.c: remove set_pin init, add pgm->setpin init
avrftdi_private.h: remove avrftdi_t->set_pin member
avrftdi_tpi.c: change avrftdi_t->set_pin calls to pgm->setpin.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1163 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:08 +00:00
Joerg Wunsch 5729bdf698 Include "ac_cfg.h" before testing for HAVE_* macros.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1162 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 09:54:27 +00:00
Rene Liebscher 21a122a8f6 * main.c: revert to rev 1159 (doing pgm_display after pgm_open)
* avrpart.[ch]: moved avr_pin_name to pindefs.[ch]
* pgm.c: moved pins_to_str to pindefs.[ch], added initialization of 
          new pin definitions in pgm_new()
* pindefs.[ch]: added moved functions from other files, added a lot of 
          documentation, reformatted files using astyle to have consistent spacing,
          added a new generic check function for pins
* ft245r.c: used new generic pin check function

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1161 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-05 13:35:35 +00:00
Rene Liebscher bb0092eb4e Create new pin definition data structures to support 0-based pin numbers, and mixed inverse/non-inverse pin lists.
* avrftdi.c,buspirate.c,linuxgpio.c,par.c,serbb_*.c: added function call 
          to fill old pinno entries from new pin definitions.
	* pindefs.[hc]: added data struct and helper functions for new pin definitions
	* avrdude.conf.in: pins in entries using ftdi_syncbb are now 0-based
	* config_gram.y: allow combinations of inverted and non-inverted pins in pin lists
	* ft245r.c: reworked to work directly with the new pin definitions,
          pins are now 0-based, inverse pins are supported, buff is supported
	* pgm.[ch]: added new pin definitions field to programmer structure, 
          adapted pin display functions

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1160 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 22:35:00 +00:00
Hannes Weisbach e72e92f027 avrftdi_tpi.c: Remove set_pin() to set MOSI high
This is not necessary any more, because the "frame" ends in logic 1, so
the pin is high anyway and the MPSSE keeps the pin value as long as it
is idle. Setting the pin low would cause the TPI physical layer in the
AVR part to detect a collision.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
Hannes Weisbach 1d29bd71df avrftdi_tpi.c: Update I/O to pgm->cmd_tpi
All I/O of avrftdi_tpi is done in terms of pgm->cmd_tpi() calls instead
of calling avrftdi_tpi_[read,write]_byte() functions directly.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
Hannes Weisbach 171be6ed47 avrftdi_private.h: Update forward declaration
avrftdi_print() is now avrftdi_log

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1157 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:55:24 +00:00
Hannes Weisbach 1885f8ba84 avrftdi: move logging defines to avrftdi_private.h
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1156 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:37 +00:00
Hannes Weisbach 068c6ca9cc avr.c: Fix avr_tpi_poll_nvmbsy() polling returned data instead return
code

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:30 +00:00
Hannes Weisbach ce473c01d9 Updates NEWS file with avrftdi's TPI support
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1154 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:22 +00:00