Commit Graph

2291 Commits

Author SHA1 Message Date
Joerg Wunsch 51da59044e 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/avrdude@1195 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 18:18:15 +00:00
Joerg Wunsch 088ae8196a 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/avrdude@1194 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 17:56:01 +00:00
Joerg Wunsch 65aa87c714 Add a missing pair of braces.
Thanks to Joakim Lubeck for spotting this.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1193 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 09:57:09 +00:00
Joerg Wunsch 7750c81463 Add -vvv trace code to the non-TPI functions in USBasp, too.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1192 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-02 06:43:06 +00:00
Joerg Wunsch 56fe49f22a * 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/avrdude@1191 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-01 20:54:56 +00:00
Joerg Wunsch 6483e65ab1 Add more trace output, by now only to the TPI functions.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1190 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-01 20:48:17 +00:00
Joerg Wunsch ab68c47c7f Add -vvvv trace output to usbasp_transmit().
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1189 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-08-31 07:32:18 +00:00
Joerg Wunsch 056b5f6e77 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/avrdude@1188 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-08-30 06:49:40 +00:00
Joerg Wunsch 3879e70713 * 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/avrdude@1187 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-07-11 21:43:11 +00:00
Rene Liebscher 6f8e643ba0 reverted accidently checked in debug setting
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1186 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-20 20:45:12 +00:00
Rene Liebscher 1f8462ca58 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/avrdude@1185 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-20 20:11:49 +00:00
Rene Liebscher da3961e155 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/avrdude@1184 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-06-19 17:40:32 +00:00
Joerg Wunsch 46f7b6b470 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/avrdude@1183 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 16:23:55 +00:00
Joerg Wunsch 203fe6d14a Wrap long lines.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1182 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 16:09:55 +00:00
Joerg Wunsch 729ef4df18 Try various compiler names until one succeeds.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1181 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-17 14:02:45 +00:00
Rene Liebscher 22477da39e * 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/avrdude@1180 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 17:11:35 +00:00
Joerg Wunsch d0625e8fec Add option -l logfile to redirect diagnostic messages to a logfile rather
than stderr.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1179 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 09:11:32 +00:00
Joerg Wunsch 3756a42db1 Break long lines.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1178 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-16 08:11:19 +00:00
Rene Liebscher 8f9bc91d53 * 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/avrdude@1177 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 20:05:02 +00:00
Rene Liebscher 0fc17a60a6 removed some debug code from file ft245r.c
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1176 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 19:03:58 +00:00
Rene Liebscher 7ff877e067 * 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/avrdude@1175 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-15 18:55:19 +00:00
Joerg Wunsch c65f6cbe6c Add a small script to cross-compile a Win32 binary under Unix.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1174 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-14 20:35:41 +00:00
Joerg Wunsch 6599064e4d Bump version to 6.0rc1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1173 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-08 17:35:28 +00:00
Joerg Wunsch 55d25c0fe9 Add forgotten avrftdi_private.h.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1172 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-08 17:34:00 +00:00
Hannes Weisbach 93e940b60a 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/avrdude@1171 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:13 +00:00
Hannes Weisbach 26ab40f3a5 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/avrdude@1170 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-07 08:50:06 +00:00
Rene Liebscher 4fc72c7d58 * 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/avrdude@1169 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 19:21:38 +00:00
Hannes Weisbach c72b97d2a8 avrftdi_tpi.[c|h]: integrate avr_tpi_[program_enable,chip_erase]()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1168 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:50:42 +00:00
Hannes Weisbach be385b2b48 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/avrdude@1167 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:49:26 +00:00
Hannes Weisbach 5b7952ade8 avr.c: Add generic TPI chip erase function
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1166 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:43:47 +00:00
Hannes Weisbach 9344a2ea8d 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/avrdude@1165 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 12:05:27 +00:00
Hannes Weisbach 0efa2518e7 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/avrdude@1164 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:15 +00:00
Hannes Weisbach 556b3eddb3 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/avrdude@1163 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 11:48:08 +00:00
Joerg Wunsch 8c151664c9 Include "ac_cfg.h" before testing for HAVE_* macros.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1162 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-06 09:54:27 +00:00
Rene Liebscher a816d19d02 * 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/avrdude@1161 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-05 13:35:35 +00:00
Rene Liebscher 2d8c584c8c 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/avrdude@1160 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 22:35:00 +00:00
Hannes Weisbach 90b0a233ef 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/avrdude@1159 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 13:01:20 +00:00
Hannes Weisbach 7e63e1babf 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/avrdude@1158 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-03 12:58:15 +00:00
Hannes Weisbach 32a1fe42e3 avrftdi_private.h: Update forward declaration
avrftdi_print() is now avrftdi_log

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

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1155 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:30 +00:00
Hannes Weisbach aca6384fe7 Updates NEWS file with avrftdi's TPI support
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1154 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:22 +00:00
Hannes Weisbach d02dc96ab5 avrftdi_private.h: Fix header include order in windows
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1153 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:16 +00:00
Hannes Weisbach e9944c32c0 avrftdi.c: Fix wrong loop invariant in write_flush()
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1152 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:07 +00:00
Hannes Weisbach 6a4d3d3964 Adds TPI-support for FTDI-based programmers with MPSSE
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1151 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:07:00 +00:00
Hannes Weisbach 923aa2edab avrftdi: Set guard time to fixed 2 bits.
avrftdi_private.h, avrftdi.c: remove pdata->guard_bits refernces, since
they are no longer needed
avrftdi_tpi.c: Use fixed guard time of 2 bits, this gives 16 bits per
frame. tpi_byte2frame() and tpi_frame2byte() functions are now
symmetrical and extraction of received data in avrftdi_read_byte is less
complicted. Write the new guard time to the TPI in
avrftdi_tpi_program_enable().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1150 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:52 +00:00
Hannes Weisbach 27f7e6e5a4 avrftdi_tpi.c: Adds avrftdi_tpi_disable()
In this function the NVM enable bit in TPISR is written to zero, like
described in AVR918. The reset line is released in avrftdi_close().

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1149 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:45 +00:00
Hannes Weisbach 2ce37b2895 avrftdi_tpi.c: Simplify break command by sending 16 zero bits
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1148 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:37 +00:00
Hannes Weisbach 3c17593867 tpi.h: Adds definition of TPI Identification code
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1147 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:30 +00:00
Hannes Weisbach a6b33b8b22 avrftdi_tpi.c: Move to new avrftdi log infrastructure
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1146 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-05-02 11:06:22 +00:00