Improve formatting

This commit is contained in:
MCUdude
2023-05-23 23:20:21 +02:00
parent c307b468bd
commit 5a668ae566

View File

@@ -1512,7 +1512,6 @@ avrdude done. Thank you.
@end cartouche
@end smallexample
@page
@noindent
Dump the flash memory from the ATmega128 connected to the STK500
programmer and save it in raw binary format in the file named
@@ -1658,22 +1657,24 @@ avrdude done. Thank you.
@end cartouche
@end smallexample
@page
@noindent
Execute multiple terminal mode commands separated by semicolons:
@smallexample
@cartouche
% echo 'write eeprom 0 "Bonjour le mode"; write eeprom 0x18 0x12345678; dump eeprom 0 0x20' | avrdude -cusbasp -patmega328p -t
% echo 'write eeprom 0 "Bonjour"; write ee 0x18 0x12345678; dump eeprom 0 0x20' |
> ./avrdude -cusbasp -patmega328p -t
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
Caching | ################################################## | 100% 0.01 s
Caching | ################################################## | 100% 0.00 s
Caching | ################################################## | 100% 0.00 s
Reading | ################################################## | 100% 0.00 s
0000 42 6f 6e 6a 6f 75 72 20 6c 65 20 6d 6f 64 65 00 |Bonjour le mode.|
Reading | ################################################## | 100% 0.01 s
0000 42 6f 6e 6a 6f 75 72 00 ff ff ff ff ff ff ff ff |Bonjour.........|
0010 ff ff ff ff ff ff ff ff 78 56 34 12 ff ff ff ff |........xV4.....|
avrdude> avrdude: synching cache to device ...
Writing | ################################################## | 100% 0.25 s
Writing | ################################################## | 100% 0.13 s
avrdude done. Thank you.
@@ -1686,14 +1687,14 @@ Read EEPROM and write content to stdout (standard output):
@smallexample
@cartouche
% avrdude -cusbasp -pattiny13 -Ueeprom:r:-:I
% avrdude -cusbasp -pattiny13 -Ueeprom:r:-:i
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9007 (probably t13)
avrdude: reading eeprom memory ...
Reading | ################################################## | 100% 0.02 s
avrdude: writing output file <stdout>
:2000000054686520717569636B2062726F776E20666F780AFFFFFFFFFFFFFFFFFFFFFFFFCF // 00000> The_quick_brown_fox.............
:20002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 // 00020> ................................
:20000000E2809954686520717569636B2062726F776E20666F78E280990AFFFFFFFFFFFFD3
:20002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:00000001FF
avrdude done. Thank you.
@@ -1728,6 +1729,7 @@ Factory fuse setting of a device:
@end cartouche
@end smallexample
@page
@noindent
List of all parts known to AVRDUDE:
@@ -1759,7 +1761,8 @@ part to factory settings:
mkdir /tmp/factory
for part in $(avrdude -p*/d | grep = | cut -f2 -d"'"); do
echo $part
avrdude -p$part/St | grep initval | cut -f3,5 | grep -ve-1 | sed "s/.*/write &/" >/tmp/factory/$part.ini
avrdude -p$part/St | grep initval | cut -f3,5 | grep -ve-1 |
sed "s/.*/write &/" >/tmp/factory/$part.ini
done
$ cat /tmp/factory/ATmega328P.ini
@@ -1797,6 +1800,7 @@ Valid programmers for part AVR32EA32 are:
@end cartouche
@end smallexample
@page
@noindent
Print all metadata stored in flash using the Urboot bootloader and
the Urclock programmer option:
@@ -1805,7 +1809,8 @@ the Urclock programmer option:
% avrdude -curclock -P/dev/ttyUSB0 -pattiny13 -xshowall
avrdude: AVR device initialized and ready to accept instructions
0 2023-05-22 22.03 Blink.ino.hex 78 store 665 meta 25 boot 256 u7.7 w-u-jPr-- vector 4 (EE_RDY) ATtiny13A
0 2023-05-22 22.03 Blink.ino.hex 78 store 665 meta 25 boot 256 u7.7 w-u-jPr--
vector 4 (EE_RDY) ATtiny13A
@end cartouche
@end smallexample
@@ -1833,49 +1838,38 @@ avrdude -cusbasp -pattiny13 -U{eeprom,flash,{l,h}fuse,lock}:w:"$1":e "${@:2}"
}
@end verbatim
# Run function where -B8 is appended to the Avrdude command
$ avrdude-elf program.elf -B8
# Run function where -B8 and -V is appended to the Avrdude command
$ avrdude-elf program.elf -B8 -v
avrdude: set SCK frequency to 93750 Hz
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9007 (probably t13)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file program.elf for eeprom
avrdude: reading input file Blink.elf for eeprom
with 0 bytes in 0 sections within [0, -1]
using 0 pages and 0 pad bytes
avrdude: writing 0 bytes eeprom ...
Writing | ################################################## | 100% 0.00 s
avrdude: 0 bytes of eeprom written
avrdude: verifying eeprom memory against program.elf
Reading | ###########################
avrdude: reading input file program.elf for flash
avrdude: reading input file Blink.elf for flash
with 78 bytes in 1 section within [0, 0x4d]
using 3 pages and 18 pad bytes
avrdude: writing 78 bytes flash ...
Writing | ################################################## | 100% 0.10 s
Writing | ################################################## | 100% 0.09 s
avrdude: 78 bytes of flash written
avrdude: verifying flash memory against program.elf
Reading | ################################################## | 100% 0.05 s
avrdude: 78 bytes of flash verified
avrdude: reading input file program.elf for lfuse
avrdude: reading input file Blink.elf for lfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lfuse ...
avrdude: 1 byte of lfuse written
avrdude: verifying lfuse memory against program.elf
avrdude: 1 byte of lfuse verified
avrdude: reading input file program.elf for hfuse
avrdude: reading input file Blink.elf for hfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte hfuse ...
avrdude: 1 byte of hfuse written
avrdude: verifying hfuse memory against program.elf
avrdude: 1 byte of hfuse verified
avrdude: reading input file program.elf for lock
avrdude: reading input file Blink.elf for lock
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against program.elf
avrdude: 1 byte of lock verified
avrdude done. Thank you.