Commit Graph

2937 Commits

Author SHA1 Message Date
Stefan Rueger
80e240b5df Replace ldata(lfirst(pgm->id)) with pgmid where possible 2023-06-21 18:48:05 +01:00
Stefan Rueger
a961284090 Replace strcmp() == 0 with str_eq() 2023-06-21 18:11:45 +01:00
Stefan Rueger
a678814877 Rename -c arg to pgmid and make global 2023-06-21 18:02:19 +01:00
Stefan Rueger
fa9252a36c Rename local var pgmid to pgmidcp 2023-06-21 17:49:47 +01:00
Stefan Rueger
07c5348ab4 Merge pull request #1405 from stefanrueger/pre-checks
Relax checks before executing the -T/-U operations
2023-06-16 00:06:01 +01:00
Stefan Rueger
58f1ba9eec Merge pull request #1404 from stefanrueger/usersig
Implement bytewise cache for usersig
2023-06-16 00:04:19 +01:00
Stefan Rueger
886c511e12 Merge pull request #1403 from MCUdude/usb-warning
Mute missing USB device warning for lower verbosity levels
2023-06-16 00:04:01 +01:00
Stefan Rueger
763028feca Merge pull request #1402 from stefanrueger/multiple-terminals
Run -t interactive terminals when it is their turn wrt -t/-T/-U options
2023-06-16 00:03:41 +01:00
Stefan Rueger
0228304a15 Merge pull request #1401 from stefanrueger/avrcache
Fix memory leak in avrcache.c
2023-06-16 00:03:15 +01:00
Stefan Rueger
d8b67f2b82 Merge pull request #1400 from stefanrueger/doc-author-list
Expand authorship of documentation
2023-06-16 00:03:01 +01:00
Stefan Rueger
9e92c3c297 Merge pull request #1399 from stefanrueger/document-terminal-comments
Document terminal comments
2023-06-16 00:02:47 +01:00
Stefan Rueger
e8e5bee18f Merge pull request #1386 from stefanrueger/stk500v2
Fix stk500v2.c's write_byte() for old parts
2023-06-16 00:02:17 +01:00
MCUdude
10cc234e15 Use pmsg_notice2 instead of pmsg_warning 2023-06-15 19:44:32 +02:00
stefanrueger
38d1cf20b7 Fix interactive terminal naming 2023-06-15 16:47:02 +01:00
stefanrueger
14aba8ad65 Relax checks before executing the -T/-U operations
Now that terminal commands can create files, some of the checks before
executing the -T/-U operations need to be relaxed to avoid false errors.
The command below is perfectly fine, because the file to be read from in
the -U step will be created earlier.

$ rm -f /tmp/load.eep
$ avrdude -qq -cdryrun -pm328p \
  -T 'w ee 0 "avrdude"; save ee 0 8 /tmp/load.eep:h' \
  -U eeprom:w:/tmp/load.eep
2023-06-15 00:44:31 +01:00
stefanrueger
214ced7ce5 Document usersig cache 2023-06-14 23:27:10 +01:00
stefanrueger
96b6ff0c33 Implement bytewise cache for usersig needed in terminal 2023-06-14 23:12:28 +01:00
MCUdude
5078f35c9b Mute missing USB device warning for lower verbosity levels 2023-06-14 20:20:12 +02:00
Hans
106bb57a09 Fix typos
And clarify that it is the jtag2updi programmer that now supports -U EEPROM writes
2023-06-14 19:54:48 +02:00
Stefan Rueger
7d8f100878 Allow multiple -t interactive terminals on the command line
Think breakpoints for a series of memory operations. In this example

$ avrdude -t -U eeprom:r:dopp.eep:i -t -U eeprom:w:dopp.eep

