Commit Graph

250 Commits

Author SHA1 Message Date
MCUdude
5a618a0344 mention -p? in the help text if -p isn't present 2026-04-15 12:47:08 +02:00
MCUdude
f3508741c2 Only print the entire list of valid parts if the user requests this 2026-04-15 12:42:11 +02:00
Stefan Rueger
83579e16a1 Merge pull request #2086 from stefanrueger/messages
Use verbosity levels consistently
2026-04-05 18:54:54 +01:00
Stefan Rueger
0ebc19eb99 Utilise effective verbosity level throughout
Again, this is a subtle change. The avr_message2() function introduced a
while ago an effective verbosity level, where verbosity is reduced by the
number of -q options above one. This commit uses that level throughout
instead of verbose.
2026-03-26 19:17:46 +00:00
Stefan Rueger
103b4b915a Harden use of wai_getExecutablePath() 2026-03-24 12:25:58 +00:00
Stefan Rueger
b48fd5f534 Show usage text before invalid short-option error 2026-01-12 23:01:12 +00:00
Stefan Rueger
35cc6688ca Fix isp-clock-delay name 2026-01-12 17:46:12 +00:00
Stefan Rueger
ec871b4167 Update command line option parsing 2026-01-12 17:27:16 +00:00
stefanrueger
d4308096a9 Differentiate LIBAVRDUDE_EXIT_FAIL and ..._EXIT_OK
LIBAVRDUDE_EXIT was introduced to allow driver function to tell main.c
that all is done and avrdude should exit(0) indicating success. For
example, processing the -x help options in the driver should exit.

There have been increasingly more situations when the driver function
needed to return and suppress error messages from the caller; for these
LIBAVRDUDE_EXIT was used but now avrdude wrongly indicated success to the
shell when it should indicate an error.

This commit replaces LIBAVRDUDE_EXIT with LIBAVRDUDE_EXIT_FAIL or
LIBAVRDUDE_EXIT_OK as appropriate indicating error or success to the
shell, respectively.
2025-10-31 20:02:37 +01:00
MX682X
0bffad5674 avoid erasing target twice when UPDI device is unlocked 2025-10-17 10:30:07 +02:00
stefanrueger
b698732457 Reinitialise locked chip after erasure 2025-10-12 22:22:27 +02:00
MX682X
8dfc1442a7 linting 2025-09-27 23:01:38 +02:00
MX682X
0f34b11a33 added LIBAVRDUDE_DEVICE_LOCKED error 2025-09-25 22:05:51 +02:00
MX682X
674751992a fix erasing of locked devices 2025-09-23 22:35:52 +02:00
stefanrueger
e190bf9446 Silence compiler warning 2025-06-09 19:25:09 +02:00
stefanrueger
0f76a43f53 Refrain from autoerasing chip for autogenerated files without contents 2025-05-24 11:50:08 +02:00
Stefan Rueger
3564dbfba1 Merge pull request #1973 from MCUdude/linuxgpio
Ensure part is active first for defined start of bit-banged ISP programming + add linuxgpio -E support
2025-05-04 11:49:36 +02:00
MCUdude
baddba9139 Remove pgm->close(pgm) 2025-05-01 23:15:27 +02:00
MCUdude
02960e6b50 Use capital letters for SERBB 2025-04-24 00:35:50 +02:00
MCUdude
55fcced080 Fix typo 2025-04-23 20:34:06 +02:00
MCUdude
eee06d8a35 Force close bit-banged programmers after a failed programming session 2025-04-23 20:28:37 +02:00
MCUdude
8626f4058a Improve help text for bit-banged ISP/TPI programmers 2025-04-22 23:39:51 +02:00
stefanrueger
27057485aa Remove progbuf since no longer needed 2025-04-14 21:47:32 +02:00
stefanrueger
fb70539f6a Add --version option 2025-03-22 00:26:04 +01:00
stefanrueger
6eb5e1d8ba Fix typo in help message 2025-02-28 16:05:45 +01:00
MCUdude
0c2c03f13f Rename --test and --noverify to --test-memory and -d --noverify-memory 2025-02-12 10:16:36 +01:00
MCUdude
19b2519f16 Use --quell instead of --quiet 2025-02-07 13:14:49 +01:00
MCUdude
d7de4e6ce3 Add missing long opt in help text
+ remove duplicates
2025-02-07 12:49:10 +01:00
Hans Ulrich Niedermann
818e0e8698 Add long options like --part
Switch the command line argument parser from getopt(3) to
getopt_long(3) and add a few long options as aliases to existing
short options, e.g. "--help" and "--part" being aliases for "-?"
and "-p", respectively.

