Commit Graph

2812 Commits

Author SHA1 Message Date
Stefan Rueger
45e94de70f Consolidate shell examples in documentation 2023-05-27 16:36:09 +01:00
Stefan Rueger
598b693f7e Merge branch 'main' into config 2023-05-27 14:21:28 +01:00
Stefan Rueger
d6bb233468 Merge pull request #1364 from MCUdude/cli-examples
Add more Avrdude CLI usage examples
2023-05-27 14:15:22 +01:00
Stefan Rueger
02b27ab52c Merge pull request #1363 from KantBe/main
Adds configuration for Kanda's AVRISP-U programmer.
2023-05-27 14:14:09 +01:00
Stefan Rueger
31711878bd Update documentation for terminal config 2023-05-27 01:22:11 +01:00
Stefan Rueger
df9a85655e Add AVR16EA... and AVR32EA... parts for terminal config 2023-05-26 19:36:49 +01:00
Stefan Rueger
a41f05c802 Indicate factory setting in terminal config error msgs if relevant 2023-05-26 19:34:23 +01:00
Stefan Rueger
3e845bf45e Revise alignment of terminal config output
Alignment happens for groups of different values of the same configuration
property, but only when the value lables differ in length by max of 10
characters. For example:

avrdude> c su=int*
avrdude warning: (config) ambiguous; known sut_cksel int* symbols are:
 - sut_cksel=intrcosc_8mhz_6ck_14ck_0ms    #  2
 - sut_cksel=intrcosc_128khz_6ck_14ck_0ms  #  3
 - sut_cksel=intrcosc_8mhz_6ck_14ck_4ms1   # 18
 - sut_cksel=intrcosc_128khz_6ck_14ck_4ms1 # 19
 - sut_cksel=intrcosc_8mhz_6ck_14ck_65ms   # 34
 - sut_cksel=intrcosc_128khz_6ck_14ck_65ms # 35
2023-05-26 01:40:56 +01:00
Stefan Rueger
e529fea40f Fix crcsel explanatory name in terminal config 2023-05-25 21:20:30 +01:00
Stefan Rueger
31f7781387 Align configuration properties in terminal config 2023-05-25 17:59:59 +01:00
Stefan Rueger
3545f22557 Rename some configuration properties for terminal config
... to make them more mnemonic

  active   => bodactive
  sleep    => bodsleep
  lvl      => bodlevel
  sampfreq => bodsampfreq
  period   => wdtperiod
  window   => wdtwindow
2023-05-25 17:55:54 +01:00
MCUdude
9080dd201e Fix terminal examples page formatting 2023-05-24 23:57:01 +02:00
MCUdude
afad3117b9 Hopefully fix page formatting 2023-05-24 18:39:14 +02:00
MCUdude
1cd894d934 Fix typo 2023-05-24 18:34:06 +02:00
MCUdude
78e9a8b997 Add missing backslashes 2023-05-24 18:33:31 +02:00
Stefan Rueger
f8d92be300 Silence overzealous compiler warning 2023-05-24 14:02:29 +01:00
Stefan Rueger
2f6bd01a7d Fix uninitialised variable warning 2023-05-24 13:51:26 +01:00
MCUdude
1f137b3d0d Mention error messages, warnings and progress reports 2023-05-23 23:35:26 +02:00
MCUdude
eaf0d89c6a Add flash strings example 2023-05-23 23:32:28 +02:00
MCUdude
5a668ae566 Improve formatting 2023-05-23 23:20:21 +02:00
MCUdude
c307b468bd Add elf write example 2023-05-23 20:07:54 +02:00
Quentin Berling
bbd85cdb7b Fix formatting with avrdude -cavrisp-u/s 2023-05-23 08:12:49 +02:00
Stefan Rueger
784eda6ff3 Provide terminal config command to set fuses and lock bits
Example:

$ avrdude -c dryrun -p AVR32DA32 -t
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9533 (probably avr32da32)

avrdude> c
config period=t_off # 0
config window=t_off # 0
config sleep=bod_disabled # 0
config active=bod_disabled # 0
config sampfreq=sf_128hz # 0
config lvl=bod_1v9 # 0
config clksel=oschf # 0
config eesave=eex_erased # 0
config rstpincfg=gpio # 0
config crcsel=crc16 # 0
config crcsrc=nocrc # 0b11 = 3
config sut=sut_0ms # 0
config codesize=0 # 0
config bootsize=0 # 0
config key=nolock # 0x5cc5c55c

avrdude> c active= -vv
config active=bod_disabled # 0 (brownout detection disabled)

avrdude> c sleep=3
avrdude warning: (config) assigning a reserved value (0x03) to sleep, check data sheet

avrdude> c -v sleep=
config sleep=0b11 # reserved = 3

avrdude> c sleep=bod_cont

avrdude> c -?
Syntax: config {<opts> | <property>[=<value>]}
Function: Show or change configuration properties of the part
Options:
    -f show value of fuse and lock bit memories as well
    -a output an initialisation script with all possible assignments
    -v increase verbosity, show explanations alongside output
    -h show this help message

