Commit Graph

5197 Commits

Author SHA1 Message Date
stefanrueger
4d7c532c43 Update NEWS 2025-11-12 17:12:04 +01:00
Stefan Rueger
8d52acc198 Merge pull request #2065 from stefanrueger/disassemble-symbols
No longer use register names in I/O space for ldi operands
2025-11-12 17:10:24 +01:00
Stefan Rueger
ab1ae79cb1 Merge pull request #2063 from stefanrueger/elpm
Disassemble elpm/eijmp/eicall for all XMEGAs
2025-11-12 17:10:07 +01:00
Stefan Rueger
65a249e3ed Merge pull request #2062 from stefanrueger/128a4u-apptable
Fix apptable size for x128a4/u
2025-11-12 17:09:45 +01:00
Stefan Rueger
ada3ee8379 Merge pull request #2061 from stefanrueger/libavrdude_exit
Differentiate `LIBAVRDUDE_EXIT_FAIL` and `..._EXIT_OK`
2025-11-12 17:09:06 +01:00
stefanrueger
158a2a79f1 No longer use register names in I/O space for ldi operands
When disassembling AVRDUDE uses known labels for ldi operations that
initialise a register pair, eg,

      ldi     r30, lo8(nvm.ctrla)  ; 0xcb = 203
      ldi     r31, hi8(nvm.ctrla)  ; 0x01 = 1
      out     cpu.ccp, r24
      st      Z, r18

This is meant to illustrate a possible intention of the code. It is not
unusual to see a base register loaded, for example the USARTC0 register
base, into the Y or Z register pair and read write with displacement from
specific USARTC0 register bytes using the ldd and std opcodes.

However, sometimes these labels are misleading when, eg, the register pair
is just initialised as a counter. In particular that can easily happen for
I/O register addresses for which there are fewer use cases to put them
into a register pair as the in/out opcodes are short and no savings would
be made using ldd/std. For example,

      ldi     r28, lo8(gpio.gpior9) ; 0x09 = 9
      ldi     r29, hi8(gpio.gpior9) ; 0x00 = 0

is most likely used as a 16-bit counter initialised with 9. This would
better be disassembled as

      ldi     r28, 0x09            ; 9
      ldi     r29, 0x00            ; 0