The getopt_long(3) function is available on GNU, BSD, and the existing
msvc/getopt.[ch] already implements getopt_long() on Windows. This
should cover all systems avrdude supports.

Adapt the avrdude usage message shown by "-?" or "--help" to show the
new long options.

TODO: Adapt man page and texi manual reflecting the long options.

Closes: #1922
2024-11-27 02:44:17 +01:00
Stefan Rueger
173c3d4e90 Improve messaging around locked UPDI parts 2024-08-23 22:02:49 +01:00
Stefan Rueger
5453843848 Show more detail for -c\? programmer descriptions 2024-08-22 01:03:05 +01:00
Stefan Rueger
dc1191a7b3 Merge branch 'avrdude.pdf' of github.com:stefanrueger/avrdude into avrdude.pdf 2024-08-21 23:49:57 +01:00
Stefan Rueger
c6d29a1689 Move debug command line line after opening the log file 2024-08-21 23:26:51 +01:00
Stefan Rueger
50662bb852 Show command line with -vvv 2024-08-21 17:06:23 +01:00
Stefan Rueger
b8e5c3a927 Show more detail for -p ? 2024-08-21 01:04:36 +01:00
Stefan Rueger
7219f5f529 Crisp up programmer descriptions 2024-08-20 00:37:42 +01:00
Stefan Rueger
00422f3f29 Change xxx->prog_modes & PM_ABCD to is_abcd(xxx) 2024-08-18 16:25:34 +01:00
Stefan Rueger
347ca085c3 Change spacing around parentheses 2024-08-18 15:29:52 +01:00
Stefan Rueger
792b712fe5 Reformat spacing/comments in src/main.c 2024-08-18 01:54:18 +01:00
Stefan Rueger
8fcd0fd71c Record command line when debugging 2024-08-14 18:34:44 +01:00
MX682X
beaebd989c PICkit 5 support (#1863) 2024-08-14 18:01:04 +01:00
Joerg Wunsch
d55a7901c4 Turn init_cx() into a libavrdude member
Beyond initializing the cx pointer, it turns out more cleanup might be
required when re-initializing the context pointer.  (Normal CLI only
initializes it once, so that's not an issue there.)

Thus, join all the required actions into an init_cx() function
provided by the library.
2024-08-13 22:27:03 +02:00
Stefan Rueger
d91128269a Deprecate obsolete features and options 2024-08-08 13:52:31 +01:00
Stefan Rueger
c5a2412951 Merge pull request #1869 from stefanrueger/prodsig
Refine programmer/part/memory compatibility for ALL expansion
2024-08-08 01:12:49 +01:00
Stefan Rueger
9a750de07f Record USB access problems 2024-08-07 14:48:53 +01:00
Stefan Rueger
0b562510f5 Reformat error debug output of function() file line 2024-08-07 00:56:18 +01:00
Stefan Rueger
63b0b4a931 Reformat some continuation messages 2024-08-06 23:58:24 +01:00
Stefan Rueger
4b03d25aba Skip memories that the interface/part combo cannot handle 2024-08-06 22:17:35 +01:00
Stefan Rueger
192a34f2db Provide dev option -c*/u for udev rules 2024-08-04 20:35:09 +01:00
Stefan Rueger
3b9fc405dc Merge branch 'main' into auto-erase 2024-08-03 16:25:33 +01:00