Commit Graph

2741 Commits

Author SHA1 Message Date
Stefan Rueger
1091f1d421 Use str_int() in terminal send 2023-05-13 23:27:28 +01:00
Stefan Rueger
efbc69aaf8 Use str_int() in terminal pgerase 2023-05-13 23:25:55 +01:00
Stefan Rueger
fb42518f6b Use str_int() in terminal varef 2023-05-13 23:24:25 +01:00
Stefan Rueger
6accc3baae Use str_int in terminal verbose 2023-05-13 23:22:24 +01:00
Stefan Rueger
5acf5c6aaf Use str_int() in terminal quell 2023-05-13 23:21:11 +01:00
Stefan Rueger
63f818f53f Hide Easter egg 2023-05-13 23:16:21 +01:00
Stefan Rueger
e3bc41a5cd Add str_int() conversion that conforms to avrdude terminal syntax
This has a similar but slightly different calling interface to strtoull()
and conforms to the way that terminal write interprets data items, ie,
recognises binary numbers as well as optional size suffixes LL/L/S/H/HH,
optional unsigned U suffix. It also takes C character constants, eg, '\n',
as numbers and ignores an optional trailing comma. Usage example:

 #include "libavrdude.h"

const char *errptr;
int addr = str_int(string, STR_INT32, &errptr);
if(errptr) {
  pmsg_error("address %s: %s\n", string, errptr);
  return -1;
}
2023-05-13 23:10:15 +01:00
Stefan Rueger
bb95a83277 Add str_todata() and use it for terminal write data items
This makes available as a function the way that terminal write interprets
write data and converts them into bits and bytes. Also adds binary numbers
using the 0b prefix.
2023-05-13 13:09:26 +01:00
Stefan Rueger
e6a2f3c058 Update NEWS 2023-05-04 19:26:07 +01:00
Stefan Rueger
9c41c23923 Merge pull request #1357 from stefanrueger/metadata
Progressively shrink metadata for -c urclock
2023-05-04 19:21:00 +01:00
Stefan Rueger
b812d9e087 Merge pull request #1351 from stefanrueger/option-n
Document -n behaviour wrt -U and terminal
2023-05-04 19:20:08 +01:00
drmpjz
b8344734d1 Add option -f to build.sh (#1342) 2023-05-04 19:18:17 +01:00
Stefan Rueger
e4cef21030 Ensure pmsg_xyz() messages always start on a new line 2023-05-03 10:54:39 +01:00
Stefan Rueger
a894dbb908 Progressively shrink metadata for -c urclock 2023-05-03 00:19:52 +01:00
Stefan Rueger
532387c5a2 Update documentation for -n, -V and -x help 2023-05-01 18:48:30 +01:00
Stefan Rueger
2fbe057b57 Document -n behaviour wrt -U and terminal 2023-04-24 11:20:16 +01:00
Stefan Rueger
bda26d3984 Remove unnecessary variable 2023-04-24 10:42:10 +01:00
Stefan Rueger
c279ab8639 Update NEWS 2023-04-23 23:02:49 +01:00
Stefan Rueger
9c4f295ffd Merge pull request #1348 from stefanrueger/variants
Add variants of obsolete parts
2023-04-23 22:49:35 +01:00
Stefan Rueger
88c4a6fd5f Merge pull request #1347 from stefanrueger/dryrun
Provide a programmer dryrun that emulates programming
2023-04-23 22:49:21 +01:00
Stefan Rueger
509c5c2932 Merge pull request #1346 from stefanrueger/strutil
Add case-insensitive string comparison and wildcard match to str_*() ...
2023-04-23 22:48:51 +01:00
Stefan Rueger
b4fa1bf8c2 Merge pull request #1345 from MCUdude/more-extra-parameters
Add `-xvtarg`, `-xvaref` and `-xfosc` extended parameters
2023-04-23 22:48:21 +01:00
MCUdude
46b44a9fe1 Fix grammar 2023-04-23 21:47:57 +02:00
Stefan Rueger
a00f000fc0 Add variants for ATxmega192A1/256A1
... from datasheet https://docs.rs-online.com/908d/0900766b81596516.pdf
2023-04-23 13:45:19 +01:00
MCUdude
cb96dc39b6 Update avrdude.texi 2023-04-23 11:56:22 +02:00
MCUdude
7c4d5fa9d1 Add missing -xhelp 2023-04-23 11:53:59 +02:00
Stefan Rueger
00c30532af Add variants of obsolete parts 2023-04-22 18:39:33 +01:00
Stefan Rueger
2ebed6e84e Link up fuses and fuse0 ... fuse9 memories for dryrun programmer
When fuseX is written to that fuses is also changed and vice versa.
2023-04-22 18:23:40 +01:00
MCUdude
765d63ddec Update avrdude.1 2023-04-21 23:44:24 +02:00
MCUdude
ba64553620 Add missing .El 2023-04-21 21:07:35 +02:00
MCUdude
0e7702b03a Initialize sscanf_success to zero 2023-04-21 19:54:16 +02:00
MCUdude
7a1c245b1a Revert strcmp->str_eq replacement
I screwed up here and didn't realize the importance of the negative return value here
2023-04-21 14:06:33 +02:00
MCUdude
b0ca8b6d75 Fix comment that didn't line up with the others 2023-04-21 14:03:33 +02:00
Stefan Rueger
fcefa90c62 Review and improve comments in strutil.c 2023-04-21 12:38:45 +01:00
MCUdude
d980e58c7a replace strcmp with str_eq 2023-04-21 12:30:37 +02:00
MCUdude
28870323e3 Always initialize f_get 2023-04-21 12:30:27 +02:00
Stefan Rueger
0796820625 Emulate flash NOR-memory for paged write 2023-04-21 01:58:13 +01:00
Stefan Rueger
d764d1b636 Provide a programmer dryrun that emulates programming
There is no connection to a physical programmer or chip needed; this to
test the workings of AVRDUDE and/or check out factory settings of fuses:

$ avrdude -qqp m328p -c dryrun -U lfuse:r:-:h
0x62

$ avrdude -qqp m328p -c dryrun -t
avrdude> read flash 0 32
0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
0010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
avrdude> read hfuse
0000  d9                                                |.               |
avrdude> read signature
0000  1e 95 0f                                          |...             |
avrdude> read calibration
0000  55                                                |U               |
avrdude> write cal 0 0x56
avrdude error: cannot write to write-protected memory ATmega328P calibration
avrdude error: (write) error writing 0x56 at 0x00000, rc=-1
                write operation not supported on memory type calibration
2023-04-21 01:31:40 +01:00
Stefan Rueger
67a51eac64 Add case-insensitive string comparison and wildcard match to str_*() routines
... and apply new str_*() functions in urclock.c and developer_opts.c
2023-04-20 19:18:46 +01:00
Stefan Rueger
b038bd45dc Update NEWS 2023-04-20 18:28:20 +01:00
Stefan Rueger
545df084b5 Merge pull request #1343 from stefanrueger/avrdude.conf
Review avrdude.conf, add variants and reconcile with ATDFs
2023-04-20 18:24:52 +01:00
Stefan Rueger
6d40f95644 Document avrdude.conf's variants string list and -vp? 2023-04-20 17:35:17 +01:00
Stefan Rueger
860ebd711b Refine variants for some parts 2023-04-20 17:34:23 +01:00
Stefan Rueger
619ec2c3a4 Print variants = NULL for -p.../S when needed 2023-04-20 17:33:25 +01:00
Stefan Rueger
26e5a9316b Treat variants as an additive string list and provide '= NULL' assignment 2023-04-19 21:39:27 +01:00
Stefan Rueger
5cedfd713d Add part variants from vendor list and change display style 2023-04-19 21:38:15 +01:00
MCUdude
0e0124ceec Add -xvtarg, -xvaref and -xfosc to -xhelp 2023-04-19 22:10:54 +02:00
MCUdude
fe7f8298f5 Add -xfosc 2023-04-19 21:21:51 +02:00
MCUdude
caa779cb8a Add extra_features to native stk500v2 2023-04-19 21:07:27 +02:00
MCUdude
0e426cc34a Add -xvaref support
This makes it possible to adjust the analog reference voltage on STK500v1, STK500v2 and STK600
2023-04-19 11:30:29 +02:00