Commit Graph

51 Commits

Author SHA1 Message Date
MX682X
beaebd989c PICkit 5 support (#1863) 2024-08-14 18:01:04 +01:00
Stefan Rueger
526ffe1814 Add options -a and -m to test8 2024-08-09 20:24:53 +01:00
Stefan Rueger
f1df228902 Add bash script tools/test8 for release v8.0 testing 2024-08-09 14:33:30 +01:00
Hans Ulrich Niedermann
bc2e3609a1 Remove obsolete SVN $Id$ tags from source files
Remove SVN $Id$ tags from source files which have been made
obsolete by moving to git and serve no purpose any more.

This mostly removes the matches printed by the command

    git grep -E '\$[A-Za-z]+\$'

The remaining exceptions are some binary files (PDF and font files),
and jquery js files with both $Id$ and $Date$ tags.
2024-07-31 17:12:55 +02:00
stefanrueger
34366a6b9d Update test-avrdude help message 2024-02-29 20:26:57 +13:00
stefanrueger
71a9cb47b3 Keep case of part in test-avrdude -b -p "-p part ..." 2024-02-28 23:27:38 +13:00
stefanrueger
e35714b1ce Change 1-byte file upload for emulated chip erase 2024-02-28 22:14:28 +13:00
stefanrueger
64c5d1da0b Remove avrbench and generate 4-number benchmark table with legend 2024-02-28 22:07:18 +13:00
stefanrueger
61ed3dd18f Mention avrbench legend in test-avrdude -b summary 2024-02-27 23:14:31 +13:00
stefanrueger
82c001bab4 Drop chip erase and checking test for test-avrdude -b 2024-02-27 23:10:01 +13:00
stefanrueger
efd6bab19c Widen chip erase tests to also capture -c urclock emulation 2024-02-27 22:51:36 +13:00
stefanrueger
cd41d2b4e2 Change /dev/null to temp file to be Windows compatible 2024-02-27 15:00:22 +13:00
stefanrueger
f088a9bc3f Clarify -b option 2024-02-27 14:46:37 +13:00
stefanrueger
df3c67f2d0 Add normalised avrbench number suitable for markdown tables
The cumulative time for typical user tasks depends on the flash and EEPROM
size of the part. This commit computes a size-normalised time. Lower is
better. This avrbench number still depends on the part, but less so than
the cumulative time of the tasks.

The summary line is put in vertical bars to make creation of markdown
tables easier.
2024-02-27 14:09:52 +13:00
stefanrueger
3b567687a7 Lowercase variable names in test-avrdude
Uppercase names are typically used for environment variables in bash
2024-02-27 13:44:52 +13:00
stefanrueger
6e6404cbb4 Use alternative for /dev/null when not available 2024-02-27 11:54:40 +13:00
stefanrueger
274ac34b6c Add benchmark option -b to test-avrdude
This executes five tests for typical programming tasks:
  - Write/verify a "difficult" sketch to flash: two code sections and one
    data section separated by "holes" of different sizes
  - Dump all flash, eg, to make a backup
  - Write/verify a "difficult" eeprom data file with holes
  - Dump all eeprom, eg, to make a backup
  - Chip erase (bootloaders are expected to page erase flash apart from
    the bootloader itself) and spot check whether flash was erased

The reported times are realistic times with overhead of starting avrdude,
resetting the board via DTR/RTS, establishing comms, including erasing the
flash before writing/verifying the sketch and disengaging the chip.

$ test-avrdude -b -d 0 \
  -p "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" \
  -p "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000"

Testing avrdude version 7.3-20240225 (20788712)
Prepare "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip
   2.174 s: flash -U write/verify holes_rjmp_loops_32768B.hex
   1.339 s: flash -U read all flash
   1.415 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
   1.034 s: eeprom -U read all
   1.604 s: chip erase and spot check flash is actually erased
   7.566 s: benchmark for u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000
Prepare "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip
   2.001 s: flash -U write/verify holes_rjmp_loops_32768B.hex
   1.333 s: flash -U read all flash
   1.405 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
   1.029 s: eeprom -U read all
   1.618 s: chip erase and spot check flash is actually erased
   7.386 s: benchmark for u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000

Note the benchmark line with the cumulative time for all five tasks
2024-02-26 23:19:43 +13:00
stefanrueger
83571e3310 Remove -l $logfile when echoing a failed avrdude command 2024-02-06 12:32:22 +13:00
stefanrueger
cf2b362532 Remove -l $logfile when listing avrdude commands 2024-02-05 15:13:43 +13:00
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