2003-02-14 20:34:03 +00:00
|
|
|
#
|
|
|
|
# avrdude - A Downloader/Uploader for AVR device programmers
|
2004-01-26 06:27:41 +00:00
|
|
|
# Copyright (C) 2003, 2004 Theodore A. Roth <troth@openavr.org>
|
2003-02-14 20:34:03 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2012-11-20 14:03:50 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-02-14 20:34:03 +00:00
|
|
|
#
|
|
|
|
|
2018-01-12 22:07:39 +00:00
|
|
|
# In order to get verbose build messages rather than a summary line
|
|
|
|
# only, either use
|
|
|
|
#
|
|
|
|
# ./configure --disable-silent-rules
|
|
|
|
#
|
|
|
|
# or run make like
|
|
|
|
#
|
|
|
|
# make V=1
|
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
EXTRA_DIST = \
|
|
|
|
avrdude.1 \
|
|
|
|
avrdude.spec \
|
|
|
|
bootstrap
|
2003-02-14 22:19:42 +00:00
|
|
|
|
2003-03-12 02:09:57 +00:00
|
|
|
CLEANFILES = \
|
|
|
|
config_gram.c \
|
|
|
|
config_gram.h \
|
|
|
|
lexer.c
|
|
|
|
|
2011-08-26 12:04:51 +00:00
|
|
|
BUILT_SOURCES = $(CLEANFILES)
|
|
|
|
|
2021-12-10 21:41:26 +00:00
|
|
|
#SUBDIRS = doc
|
|
|
|
#DIST_SUBDIRS = doc
|
2005-02-10 14:54:57 +00:00
|
|
|
|
2012-01-17 20:56:37 +00:00
|
|
|
# . lets build this directory before the following in SUBDIRS
|
|
|
|
SUBDIRS = .
|
|
|
|
# doc comes here, and we want to use the built avrdude to generate the parts list
|
|
|
|
SUBDIRS += @SUBDIRS_AC@
|
2005-02-10 14:54:57 +00:00
|
|
|
DIST_SUBDIRS = @DIST_SUBDIRS_AC@
|
2003-02-26 00:14:54 +00:00
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
AM_YFLAGS = -d
|
|
|
|
|
2003-09-05 04:23:27 +00:00
|
|
|
avrdude_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
|
|
|
|
|
2007-01-25 20:51:11 +00:00
|
|
|
libavrdude_a_CPPFLAGS = -DCONFIG_DIR=\"$(sysconfdir)\"
|
2014-05-16 17:50:40 +00:00
|
|
|
libavrdude_la_CPPFLAGS = $(libavrdude_a_CPPFLAGS)
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2007-01-25 20:51:11 +00:00
|
|
|
avrdude_CFLAGS = @ENABLE_WARNINGS@
|
|
|
|
|
2009-11-04 23:42:16 +00:00
|
|
|
libavrdude_a_CFLAGS = @ENABLE_WARNINGS@
|
2014-05-16 17:50:40 +00:00
|
|
|
libavrdude_la_CFLAGS = $(libavrdude_a_CFLAGS)
|
2007-01-25 20:51:11 +00:00
|
|
|
|
2016-02-17 21:48:37 +00:00
|
|
|
avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBHIDAPI@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ @LIBPTHREAD@ -lm
|
2006-08-11 16:00:12 +00:00
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
bin_PROGRAMS = avrdude
|
|
|
|
|
2007-01-25 20:51:11 +00:00
|
|
|
noinst_LIBRARIES = libavrdude.a
|
2014-05-19 10:01:59 +00:00
|
|
|
lib_LTLIBRARIES = libavrdude.la
|
2007-01-25 20:51:11 +00:00
|
|
|
|
2006-08-18 20:10:20 +00:00
|
|
|
# automake thinks these generated files should be in the distribution,
|
|
|
|
# but this might cause trouble for some users, so we rather don't want
|
|
|
|
# to have them there.
|
|
|
|
#
|
|
|
|
# See
|
|
|
|
#
|
|
|
|
# https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15536
|
|
|
|
#
|
|
|
|
# for why we don't want to have them.
|
|
|
|
dist-hook:
|
|
|
|
rm -f \
|
|
|
|
$(distdir)/lexer.c \
|
|
|
|
$(distdir)/config_gram.c \
|
|
|
|
$(distdir)/config_gram.h
|
|
|
|
|
2007-01-25 20:51:11 +00:00
|
|
|
libavrdude_a_SOURCES = \
|
2003-02-14 20:34:03 +00:00
|
|
|
config_gram.y \
|
|
|
|
lexer.l \
|
2009-02-25 09:39:04 +00:00
|
|
|
arduino.h \
|
|
|
|
arduino.c \
|
2003-02-14 20:34:03 +00:00
|
|
|
avr.c \
|
2003-03-13 03:52:19 +00:00
|
|
|
avr910.c \
|
|
|
|
avr910.h \
|
Provide cached byte-wise read/write API (#1106)
* Provide cached byte-wise read/write API
int avr_read_byte_cached(const PROGRAMMER *pgm, const AVRPART *p, const
AVRMEM *mem, unsigned long addr, unsigned char *value);
int avr_write_byte_cached(const PROGRAMMER *pgm, const AVRPART *p, const
AVRMEM *mem, unsigned long addr, unsigned char data);
int avr_flush_cache(const PROGRAMMER *pgm, const AVRPART *p);
int avr_chip_erase_cached(const PROGRAMMER *pgm, const AVRPART *p);
int avr_reset_cache(const PROGRAMMER *pgm, const AVRPART *p);
avr_read_byte_cached() and avr_write_byte_cached() use a cache if paged
routines are available and if the device memory is EEPROM or flash,
otherwise they fall back to pgm->read_byte() and pgm->write_byte(),
respectively. Byte-wise cached read always gets its data from the cache,
possibly after reading a page from the device memory. Byte-wise cached
write with an address in memory range only ever modifies the cache. Any
modifications are written to the device after calling avr_flush_cache() or
when attempting to read or write from a location outside the address range
of the device memory.
avr_flush_cache() synchronises pending writes to EEPROM and flash with the
device. With some programmer and part combinations, flash (and sometimes
EEPROM, too) looks like a NOR memory, ie, one can only write 0 bits, not 1
bits. When this is detected, either page erase is deployed (eg, with parts
that have PDI/UPDI interfaces), or if that is not available, both EEPROM
and flash caches are fully read in, a pgm->chip_erase() command is issued
and both EEPROM and flash are written back to the device. Hence, it can
take minutes to ensure that a single previously cleared bit is set and,
therefore, this routine should be called sparingly.
avr_chip_erase_cached() erases the chip and discards pending writes() to
flash or EEPROM. It presets the flash cache to all 0xff alleviating the
need to read from the device flash. However, if the programmer serves
bootloaders (pgm->prog_modes & PM_SPM) then the flash cache is reset
instead, necessitating flash memory be fetched from the device on first
read; the reason for this is that bootloaders emulate chip erase and they
won't overwrite themselves (some bootloaders, eg, optiboot ignore chip
erase commands altogether) making it truly unknowable what the flash
contents on device is after a chip erase.
For EEPROM avr_chip_erase_cached() concludes that it has been deleted if a
previously cached EEPROM page that contained cleared bits now no longer
has these clear bits on the device. Only with this evidence is the EEPROM
cache preset to all 0xff otherwise the cache discards all pending writes
to EEPROM and is left unchanged otherwise.
Finally, avr_reset_cache() resets the cache without synchronising pending
writes() to the device.
2022-10-05 21:16:15 +00:00
|
|
|
avrcache.c \
|
2007-01-24 21:07:54 +00:00
|
|
|
avrdude.h \
|
2011-08-25 16:12:30 +00:00
|
|
|
avrftdi.c \
|
|
|
|
avrftdi.h \
|
2013-05-08 17:34:00 +00:00
|
|
|
avrftdi_private.h \
|
2013-05-02 11:06:15 +00:00
|
|
|
avrftdi_tpi.c \
|
|
|
|
avrftdi_tpi.h \
|
2003-11-30 16:42:10 +00:00
|
|
|
avrpart.c \
|
2005-09-18 20:12:23 +00:00
|
|
|
bitbang.c \
|
|
|
|
bitbang.h \
|
2009-10-08 02:05:03 +00:00
|
|
|
buspirate.c \
|
|
|
|
buspirate.h \
|
2003-11-30 15:16:48 +00:00
|
|
|
butterfly.c \
|
|
|
|
butterfly.h \
|
2003-02-14 20:34:03 +00:00
|
|
|
config.c \
|
2015-10-30 23:11:22 +00:00
|
|
|
config.h \
|
2003-02-24 23:13:55 +00:00
|
|
|
confwin.c \
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
crc16.c \
|
|
|
|
crc16.h \
|
2014-01-15 13:34:49 +00:00
|
|
|
dfu.c \
|
|
|
|
dfu.h \
|
2003-02-14 20:34:03 +00:00
|
|
|
fileio.c \
|
2014-01-16 07:57:36 +00:00
|
|
|
flip1.c \
|
|
|
|
flip1.h \
|
2014-01-16 07:34:40 +00:00
|
|
|
flip2.c \
|
|
|
|
flip2.h \
|
2006-01-12 23:13:50 +00:00
|
|
|
freebsd_ppi.h \
|
2012-02-02 19:29:34 +00:00
|
|
|
ft245r.c \
|
|
|
|
ft245r.h \
|
2005-11-25 06:14:06 +00:00
|
|
|
jtagmkI.c \
|
|
|
|
jtagmkI.h \
|
|
|
|
jtagmkI_private.h \
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
jtagmkII.c \
|
|
|
|
jtagmkII.h \
|
|
|
|
jtagmkII_private.h \
|
2012-11-28 22:39:01 +00:00
|
|
|
jtag3.c \
|
|
|
|
jtag3.h \
|
|
|
|
jtag3_private.h \
|
2014-05-19 10:01:59 +00:00
|
|
|
libavrdude.h \
|
2013-01-09 19:23:30 +00:00
|
|
|
linuxgpio.c \
|
|
|
|
linuxgpio.h \
|
2020-09-19 21:32:38 +00:00
|
|
|
linuxspi.c \
|
|
|
|
linuxspi.h \
|
2003-02-14 20:34:03 +00:00
|
|
|
linux_ppdev.h \
|
|
|
|
lists.c \
|
2021-12-28 10:55:12 +00:00
|
|
|
micronucleus.c \
|
|
|
|
micronucleus.h \
|
2003-02-14 20:34:03 +00:00
|
|
|
par.c \
|
|
|
|
par.h \
|
|
|
|
pgm.c \
|
2012-01-31 17:03:43 +00:00
|
|
|
pgm_type.c \
|
2012-08-15 18:34:53 +00:00
|
|
|
pickit2.c \
|
|
|
|
pickit2.h \
|
2013-05-03 22:35:00 +00:00
|
|
|
pindefs.c \
|
2003-02-14 20:34:03 +00:00
|
|
|
ppi.c \
|
|
|
|
ppi.h \
|
2003-02-20 18:18:39 +00:00
|
|
|
ppiwin.c \
|
2005-09-18 20:12:23 +00:00
|
|
|
serbb.h \
|
|
|
|
serbb_posix.c \
|
|
|
|
serbb_win32.c \
|
2006-12-20 23:43:34 +00:00
|
|
|
ser_avrdoper.c \
|
2003-03-13 03:52:19 +00:00
|
|
|
ser_posix.c \
|
|
|
|
ser_win32.c \
|
2006-01-12 23:13:50 +00:00
|
|
|
solaris_ecpp.h \
|
2003-02-14 20:34:03 +00:00
|
|
|
stk500.c \
|
|
|
|
stk500.h \
|
|
|
|
stk500_private.h \
|
Mega-commit to bring in both, the STK500v2 support from Erik
Walthinsen, as well as JTAG ICE mkII support (by me).
Erik's submission has been cleaned up a little bit, mostly to add his
name and the current year to the copyright of the new file, remove
trailing white space before importing the files, and fix the minor
syntax errors in his avrdude.conf.in additions (missing semicolons).
The JTAG ICE mkII support should be considered alpha to beta quality
at this point. Few things are still to be done, like defering the
hfuse (OCDEN) tweaks until they are really required. Also, for
reasons not yet known, the target MCU doesn't start to run after
signing off from the ICE, it needs a power-cycle first (at least on my
STK500).
Note that for the JTAG ICE, I did change a few things in the internal
API. Notably I made the serial receive timeout configurable by the
backends via an exported variable (done in both the Posix and the
Win32 implementation), and I made the serial_recv() function return a
-1 instead of bailing out with exit(1) upon encountering a receive
timeout (currently only done in the Posix implementation). Both
measures together allow me to receive a datastreem from the ICE at 115
kbps on a somewhat lossy PCI multi-UART card that occasionally drops a
character. The JTAG ICE mkII protocol has enough of safety layers to
allow recovering from these events, but the previous code wasn't
prepared for any kind of recovery. The Win32 change for this still
has to be done, and the traditional drivers need to be converted to
exit(1) upon encountering a timeout (as they're now getting a -1
returned they didn't see before in that case).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@451 81a1dc3b-b13d-400b-aceb-764788c761c2
2005-05-10 19:17:12 +00:00
|
|
|
stk500v2.c \
|
|
|
|
stk500v2.h \
|
|
|
|
stk500v2_private.h \
|
2006-09-19 22:27:30 +00:00
|
|
|
stk500generic.c \
|
|
|
|
stk500generic.h \
|
2021-12-28 16:57:14 +00:00
|
|
|
teensy.c \
|
|
|
|
teensy.h \
|
2011-08-24 07:40:48 +00:00
|
|
|
tpi.h \
|
2006-09-10 20:41:00 +00:00
|
|
|
usbasp.c \
|
|
|
|
usbasp.h \
|
2021-12-08 12:36:58 +00:00
|
|
|
serialupdi.c \
|
|
|
|
serialupdi.h \
|
|
|
|
updi_constants.h \
|
|
|
|
updi_link.c \
|
|
|
|
updi_link.h \
|
|
|
|
updi_state.c \
|
|
|
|
updi_state.h \
|
|
|
|
updi_readwrite.c \
|
|
|
|
updi_readwrite.h \
|
|
|
|
updi_nvm.c \
|
|
|
|
updi_nvm.h \
|
2006-01-12 23:13:50 +00:00
|
|
|
usbdevs.h \
|
2016-02-20 22:50:13 +00:00
|
|
|
usb_hidapi.c \
|
2007-01-24 22:43:46 +00:00
|
|
|
usb_libusb.c \
|
2007-10-29 18:03:02 +00:00
|
|
|
usbtiny.h \
|
|
|
|
usbtiny.c \
|
2011-08-26 20:22:09 +00:00
|
|
|
update.c \
|
|
|
|
wiring.h \
|
2021-11-22 21:35:26 +00:00
|
|
|
wiring.c \
|
|
|
|
xbee.h \
|
|
|
|
xbee.c
|
2014-05-16 17:50:40 +00:00
|
|
|
libavrdude_la_SOURCES = $(libavrdude_a_SOURCES)
|
|
|
|
libavrdude_la_LDFLAGS = -version-info 1:0
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2014-05-19 10:01:59 +00:00
|
|
|
include_HEADERS = libavrdude.h
|
|
|
|
|
2007-01-25 20:51:11 +00:00
|
|
|
avrdude_SOURCES = \
|
2009-02-25 08:00:14 +00:00
|
|
|
main.c \
|
2022-01-03 22:20:31 +00:00
|
|
|
whereami.c \
|
|
|
|
whereami.h \
|
2022-08-31 10:31:58 +00:00
|
|
|
avrintel.c \
|
|
|
|
avrintel.h \
|
2022-07-26 23:18:06 +00:00
|
|
|
developer_opts.c \
|
|
|
|
developer_opts.h \
|
|
|
|
developer_opts_private.h \
|
2009-02-25 08:00:14 +00:00
|
|
|
term.c \
|
|
|
|
term.h
|
2007-01-25 20:51:11 +00:00
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
man_MANS = avrdude.1
|
|
|
|
|
|
|
|
sysconf_DATA = avrdude.conf
|
|
|
|
|
2003-02-25 00:57:27 +00:00
|
|
|
install-exec-local: backup-avrdude-conf
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
distclean-local:
|
|
|
|
rm -f avrdude.conf
|
|
|
|
|
2003-02-25 00:57:27 +00:00
|
|
|
# This will get run before the config file is installed.
|
|
|
|
backup-avrdude-conf:
|
|
|
|
@echo "Backing up avrdude.conf in ${DESTDIR}${sysconfdir}"
|
|
|
|
@if test -e ${DESTDIR}${sysconfdir}/avrdude.conf; then \
|
|
|
|
cp -pR ${DESTDIR}${sysconfdir}/avrdude.conf \
|
|
|
|
${DESTDIR}${sysconfdir}/avrdude.conf.bak; \
|
|
|
|
fi
|
2014-05-19 08:46:52 +00:00
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|