stefanrueger
485ad6de91
Provide fileio_format_with_errmsg()
2024-06-27 17:15:01 +00:00
stefanrueger
bc0c1a0499
Fix Windows complaint about missing random()/srandom()
2024-06-26 16:49:10 +00:00
stefanrueger
42081e5606
Initialise memories on -c dryrun -xinit or -xrandom
...
$ avrdude -c dryrun -xhelp
avrdude -c dryrun extended options:
-xinit Initialise memories with human-readable patterns (1, 2, 3)
-xrandom Initialise memories with random code/values (1, 3)
-xseed=<n> Seed random number generator with <n>, default time(NULL)
-xhelp Show this help menu and exit
Notes:
(1) -xinit and -xrandom randomly configure flash wrt boot/data/code length
(2) Patterns can best be seen with fixed-width font on -U flash:r:-:I
(3) Choose, eg, -xseed=1 for reproducible flash configuration and output
For example:
$ avrdude -c dryrun -p 16eb28 -xinit -xseed=7 -UALL:r:backup-dry.hex:I
backup-dry.hex will be a human-readable multi-memory .hex file for testing
that has memories initialised with non-trivial contents. Great care has
been taken that the generated flash code is valid and benign, ie, it won't
touch I/O peripherals, SRAM or flash.
Can be restored with
$ avrdude -cdryrun -p 16eb28 -U ALL:w:backup-dry.hex
2024-06-26 16:22:48 +00:00
Stefan Rueger
76353b8218
Provide str_is_in_list()
2024-06-25 14:33:00 +01:00
Stefan Rueger
9a834c37c7
Update avrintel.c
2024-06-25 12:06:49 +01:00
Stefan Rueger
41eacd0eed
Fix flash page size for x128a4
2024-06-25 12:04:25 +01:00
Stefan Rueger
ad312b985a
Fix boot_section_size for x128a4
2024-06-25 01:04:05 +01:00
Stefan Rueger
f06b3dd5b9
Fix boot_section_size for AVR-Ex parts
2024-06-25 00:08:54 +01:00
Stefan Rueger
d4d6835bdf
Fix dryrun's paged write to XMEGA overlapping flash memories
2024-06-24 17:28:22 +01:00
Stefan Rueger
f3fbb2eb1d
Default -U multi-memory backups to Intel Hex with comments
2024-06-24 00:24:29 +01:00
Stefan Rueger
1a2ac74a7b
Label segments with memory names in .hex:I output files
2024-06-23 20:50:31 +01:00
Stefan Rueger
9bf11fd67a
Make sigs argument of str_mcunames_signature() const
2024-06-23 20:38:20 +01:00
Stefan Rueger
eb412304ee
Provide avr_locate_uP()
2024-06-22 12:31:59 +01:00
Stefan Rueger
23324622d9
Formalise multi-memory address layout
2024-06-22 00:33:26 +01:00
Stefan Rueger
06b64bf9fb
Provide ALL memory (all + sub-memories excluded from all)
2024-06-21 21:40:02 +01:00
Stefan Rueger
2373b0a06c
Fix access for XMEGA sernum and tempsense
2024-06-20 00:06:25 +01:00
Stefan Rueger
5d322eb9dc
Add calibration, sernum and tempsense sub-memories to XMEGAs
2024-06-19 22:09:25 +01:00
Stefan Rueger
9576aec26a
Fix boot_section_size of ATxmega128A4
2024-06-19 21:57:35 +01:00
Stefan Rueger
59cda4a216
Parent XMEGA parts from common family sub-group
...
This commit makes the parent of XMEGA parts one of three common ones:
- .xmega-ab for XMEGA-A or XMEGA-B parts
- .xmega-cd for XMEGA-C or XMEGA-D parts
- .xmega-e for XMEGA-E parts
The commit does not change any feature of parts or memories.
In order to prove this carry out before this commit
$ avrdude -p */At >/tmp/1
After this commit, the following command should not have any output:
$ avrdude -p */At | sort | comm -3 - /tmp/1 | grep -v family.common.values
(The only feature changes in the .xmega-* prototypes.)
2024-06-19 21:52:01 +01:00
Stefan Rueger
9a446ec0bb
Check signature of part against multi-memory file signature
...
... to avoid tears when mistakenly restoring a backup from another part
$ avrdude -c dryrun -p t167 -U all:r:backup.hex:I
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9487 (probably t167)
avrdude: processing -U all:r:backup.hex:r
reading multiple memories ...
eeprom | ################################################## | 100% 0.00s
flash | ################################################## | 100% 0.00s
lfuse | ################################################## | 100% 0.00s
hfuse | ################################################## | 100% 0.00s
efuse | ################################################## | 100% 0.00s
lock | ################################################## | 100% 0.00s
signature | ################################################## | 100% 0.00s
calibration | ################################################## | 100% 0.00s
writing 16904 bytes to output file backup.hex
avrdude done. Thank you.
$ avrdude -c urclock -p m328p -b 115200 -P /dev/ttyUSB0 -U all✌️ backup.hex:I
avrdude -c urclock -p m328p -b 115200 -P /dev/ttyUSB0 -U all✌️ backup.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: processing -U all✌️ backup.hex:i
avrdude: verifying 16904 bytes of multiple memories against input file backup.hex
avrdude error: signature of ATmega328P does not match file (ATtiny167, ATA5505, ATA6617C, ATA664251)
use -F to override this check
avrdude done. Thank you.
$ avrdude -c dryrun -p m328p -U all:w:backup.hex:I -F
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: processing -U all:w:backup.hex:I
avrdude: reading 16904 bytes for multiple memories from input file backup.hex
avrdude: 512 bytes eeprom in 1 section [0, 0x1ff]: 128 pages and 0 pad bytes
writing 512 bytes to eeprom ...
writing | ################################################## | 100% 0.00s
reading | ################################################## | 100% 0.00s
512 bytes of eeprom verified
avrdude: 16384 bytes flash in 1 section [0, 0x3fff]: 128 pages and 0 pad bytes
writing 16384 bytes to flash ...
writing | ################################################## | 100% 0.00s
reading | ################################################## | 100% 0.00s
16384 bytes of flash verified
avrdude: 1 byte lfuse in 1 section [0, 0]
writing 1 byte to lfuse (0x62), 1 byte written, 1 verified
avrdude: 1 byte hfuse in 1 section [0, 0]
writing 1 byte to hfuse (0xdf), 1 byte written, 1 verified
avrdude: 1 byte efuse in 1 section [0, 0]
writing 1 byte to efuse (0xff), 1 byte written, 1 verified
avrdude: 1 byte lock in 1 section [0, 0]
writing 1 byte to lock (0xff), 1 byte written, 1 verified
avrdude done. Thank you.
2024-06-19 00:33:44 +01:00
Stefan Rueger
392ccf8814
Specify memory name in verfication error
2024-06-19 00:28:22 +01:00
Stefan Rueger
b366078e6a
Provide str_mcunames_signature()
2024-06-19 00:27:26 +01:00
Stefan Rueger
0e4d8fd483
Allow etc to be used in lieu of all in memory lists
2024-06-18 22:53:52 +01:00
Stefan Rueger
adf2e5b98b
Ignore but warn about verification errors in readonly memory
2024-06-18 22:37:33 +01:00
Stefan Rueger
128b82d9a8
Introduce without operator \ in memory lists
2024-06-18 22:30:50 +01:00
Stefan Rueger
847fcd5ad8
Utilise memory_list function for update_dryrun()
2024-06-18 19:12:44 +01:00
Stefan Rueger
f6e7eb7a6c
Separate function creating a memory list from a string
2024-06-18 18:49:24 +01:00
Stefan Rueger
afd65c040f
Enable verifying a single file against -U [<list>|all] ✌️ ...
2024-06-18 18:35:53 +01:00
Stefan Rueger
bb9df2f7bc
Automatic verify on writing to multiple -U memories
2024-06-18 17:17:11 +01:00
Stefan Rueger
3b728a3449
Provide avr_verify_mem()
2024-06-17 20:05:04 +01:00
Stefan Rueger
a3347d7b0d
Enable writing input to multiple memories via -U [<list>|all]:w:...
2024-06-17 17:18:15 +01:00
Stefan Rueger
bdde862bae
Prepare update.c for multiple memory write
2024-06-17 17:00:35 +01:00
Stefan Rueger
1cc25f3284
Unify memory description for memory list
2024-06-17 15:03:08 +01:00
Stefan Rueger
bc5db547d9
De-duplicate memory list, keeping order
2024-06-17 14:44:42 +01:00
Stefan Rueger
9ab4aac045
Switch off trailing 0xff optimisation when writing memory lists to file
...
It is crucial not to skip empty flash memory: otherwise the output file
cannot distinguish between flash having been deliberately dropped by the
user or it having been empty.
2024-06-17 12:41:02 +01:00
Stefan Rueger
0be19da627
Simplify code using string trim functions
2024-06-17 11:08:56 +01:00
Stefan Rueger
9f8eeaa76d
Provide string trim functions
2024-06-17 10:53:57 +01:00
Stefan Rueger
1d2983e46d
Provide memstats_mem()
2024-06-17 10:29:49 +01:00
Stefan Rueger
39ed283a11
Enable writing multi-memory files via -U all:r:... or -U <list>:r:...
2024-06-16 23:54:25 +01:00
Stefan Rueger
693f5e60bd
Provide str_numc(str, c)
2024-06-16 23:06:12 +01:00
Stefan Rueger
d949c06c71
Sort fuses by offset in memory list
2024-06-16 18:41:19 +01:00
Stefan Rueger
dfc22ea966
Provide fileio_mem() function
2024-06-16 17:53:43 +01:00
Stefan Rueger
c235adf5c9
Remove in-flash/sigrow attr if no respective memories exist
2024-06-16 17:45:33 +01:00
Stefan Rueger
0e61f33739
Remove 'in sigrow' attribute from some signature/calibration memories
2024-06-16 15:38:59 +01:00
Stefan Rueger
26d1753c9e
Fix memory leak from alias_mem_desc
2024-06-16 15:07:54 +01:00
Stefan Rueger
9273bd7bd4
Extend .srec fileio() to multiple-memory input files
2024-06-16 13:29:37 +01:00
Stefan Rueger
88a9a269be
Define mem_is_prodsig() and mem_is_usersig()
2024-06-16 13:06:49 +01:00
Stefan Rueger
61a130dc64
Extend .hex fileio() to multiple-memory input files
2024-06-16 13:04:25 +01:00
Stefan Rueger
dd6fea2e3d
Clarify role of Segorder where variable
2024-06-15 13:37:23 +01:00
Stefan Rueger
41781bdd3c
Update NEWS
2024-06-15 13:17:35 +01:00