Commit Graph

5241 Commits

Author SHA1 Message Date
Stefan Rueger
ccf27a4736 Remove write protection from jmp-to-application vector
When serving a vector bootloader, both -c urclock and now -c dryboot used
to protect two vectors in the vector table, the reset vector and the
dedicated vector to jump to the application.

Only the reset vector needs protecting to avoid the vector bootloader to
be bricked. While overwriting the other vector might turn out not helpful,
it's the same as with many other interventions, so much so that the driver
should not prevent that. Hence, this commit withdraws the protection of
the jmp-to-application vector.
2026-04-05 09:49:19 +01:00
Stefan Rueger
fbb7b0bafa Update -c dryboot documentation 2026-04-03 16:30:10 +01:00
Stefan Rueger
818078f20f Remove dryboot classic fuse protection 2026-04-03 12:05:45 +01:00
Stefan Rueger
37bc0afad7 Add bootloader and vector write protection 2026-04-03 01:49:16 +01:00
Stefan Rueger
bcb993f204 Patch sketches witch -c dryboot as with -c urclock -x nometadata 2026-04-03 01:12:20 +01:00
Stefan Rueger
fff6096902 Introduce int (*cmdhook)() 2026-04-02 23:18:23 +01:00
Stefan Rueger
03aa193722 Introduce int (*updatehook)() 2026-04-02 23:12:17 +01:00
Stefan Rueger
d1544c18ef Provide urbootPutVersion() 2026-04-02 22:51:41 +01:00
Stefan Rueger
3b481d45c9 Rename static urbootPutVersion() to urbootPutVersion8() 2026-04-02 19:06:31 +01:00
Stefan Rueger
7752adf740 Provide set_resetvector() 2026-04-02 12:29:14 +01:00
Stefan Rueger
378f364d8a Provide ur structure to describe bootloader 2026-04-02 00:44:01 +01:00
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