Commit Graph

32 Commits

Author SHA1 Message Date
stefanrueger
7bf69aad43 Check $avrdude_bin is executable 2024-02-05 14:51:18 +13:00
stefanrueger
f9246b81c4 Remove wildcard string matches in test script 2024-02-05 14:33:02 +13:00
stefanrueger
8f8316f08b Change integer test to string test to allow non-integer $elapsed 2024-02-05 14:11:41 +13:00
stefanrueger
e6c1229b71 Remove config eesave output from test-avrdude -v runs
-v is meant to only show AVRDUDE errors and warnings

Before this commit:

$ tools/test-avrdude -v -p "-c dryrun -p m328p"
Testing avrdude version 7.2-20240201 (571a8063)
Prepare "-c dryrun -p m328p" and press 'enter' or 'space' to continue. Press any other key to skip
   0.064 s: fuse access: clear, set and read eesave fuse bit
config eesave=ee_erased # 1
   0.068 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
   0.068 s: chip erase
   0.068 s: flash -U write/verify holes_rjmp_loops_32768B.hex
   0.068 s: flash -T write/verify holes_rjmp_loops_32768B.hex
   0.068 s: eeprom check whether programmer can flip 0s to 1s
   0.069 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
   0.067 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_1024B.hex
   0.068 s: chip erase and spot check flash is actually erased
   0.068 s: spot check eeprom is erased, too

After:

$ tools/test-avrdude -v -p "-c dryrun -p m328p"
Testing avrdude version 7.2-20240201 (571a8063)
Prepare "-c dryrun -p m328p" and press 'enter' or 'space' to continue. Press any other key to skip
   0.065 s: fuse access: clear, set and read eesave fuse bit
   0.068 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
   0.067 s: chip erase
   0.068 s: flash -U write/verify holes_rjmp_loops_32768B.hex
   0.068 s: flash -T write/verify holes_rjmp_loops_32768B.hex
   0.066 s: eeprom check whether programmer can flip 0s to 1s
   0.069 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
   0.068 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_1024B.hex
   0.067 s: chip erase and spot check flash is actually erased
2024-02-05 14:04:38 +13:00
stefanrueger
571a8063b9 Update test-avrdude usage 2024-02-01 18:29:00 +13:00
stefanrueger
acd5584c62 Provide -T option for test-avrdude to add dryrun/dryboot tests 2024-02-01 15:21:34 +13:00
stefanrueger
2c677693f8 Exit test-avrdude with 1 if any failure occurred 2024-02-01 15:09:00 +13:00
stefanrueger
213fe7561f Create test-avrdude's temporary files in the script itself 2024-02-01 15:02:48 +13:00
stefanrueger
370a15d032 Reduce default delay between avrdude test runs
- From 4 s to 0.75 s
 - Do not delay at all for -c dryrun/dryboot
 - Do not delay before first avrdude call in a series
2024-01-31 14:49:46 +13:00
stefanrueger
86af6b6d01 Add option test-avrdude -t <dir> for tmp directory 2024-01-31 11:44:16 +13:00
stefanrueger
8f46c531f1 Avoid sed -i in test-avrdude script 2024-01-31 11:38:53 +13:00
stefanrueger
3d3a387d1a Check test-avrdude can write to /dev/shm 2024-01-30 23:15:06 +13:00
stefanrueger
742cb9dd77 Update test-avrdude script
- Simplify command to make eesave fusebit delete EEPROM on chip erase
 - Replace ${var,,} construct with tr A-Z a-z so older bash shells work
 - Make -l work for fuse access tests
2024-01-30 14:31:25 +13:00
stefanrueger
5e2409b9fc Remove EEPROM spot check after chip erase from bootloaders
Bootloaders emulate chip erase (if at all) so EEPROM is unlikely erased
2024-01-29 18:31:32 +13:00
stefanrueger
73adee82e2 Update test-avrdude error message 2024-01-29 10:26:11 +13:00
stefanrueger
be9c2a507d Add tools/test-avrdude
$ tools/test-avrdude -h
Syntax: test-avrdude {<opts>}
Function: test AVRDUDE for certain programmer and part combinations
Options:
    -c <configuration spec>     additional configuration options used for all runs
    -d <sec>                    delay between test commands (default 4 seconds)
    -e <avrdude path>           set path of AVRDUDE executable (default avrdude)
    -l                          list test commands but do not execute them
    -p <programmer/part specs>  can be used multiple times, overrides default tests
    -s                          skip EEPROM tests for bootloaders
    -v                          verbose: show AVRDUDE error and warning messages
    -? or -h                    show this help text
Example:
    $ test-avrdude -d 0 -p "-c dryrun -p t13" -p "-c dryrun -p m4809"

$ echo | tools/test-avrdude -p"-cdryrun -pm328p" -d0
Testing avrdude version 7.2-20240128 (09345002)
Prepare "-cdryrun -pm328p" and press 'enter' or 'space' to continue. Press any other key to skip
   0.064 s: fuse access: clear, set and read eesave fuse bit
   0.083 s: fuse access: set eesave fusebit to delete EEPROM on chip erase
   0.066 s: chip erase
   0.068 s: flash -U write/verify holes_rjmp_loops_32768B.hex
   0.067 s: flash -T write/verify holes_rjmp_loops_32768B.hex
   0.067 s: eeprom check whether programmer can flip 0s to 1s
   0.067 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
   0.066 s: eeprom -T write/verify holes_{the_five_boxing_wizards,pack_my_box}_1024B.hex
   0.069 s: chip erase and spot check flash is actually erased
   0.067 s: spot check eeprom is erased, too
