* 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
* 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
* ft245r.[ch]: new programmer type implementation
* configure.ac: add pthread as link library
* avrdude.conf.in: added some new programmers
* Makefile.am: added new source files to compile
* pindefs.h: change PIN_MASK, PIN_INVERSE to highest bit of unsigned int
* pgm.[ch]: added generic function to print pin assignments (taken from par.c)
* par.c: moved pin assigment print function to pgm.c
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1055 81a1dc3b-b13d-400b-aceb-764788c761c2
* avrdude.conf.in: updated documentation comment and some programmers
have now parents
* config_gram.y: initpgm will now called at first use of programmer
in main. parser sets only the function pointer in the pgm structure.
Pin and pin lists definitions can now be empty to remove the parents
setting.
* doc/avrdude.texi: updated documentation
* main.c: added call to pgm->initpgm after locate_programmer
* pgm.[hc]: added field initpgm in structure, added function pgm_dup
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1045 81a1dc3b-b13d-400b-aceb-764788c761c2
* 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
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
the programmer backend.
jtagmkII.c: Implement the extended parameter jtagchain=
to support JTAG daisy-chains.
avrdude.1, doc/avrdude.texi: Document all of the above.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@761 81a1dc3b-b13d-400b-aceb-764788c761c2
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
list_parts() and list_programmers() functions into general list
iteration functions that call a caller-supplied callback for each
element. Implement list_parts() and list_programmers() as private
functions in main.c based on that approach.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@724 81a1dc3b-b13d-400b-aceb-764788c761c2
- Make all internal functions "static".
- Make sure each module's header and implementation file match.
- Remove all library-like functionality from main.c, so only
the actual frontend remains in main.c.
- Add C++ brackets to all header files.
That effectively leaves the various module C files as something like
an "avrdude library", with main.c being the currently only frontend
program for that library. In theory, it should be possible to write
different frontends using the same library backend functions though.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@722 81a1dc3b-b13d-400b-aceb-764788c761c2
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
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
* pgm.c: Fixed wrong type for default_open introduced by the cleanup yesterday.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@409 81a1dc3b-b13d-400b-aceb-764788c761c2
Move save/restore-functionality into open/close.
* par.c: open/close now saves/restores PPICTRL, too.
* TODO: exitspecs don't work if RESET is in PPICTRL.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@407 81a1dc3b-b13d-400b-aceb-764788c761c2
Have avr_read_byte() call pgm->read_byte() or avr_read_byte_default().
Add avr_write_byte_default().
Have avr_write_byte() call pgm->write_byte or avr_write_byte_default().
* pgm.c: Initialize pgm->write_byte and pgm->read_byte.
* pgm.h: Add write_byte and read_byte fields to struct programmer_t.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@296 81a1dc3b-b13d-400b-aceb-764788c761c2
available.
* avr910.c (avr910_vfy_cmd_sent): New function.
(avr910_chip_erase): Add support for chip erase.
(avr910_enter_prog_mode): New function.
(avr910_leave_prog_mode): New function.
(avr910_initialize): Add code to select device type and enter prog mode.
(avr910_close): Leave programming mode before closing serial port.
(avr910_read_sig_bytes): New function.
(avr910_initpgm): Add avr910_read_sig_bytes method to pgm initializer.
* avrdude.conf.in: Add note about deprecating devicecode.
Change all occurences of devicecode to stk500_devcode.
Add avr910_devcode to a few parts for testing.
* avrpart.h (struct avrpart): Change devicecode field to stk500_devcode.
(struct avrpart): Add avr910_devcode field.
* config_gram.y: Add K_STK500_DEVCODE and K_AVR910_DEVCODE tokens.
Generate an error if devicecode is found in the config file.
Handle parsing of avr910_devcode and stk500_devcode.
* lexer.l: Handle parsing of avr910_devcode and stk500_devcode.
* pgm.c: Initialize pgm->read_sig_bytes field.
* pgm.h: Add pgm->read_sig_bytes field.
* stk500.c: Use stk500_devcode instead of devicecode.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@293 81a1dc3b-b13d-400b-aceb-764788c761c2
$HOME/.avrduderc. Entries from .avrduderc take precedence over those
from the system wide config file in ${PREFIX}/etc/avrdude.conf.
Track and display the config file name and line number when we print
out the available parts and programmers. This is useful in case
someone has overridden a definition in their .avrduderc file and is
wondering why the definition in the system wide config file is not
being used.
Remove the default programmer 'stk500' from the distributed config
file.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@222 81a1dc3b-b13d-400b-aceb-764788c761c2
* .cvsignore: Ignore autoconf files.
* AUTHORS: New file.
* ChangeLog: New file.
* Makefile: Removed file.
* Makefile.am: New file.
* NEWS: New file.
* README: New file.
* bootstrap: New file.
* configure.ac: New file.
* avr.c: Include ac_cfg.h (generated by autoconf).
* config.c: Include ac_cfg.h.
Include config_gram.h instead of y.tab.h.
* config.h: If HAS_YYSTYPE is not defined, define YYSTYPE.
* config_gram.y: Include ac_cfg.h.
* fileio.c: Include ac_cfg.h.
* lexer.l: Include config_gram.h instead of y.tab.h.
* lists.c: Include ac_cfg.h.
* main.c: Include ac_cfg.h.
* par.c: Include ac_cfg.h.
* pgm.c: Include ac_cfg.h.
* ppi.c: Include ac_cfg.h.
* stk500.c: Include ac_cfg.h.
* term.c: Include ac_cfg.h.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@192 81a1dc3b-b13d-400b-aceb-764788c761c2
This was intended to be used for identifying code in the field for
incoming bug reports, but I've never really found it all that useful.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@171 81a1dc3b-b13d-400b-aceb-764788c761c2
supports paged reads and writes. This greatly decreases the
program/verify time from about 4.5 minutes down to about 10 seconds in
a 12K program size test case.
Print out the hardware and firmware version for the STK500 if verbose
is enabled.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@161 81a1dc3b-b13d-400b-aceb-764788c761c2
that programmers other than the direct parallel port connection can be
supported.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@159 81a1dc3b-b13d-400b-aceb-764788c761c2