This commit does so by removing the use of registers in I/O space as
symbolic ldi operands when loading a register pair.
2025-11-10 01:26:16 +01:00
stefanrueger
0e4bf82336 Disassemble elpm/eijmp/eicall for all XMEGAs 2025-11-08 01:23:13 +01:00
stefanrueger
72e0f00d4d Fix apptable size for x128a4/u 2025-11-06 21:38:13 +01:00
stefanrueger
59ec3f16da Fix PICkit4/Snap mode= processing and documetation 2025-10-31 20:49:57 +01: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
stefanrueger
635027289e Update NEWS and avrdude.pdf 2025-10-31 19:19:17 +01:00
Stefan Rueger
e72ef9d2b2 Merge pull request #2060 from stefanrueger/bus-device
Ignore leading zeros in -P usb:<bus>:<device> numbers and improve `-P` documentation
2025-10-31 19:11:03 +01:00
Stefan Rueger
d25eaf796f Merge branch 'main' into bus-device 2025-10-30 11:17:00 +01:00
stefanrueger
0e87b1f7c9 Improve error messaging for serial number mismatch
As advised by @MX682X
2025-10-30 10:31:28 +01:00
stefanrueger
e73695f013 Use symbolic return values in pickit5_open() 2025-10-30 10:28:23 +01:00
stefanrueger
7fa03f8306 Adjust spacing 2025-10-30 10:20:56 +01:00
stefanrueger
03b6a55af8 Mention programmers that ignore -P option in documentation 2025-10-27 11:29:09 +01:00
stefanrueger
e499f0ba5e Rename bus:device to busdir:devicefile in documentation 2025-10-27 11:22:43 +01:00
stefanrueger
6e8d2f6b2a Rename bus:device to busdir:devicefile for usbtiny.c 2025-10-27 11:22:12 +01:00
stefanrueger
4390275fc1 Rename bus:device to busdir:devicefile for usbasp.c 2025-10-27 11:21:52 +01:00
stefanrueger
1e29892abe Reword serial number message 2025-10-27 11:21:01 +01:00
stefanrueger
a76b1b8773 Rename bus:device to busdir:devicefile for micronucleus.c 2025-10-27 11:20:01 +01:00
stefanrueger
0aeaa69ca9 Rename bus:device to busdir:devicefile for dfu.c 2025-10-27 11:19:23 +01:00
stefanrueger
ca36e3c47f Warn that -P option is ignored for teensy 2025-10-24 11:36:28 +02:00
stefanrueger
6e59b6dd10 Warn that -P option is ignored for pickit2 2025-10-24 11:35:03 +02:00
stefanrueger
009aa3615f Unify xxx_open() debug message for urclock 2025-10-24 11:33:00 +02:00
stefanrueger
37ef71b5a6 Unify xxx_open() debug message for ft245r 2025-10-24 11:25:32 +02:00
stefanrueger
f197504b80 Unify xxx_open() debug message for flip1/2 2025-10-24 11:24:04 +02:00
stefanrueger
d296cb5bee Unify xxx_open() notice for jtagmkII 2025-10-24 10:39:22 +02:00
stefanrueger
df5c1734ea Warn that -P option is ignored for ch341a 2025-10-24 10:29:25 +02:00
stefanrueger
af58933372 Warn that -P option is ignored for avrftdi 2025-10-24 10:27:37 +02:00
stefanrueger
d412131df5 Improve messaging 2025-10-23 23:39:59 +02:00
stefanrueger
f084de37e6 print notice when dfu device found 2025-10-23 15:51:53 +02:00
stefanrueger
0982d8d149 Print error message on wrong -P use for usbasp 2025-10-23 15:33:58 +02:00
stefanrueger
37a52cc401 Utilise str_busdev_eq() in dfu.c 2025-10-23 15:23:16 +02:00
stefanrueger
d759b35a71 Document pickit5 -P port use 2025-10-23 15:00:48 +02:00
stefanrueger
f44301d5bc Allow pickit5 vid/pid be specified as 0 2025-10-23 14:44:12 +02:00
stefanrueger
a6553e80d3 Sharpen test for bus/device number 2025-10-23 13:39:40 +02:00
stefanrueger
f3009e7348 Document that usbasp serial number is matched from end 2025-10-23 12:35:46 +02:00
stefanrueger
2d63a1947a Simplify usbasp -P port parsing 2025-10-23 12:32:36 +02:00
stefanrueger
7af83b47ce Simplify usbtiny -P port parsing 2025-10-23 12:28:36 +02:00
stefanrueger
982af16f72 Simplify micronucleus -P port handling 2025-10-23 12:07:08 +02:00
stefanrueger
ae742bda5f Remove unnecessary -P port parsing 2025-10-23 12:06:58 +02:00
stefanrueger
27a5434b59 Indent AVRISP-TPI-conection table 2025-10-22 23:49:53 +02:00
stefanrueger
5f4afb21f9 Indent Dragon PDI adapter table 2025-10-22 23:25:12 +02:00
stefanrueger
01f8b9c4a3 Indent JTAG ICE PDI adapter table 2025-10-22 23:23:51 +02:00
stefanrueger
4af43494f4 Indent default-port table 2025-10-22 23:17:43 +02:00
stefanrueger
0af648f129 Indent data suffix table 2025-10-22 23:16:08 +02:00
stefanrueger
ef3e37d37a Indent data type table 2025-10-22 22:47:34 +02:00
stefanrueger
cda38d2876 Ensure memory segments stay within bounds 2025-10-22 22:40:42 +02:00