2024-01-29 01:39:08 +13:00
Stefan Rueger
d3b14f21f9 Provide bootloader-hash tool 2022-11-22 22:38:09 +00:00
Joerg Wunsch
6264404cc1 Allow for overriding make tool from environment
gmake (GNU make) appears to handle some dependencies better here than
bmake (BSD make).



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1515 81a1dc3b-b13d-400b-aceb-764788c761c2
2021-12-10 22:34:57 +00:00
Joerg Wunsch
e074edf4cb Submitted by Jan Egil Ruud:
patch #10000: Add support for extended UPDI device context
* avrdude.conf.in (pickit4_updi, snap_updi, pkobn_updi):
new programmers
* avrdude.conf.in (ATmega808, ATmega809, ATmega1608, ATmega1609)
(AVR DA, AVR DB): new devices
* jtag3.c: Add support for extended UPDI device context
* jtag3_private.h: (Dito.)
* tools/atdf-to-avrdude.xslt: Bug fixes
* usbdevs.h: Bump USBDEV_MAX_XFER_3 to 912
* doc/avrdude.texi: Document changes
* avrdude.1: (Dito)



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1454 81a1dc3b-b13d-400b-aceb-764788c761c2
2021-11-06 22:13:51 +00:00
Joerg Wunsch
85a2eed129 patch #9506: Script to create device configuration stub from Atmel ATDF files
Thanks to Morten Engelhardt Olsen for his contribution!



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1406 81a1dc3b-b13d-400b-aceb-764788c761c2
2018-01-10 06:59:26 +00:00
Joerg Wunsch
f0c62a3ff8 Annual changelog rotation.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1393 81a1dc3b-b13d-400b-aceb-764788c761c2
2017-03-05 18:21:08 +00:00
Joerg Wunsch
e7377a9d52 Yet another name for the MinGW32 compiler (as found on Ubuntu 14.04).
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1352 81a1dc3b-b13d-400b-aceb-764788c761c2
2014-11-26 09:35:19 +00:00
Joerg Wunsch
08fc95eb3e Fix variable spelling.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1213 81a1dc3b-b13d-400b-aceb-764788c761c2
2013-09-09 05:48:11 +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
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
147137a218 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
Joerg Wunsch
2179ec5fb2 Contributed by Shaun Jackman <sjackman@gmail.com>
bug #21798: Fix both XSLT scripts
* tools/get-dw-params.xsl (format-hex): Add the parameter count.
* tools/get-hv-params.xsl (format_cstack): Ditto.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@828 81a1dc3b-b13d-400b-aceb-764788c761c2
2009-07-02 10:49:19 +00:00
Joerg Wunsch
ec2df64017 Add initial support for the Atmel STK600, for
"classic" AVRs (AT90, ATtiny, ATmega) in both,
ISP and high-voltage programming modes.
* Makefile.am: Add -lm.
* avrdude.conf.in: Add stk600, stk600pp, and stk600hvsp.
* config_gram.y: Add support for the stk600* keywords.
* lexer.l: (Ditto.)
* pgm.h: Add the "chan" parameter to set_varef().
* stk500.c: (Ditto.)
* serial.h: Add USB endpoint support to struct filedescriptor.
* stk500v2.c: Implement the meat of the STK600 support.
* stk500v2.h: Add new prototypes for stk600*() programmers.
* stk500v2_private.h: Add new constants used in the STK600.
* term.c: Add AREF channel support.
* usb_libusb.c: Automatically determine the correct write
endpoint ID, the STK600 uses 0x83 while all other tools use
0x82.  Propagate the EP to use through struct filedescriptor.
* usbdevs.h: Add the STK600 USB product ID.
* tools/get-stk600-cards.xsl: XSL transformation for
targetboards.xml to obtain the list of socket and routing
card IDs, to be used in stk500v2.c (for displaying the
names).
* tools/get-stk600-devices.xsl: XSL transformation for
targetboards.xml to obtain the table of socket/routing cards
and their respective AVR device support for doc/avrdude.texi.
* avrdude.1: Document all the STK600 stuff.
* doc/avrdude.texi: Ditto.  Added a new chapter for
Programmer Specific Information.

Thanks to Eirik Rasmussen from Atmel Norway for his support in
getting this code running within that short amount of time!


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@768 81a1dc3b-b13d-400b-aceb-764788c761c2
2008-03-14 13:00:08 +00:00
Joerg Wunsch
84b633e41d Implement EEPROM access through debugWire.
* jtagmkII.c: Extend the jtagmkII_read_byte() and
jtagmkII_write_byte() methods to handle EEPROM through
debugWire.

* avrpart.h: Implement the "flash instruction" parameter.
* config_gram.y: (Ditto.)
* lexer.l: (Ditto.)
* avrdude.conf.in: (Ditto.)

* avrdude.1: Document the EEPROM access through dW.
* doc/avrdude.texi: (Ditto.)

* tools/get-dw-params.xsl: Extend to extract the flash
instruction field.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@693 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-23 07:07:06 +00:00
Joerg Wunsch
04203ce892 Add debugWire entries for all devices where dW is known to exist
(according to the XML files).

Add an XSL stylesheet to extract the dW
parameters from the XML files.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@690 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-11-21 11:56:26 +00:00
Joerg Wunsch
ee7915be66 Pretty-print the control stack argument.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@604 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-13 21:57:52 +00:00
Joerg Wunsch
abda4d9276 New file, extract high-voltage programming parameters from Atmel XML
files, and produce an avrdude.conf[.in] snippet.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@603 81a1dc3b-b13d-400b-aceb-764788c761c2
2006-08-13 21:10:13 +00:00