Config alone shows all property names and current settings of the part's
hardware configuration in terms of symbolic mnemonics or values. Use

avrdude> config <property>

to show that of <property>. Wildcards or initial strings are permitted (but
not both), in which case all settings of matching properties are displayed.

avrdude> config <property>=

shows all possible values that <property> can take on with the currently
set one being the only that is not commented out. Assignments

avrdude> config <property>=<value>

modify the corresponding fuse or lock bits immediately but will normally only
take effect the next time the part is reset (see the data sheet). Value can
be a valid integer or one of the symbolic mnemonics, if known. Wildcards or
initial strings are permitted for the mnemonic, but an assignment only
happens if both the property and the name can be uniquely resolved.

It is quite possible, as is with direct writing to the underlying fuse and
lock bits, to brick a part, i.e., make it unresponsive to further programming
with the chosen programmer: here be dragons.
2023-05-22 23:18:26 +01:00
MCUdude
18baa1b646 Add Urboot/Urclock metadata example 2023-05-22 22:33:45 +02:00
Stefan Rueger
db9884361c Update avrintel.[ch] 2023-05-22 21:16:34 +01:00
MCUdude
4738c099b7 Add Digilent JTAG HS2 prog_modes + fix typo in desc 2023-05-22 21:57:44 +02:00
MCUdude
75db0e950f Add more usage examples 2023-05-22 21:56:01 +02:00
MCUdude
12951a0f4a Avrdude terminal now supports binary numbers 2023-05-22 18:55:12 +02:00
Quentin Berling
2799aa0bf8 Adds configuration for Kanda's AVRISP-U programmer. 2023-05-22 13:10:34 +02:00
Stefan Rueger
5ca48353c7 Add str_match() to str_util.c 2023-05-22 00:11:37 +01:00
MCUdude
3b40252c6c Add more CLI examples 2023-05-21 22:13:24 +02:00
Stefan Rueger
42d14cc195 Move itoa() implementation to str_util.c 2023-05-21 14:56:00 +01:00
Stefan Rueger
180b730d71 Make dryrun work regardless of programming modes 2023-05-21 11:49:30 +01:00
Stefan Rueger
ded200cae9 Add string upper/lowercase conversions to str_util.c 2023-05-20 21:35:58 +01:00
Stefan Rueger
0f6037a0fa Update avrintel.[ch] with configuration information
... whilst moving functions that locate a part in uP_table[] from
urclock.c to avrintel.c
2023-05-20 21:33:17 +01:00
Stefan Rueger
781595fe68 Fix some initial values of fuses/lock bits 2023-05-20 21:29:31 +01:00
Stefan Rueger
07bda5e913 Update NEWS 2023-05-20 21:16:12 +01:00
Stefan Rueger
9e9eb56cfd Merge pull request #1360 from stefanrueger/atxmega-A4U
Add fuse0 to ATxmega128A4U/64A4U/32A4U/16A4U
2023-05-20 20:45:22 +01:00
Stefan Rueger
dffeb4cf21 Merge pull request #1358 from stefanrueger/strutil
Extend <data> notion to files in terminal write
2023-05-20 20:44:07 +01:00
Stefan Rueger
d160b17f4c Mention XMEGA B also have fuse0 2023-05-20 12:53:01 +01:00
Stefan Rueger
34421a1da7 Add fuse0 to ATxmega128A4U/64A4U/32A4U/16A4U
See page 29 of Atmel's 8077I–AVR–11/2012 XMEGA A MANUAL
https://ww1.microchip.com/downloads/en/DeviceDoc/doc8077.pdf
2023-05-20 01:17:28 +01:00
Stefan Rueger
234aebd1dd Document reading from file with format :b, :o, :d and :h 2023-05-19 20:27:15 +01:00
Stefan Rueger
3815079c91 Auto detect :b, :o, :d and :h file formats 2023-05-19 20:18:53 +01:00
Stefan Rueger
1e07529b9b Document 0b binary integers and files for terminal write command 2023-05-19 17:51:23 +01:00
Stefan Rueger
e3ceb5e891 Update documentation of memory types for modern AVR parts 2023-05-19 16:12:27 +01:00
Stefan Rueger
5a8c051a22 Move file format conversions into one place 2023-05-19 15:28:56 +01:00
Stefan Rueger
8683476417 Enable :b :o :d and :h mode to be read from file
In fact not only lists of 0b-binary, octal, decimal and 0x-hex bytes can
be read, but also combinations of them, float numners and strings (just
like in terminal write). The immediate mode :m now can also read
terminal-type data (just be careful with preseving the quotes in the
shell through a double layer of quoting).

avrdude -U "eeprom:w:42.0,0b101010,42,0x2a,052,'*':m"
2023-05-18 18:06:12 +01:00
Stefan Rueger
d9e20708c1 Fix error in -U parsing 2023-05-18 00:22:05 +01:00
Stefan Rueger
fdedba8485 Simplify -U parsing so that more filenames with colons pass 2023-05-17 23:36:06 +01:00
Stefan Rueger
f119c0c29d Silence overzealous compiler warnings 2023-05-17 23:35:29 +01:00