the first -U makes a backup of the EEPROM that the second terminal can
then arbitrarily change because the second -U restores the EEPROM content.
2023-06-13 23:46:22 +01:00
Stefan Rueger
6861dd8067 Fix memory leak in avrcache.c 2023-06-13 22:39:30 +01:00
Stefan Rueger
486400d8af Use full name for HEB and make author list alphabetical 2023-06-13 22:36:43 +01:00
Stefan Rueger
c2b9b95174 Expand authorship of documentation 2023-06-13 20:02:59 +01:00
Stefan Rueger
298c0e3154 Document terminal comments 2023-06-13 19:48:16 +01:00
Stefan Rueger
9a52cfb3d5 Parent AT90S4434 off from AT90S8535
Both share the same datasheet but the AT90S4434 has had no XML data-sheet,
so the programming paramters are likely correct.
2023-06-13 19:17:53 +01:00
Stefan Rueger
b296c82185 Update NEWS 2023-06-13 18:43:41 +01:00
Stefan Rueger
5c1bb41266 Merge pull request #1397 from stefanrueger/sub-shell
Provide subshell command `!` in the terminal
2023-06-13 18:36:39 +01:00
Stefan Rueger
8986145cbb Merge pull request #1396 from stefanrueger/save
Provide terminal save command
2023-06-13 18:35:39 +01:00
Stefan Rueger
3c84f7328f Invalidate cache in stk500v2_paged_write()
Bytewise access uses a cache, but paged access doesn't so must invalidate
the cache when writing a page - otherwise mixing bytewise and paged access
is bound to fail.
2023-06-13 18:19:31 +01:00
Stefan Rueger
4722417fe0 Set page size to 2 for STK500v2 programming of old parts
These (ATtiny15 et al) have bytewise-only flash access, but the STK500v2
protocol enforces word flash addresses, so need to r/w flash in pairs.
2023-06-13 18:16:37 +01:00
Stefan Rueger
2bd5fb8fe4 Clarify location of config files for Windows in documentation 2023-06-13 14:26:38 +01:00
Stefan Rueger
910e30061c Clarify location of avrdude.rc in Windows 2023-06-13 14:24:17 +01:00
Stefan Rueger
b298d9e103 Return when save detects missing length for a memory segement 2023-06-13 12:13:16 +01:00
Stefan Rueger
6eb366574d Update terminal subshell documentation 2023-06-13 10:43:23 +01:00
Stefan Rueger
db414259cf Allow subshell commands to be remainder of terminal line
Now a subshell command can follow a terminal command on the same line:

avrdude> dump eeprom; !ls

Subshell commands still take up the remainder of the line

avrdude> !ls; dump eeprom

Will execute dump in the shell (not the terminal).
2023-06-13 10:36:25 +01:00
Stefan Rueger
27f49f64f2 Document terminal subshell command !<line> 2023-06-13 00:15:11 +01:00
Stefan Rueger
3d71c4c66b Fix size setting on file read 2023-06-12 18:28:05 +01:00
Stefan Rueger
51275c36ef Rename memtype to memory in documentation 2023-06-12 18:23:52 +01:00
Stefan Rueger
bea3d099f8 Add terminal save documentation 2023-06-12 18:21:13 +01:00
Stefan Rueger
64a4bb18bd Provide subshell command ! in the terminal
Needs to have allow_subshells = yes; in ~/.avrduderc. Then subshell
commands can be executed, eg,

$ avrdude -t

avrdude> !ls
myapplication.hex    myapplication.eep

avrdude> !avrdude -pm328p/St | grep efuse.initval
.ptmm   ATmega328P      efuse   initval 0xff
2023-06-12 16:24:20 +01:00
Stefan Rueger
9cb93da3cf Also set read_byte() to avr_read_byte_default() for old parts 2023-06-11 19:23:47 +01:00
Stefan Rueger
48f1fc75e9 Provide terminal save command
Examples with filename - (stdout):

$ avrdude -qqt -p m328p
avrdude> save eeprom -:i
:2000000054686973206973206120746573740048656C6C6F2C20776F726C64210A0054689C
:200020006520717569636B2062726F776E20666F78206A756D7073206F76657220746865DD
:20004000206C617A7920646F6700FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7C
:20006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE7FEE7FEE7FEE7FEE7FE1D
:20008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
:2000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60
:2000C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40
:2000E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20
:20010000280992D30B0000F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF62
:20012000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDF
:20014000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF
:20016000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9F
:20018000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F
:2001A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5F
:2001C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3F
:2001E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3D
:2003E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1D
:00000001FF
avrdude> save eeprom 15 5 22 5 -:I
:05000F0048656C6C6FF8                                       // 0000f> Hello
:020000040000FA
:05001600776F726C64BD                                       // 00016> world
:00000001FF
avrdude> save eeprom 15 5 22 5 -:h
0x48,0x65,0x6c,0x6c,0x6f
0x77,0x6f,0x72,0x6c,0x64
2023-06-11 18:15:36 +01:00
Stefan Rueger
20bd7f37bc Suppress comma at begin of memory segment, not begin of memory 2023-06-11 15:54:53 +01:00
Stefan Rueger
99a25fcd16 Rename function segment_normalise() 2023-06-11 14:28:12 +01:00
Stefan Rueger
f0da9a6c44 Update NEWS 2023-06-11 11:59:20 +01:00
Stefan Rueger
6126dd3d6a Merge pull request #1395 from stefanrueger/dryrun
Add more info for the dryrun programmer
2023-06-11 11:54:39 +01:00
Stefan Rueger
f966d0cc68 Merge pull request #1394 from stefanrueger/arduino
Add more info for the arduino programmer
2023-06-11 11:54:28 +01:00
Stefan Rueger
c78b0ac4c5 Merge pull request #1393 from stefanrueger/urclock
Add more documentation for urclock programmer
2023-06-11 11:54:18 +01:00
Stefan Rueger
45217c7c47 Merge pull request #1392 from stefanrueger/save
Rewrite fileio functions to cater for a list of memory segments
2023-06-11 11:52:49 +01:00
Stefan Rueger
16dd3ac998 Change AVRMEM * to const AVRMEM * where appropriate 2023-06-11 11:43:44 +01:00