Commit Graph

5230 Commits

Author SHA1 Message Date
Stefan Rueger
944e347dfd Provide reset2addr() 2026-04-02 00:20:06 +01:00
Stefan Rueger
e7532789af Utilise avr_opcodes.c functions 2026-04-01 19:00:21 +01:00
Stefan Rueger
29f319b38f Improve comments 2026-04-01 18:59:38 +01:00
Stefan Rueger
17ac9da940 Update NEWS 2026-03-22 11:32:54 +00:00
Stefan Rueger
3f1f8ae45b Merge pull request #2078 from stefanrueger/guard-paged-access
Make `paged_write` independent from `paged_load`
2026-03-22 11:19:52 +00:00
Stefan Rueger
7f69c2ad9f Merge pull request #2077 from dl8dtl/udevadm_suggestion
Suggest udevadm control --reload instead of rebooting
2026-03-22 11:18:40 +00:00
stefanrueger
acbbb55fb9 Utilise avr_has_paged_write() and ..._load() 2026-02-28 16:05:32 +01:00
stefanrueger
33530161fa Provide avr_has_paged_write() and ..._load() 2026-02-28 15:59:57 +01:00
stefanrueger
afd3338c74 Improve error messaging 2026-02-28 15:37:53 +01:00
stefanrueger
b3f2a7e71e Fix paged_write check in avr_write_mem() 2026-02-28 15:27:26 +01:00
Joerg Wunsch
a0a12edb19 Too many newlines 2026-02-27 09:35:26 +01:00
Joerg Wunsch
ddbe44ed21 Fix line count for tail command 2026-02-27 09:32:12 +01:00
Joerg Wunsch
7a81cb7514 Add newlines to messages 2026-02-27 09:30:05 +01:00
Joerg Wunsch
7b487eb9e1 Suggest udevadm control --reload instead of rebooting
For Linux udev, the new rules files could be read at runtime by
reloading them, rather than requiring a reboot.  My experience says
this is always needed, not just for HID devices, and it's always
required to replug them afterwards.
2026-02-27 09:24:33 +01:00
Stefan Rueger
413b538eed Update NEWS and avrdude.pdf 2026-01-15 14:54:06 +00:00
Stefan Rueger
3200d92130 Merge pull request #2070 from stefanrueger/parsing
Update command line option parsing
2026-01-15 14:37:27 +00:00
Stefan Rueger
fc7ac1c80b Merge pull request #2069 from stefanrueger/urboot-ATmegaS
Provide urboot: bootloaders for classic ATmegaS* parts
2026-01-15 14:36:33 +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
4621342928 Document updated option parsing 2026-01-12 17:28:01 +00:00
Stefan Rueger
ec871b4167 Update command line option parsing 2026-01-12 17:27:16 +00:00
Stefan Rueger
2da64d723b Provide urboot: bootloaders for classic ATmegaS* parts 2026-01-09 17:05:32 +00:00
Stefan Rueger
ab2d37123f Update NEWS 2026-01-09 12:01:22 +00:00
Stefan Rueger
d286898533 Merge pull request #2068 from stefanrueger/config-file
Add ATmegaS128 and ATmegaS64M1
2026-01-09 11:53:55 +00:00
Stefan Rueger
8d7fc4df00 Fix implausible variants data 2026-01-09 11:18:39 +00:00
Stefan Rueger
dc3dcb71ca Fix typo 2026-01-09 11:17:54 +00:00
Stefan Rueger
8fcdcdf9b0 Merge pull request #2067 from stefanrueger/texi-menu
Fix `@node` menu pointers in `avrdude.texi`
2026-01-09 10:59:43 +00:00
Stefan Rueger
ce4d169815 Merge pull request #2066 from stefanrueger/avrintel
Update avr intelligence from device packs
2026-01-09 10:59:20 +00:00
Stefan Rueger
4d763d8130 Add ATmegaS128 and ATmegaS64M1 2026-01-08 19:42:52 +00:00
Stefan Rueger
94b2c79518 Update ATmegaS64M1 USART ports 2026-01-07 02:42:48 +00:00
Stefan Rueger
986e656378 Fix @node menu pointers in avrdude.texi
The relatively complex and redundant @node pointers in the avrdude.texi
documentation are easy to get wrong. makeinfo knows how it should be from
a previous @menu command and does the right thing irrespective of what
@node claims to want to link to. Makeinfo does complain, though, about
inconsistent @node pointers. This commit fixes the @node pointers to
suppress these warnings.
2026-01-07 01:45:01 +00:00
Stefan Rueger
5f62f119ce Print Port_bits addresses as decimal for classic parts 2026-01-07 01:36:06 +00:00
Stefan Rueger
b4f0e4645d Update from device packs
There are new(!) classic parts: ATmegaS64M1 and ATmegaS128. These
cosmic-ray tolerant "space" versions are functionally the same as the
corresponding models without S. The user won't know this from looking at
the part name printed on the part, so they receive a new mcuid.

The device packs define other genuinely new parts:
 - AVR16LA14 AVR16LA20 AVR16LA28 AVR16LA32
 - AVR32LA14 AVR32LA20 AVR32LA28 AVR32LA32

They receive their own data structures in the avr intelligence files
avrintel.c and libavrdude-avrintel.h.

Microchip decided to introduce new USART signals AUX0 and AUX1 for these
parts in addition to the known ones (RXD,  TXD, XCK, XDIR, USCK, RTS and
CTS). This necessitates an extension of the Usart_conf structure with aux0
and aux1 components. Note the data sheets are not yet available.
2026-01-07 00:59:50 +00:00
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