Commit Graph

42 Commits

Author SHA1 Message Date
Stefan Rueger 40896802af
Allow integer expressions in config file where numbers are expected
Notable exceptions are for pin numbers and where numbers are separated by
space only, eg, in signature and readback assignments.
2022-08-31 11:29:06 +01:00
Stefan Rueger 626a43b139
Add avrintel.[ch] to the project and warn if mcuid incompatible with avrintel.c 2022-08-30 19:48:17 +01:00
Stefan Rueger ed2b8342df
Prepare for new components in avrdude.conf incl prog_modes
- Add prog_modes to part and programmer definitions; prog_mode is a bitwise
   or of programming modes
     + PM_SPM: Bootloaders, self-programming with SPM/NVM Controllers
     + PM_TPI: t4, t5, t9, t10, t20, t40, t102, t104
     + PM_ISP: SPI programming for In-System Programming (typ classic parts)
     + PM_PDI: Program and Debug Interface (xmega parts)
     + PM_UPDI: Unified Program and Debug Interface
     + PM_HVSP: High Voltage Serial Programming (some classic parts)
     + PM_HVPP: High Voltage Parallel Programming (most non-HVSP classic parts)
     + PM_debugWIRE: Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
     + PM_JTAG: some classic parts, some xmega
     + PM_aWire: AVR32 parts
 - Add mcuid, a unique id in 0..2039, to part definition for urclock programmer
 - Add n_interrupts, the number of interrupts, to part definition
 - Add n_page_erase to part definition (# of pages erased during NVM erase)

 - Implement a simple calculator in config_gram.y so numeric values can be
   expressed as simple expressions such as PM_SPM | PM_UPDI

 - Introduce a new method of assigning simple components to the grammar without
   touching config_gram.y via an eligible-component list in config.c; numeric
   expressions on the rhs of an assignment resolve to integer values

 - Update documentation in avrdude.conf.in and avrdude.texi
2022-08-30 02:08:15 +01:00
Stefan Rueger c03f4a7925
Use const in PROGRAMMER function arguments where appropriate
In order to get meaningful const properties for the PROGRAMMER, AVRPART and
AVRMEM arguments, some code needed to be moved around, otherwise a network of
"tainted" assignments risked rendering nothing const:

 - Change void (*enable)(PROGRAMMER *pgm) to void (*enable)(PROGRAMMER *pgm,
   const AVRPART *p); this allows changes in the PROGRAMMER structure after
   the part is known. For example, use TPI, UPDI, PDI functions in that
   programmer appropriate to the part. This used to be done later in the
   process, eg, in the initialize() function, which "taints" all other
   programmer functions wrt const and sometimes requires other finessing with
   flags etc. Much clearer with the modified enable() interface.

 - Move TPI initpgm-type code from initialize() to enable() --- note that
   initpgm() does not have the info at the time when it is called whether or
   not TPI is required

 - buspirate.c: move pgm->flag to PDATA(pgm)->flag (so legitimate
   modification of the flag does not change PROGRAMMER structure)

 - Move AVRPART_INIT_SMC and AVRPART_WRITE bits from the flags field in
   AVRPART to jtagmkII.c's private data flags32 fiels as FLAGS32_INIT_SMC and
   FLAGS32_WRITE bits

 - Move the xbeeResetPin component to private data in stk500.c as this is
   needed by xbee when it saddles on the stk500 code (previously, the flags
   component of the part was re-dedicated to this)

 - Change the way the "chained" private data are used in jtag3.c whilst
   keeping the PROGRAMMER structure read-only otherwise

 - In stk500v2.c move the STK600 pgm update from stk500v2_initialize() to
   stk500v2_enable() so the former keeps the PROGRAMMER structure read-only
   (for const assertion).

 - In usbasp change the code from changing PROGRAMMER functions late to
   dispatching to TPI or regular SPI protocol functions at runtime; reason
   being the decision whether to use TPI protocol is done at run-time
   depending on the capability of the attached programmer

Also fixes Issue #1071, the treatment of default eecr value.
2022-08-17 16:05:28 +01:00
Stefan Rueger ed36c7e1f6
Merge branch 'main' into fix_1041 2022-08-04 18:03:49 +01:00
Stefan Rueger 18e5bfd203
Merge pull request #1033 from MCUdude/ignore-safemode-flag
Ignore `-s` flag as safemode is no longer supported
2022-08-02 18:26:58 +01:00
Stefan Rueger 7730706498
Merge pull request #1030 from stefanrueger/ihexcomments
Provide file format I: Intel HEX with comments that ignores checksum errors
2022-08-02 18:23:23 +01:00
MCUdude 248c17177c Mention -s and -u in the docs 2022-07-23 22:33:11 +02:00
Joerg Wunsch ce1ae41dd6 Document that 'h', 'o', and 'd' file formats are output-only. 2022-07-23 16:30:38 +02:00
Stefan Rueger 6fa7400e4e
Merge pull request #1015 from MCUdude/hv-updi
Add support for high-voltage UPDI
2022-07-18 14:28:39 +01:00
Stefan Rueger 79921e52dc Provide file format I: Intel HEX with comments that ignores checksum errors
The new file type I is essentially Intel HEX that, on download, inserts
comments next to data records with the resolved effective address and an
ASCII dump of that same record. On upload the `I` format is permissive
with respect to check sum errors, eg, after manipulated an Intel HEX file
for debugging.
2022-07-16 23:40:36 +01:00
Stefan Rueger 0edb77bdf8
Merge branch 'main' into issue918 2022-07-12 15:05:45 +01:00
MCUdude 50220289bb Add high-voltage UPDI info to docs 2022-06-29 17:12:57 +02:00
Stefan Rueger 580c37fbfe Describe -A in the man and .texi documentation 2022-04-29 00:14:45 +01:00
Joerg Wunsch 08ad5ea445 Fix broken texinfo
@ must be escaped as @@
2022-04-26 23:19:20 +02:00
MCUdude 08bd5fa938 Add string write to terminal example 2022-04-05 19:37:45 +02:00
Hans aa7ae7bb87
Add MacOS serial/parallel port note (#908)
Closes #510
2022-03-31 22:32:57 +02:00
Joerg Wunsch 8697f6def7 Remove remnants of the old erase-cycle counter from examples 2022-03-21 06:38:28 +01:00
Joerg Wunsch 33bace0cee Provide an example for the second form of the "write" command
In terminal mode, there are two forms of "write", one that
explicitly mentions all data values, and a second one that
instead specifies a total range to write, where the last data
value given is replicated as needed.
2022-03-19 17:30:55 +01:00
Joerg Wunsch 0c912a201f Try making the cindex (concept index) meaningful
Rearrange existing @cindex entries, add a lot of new ones.
2022-03-19 00:03:17 +01:00
Joerg Wunsch 31feb9ff75 Link the concept index 2022-03-19 00:00:54 +01:00
Joerg Wunsch 29a01c1047 Terminal mode: fix documentation of second version of "write"
Right after start_addr, the next element is the number of bytes
to be written.
2022-03-18 23:42:32 +01:00
Joerg Wunsch 67b56d322b Update texinfo documentation for terminal-mode changes
This documents the recent changes that have been implemented in
terminal mode.
2022-03-17 23:13:52 +01:00
Joerg Wunsch da1271642e Remove the pointer to the mailing list
It makes more sense to point people to Github issue trackers now,
even for questions.
2022-03-13 22:52:44 +01:00
Joerg Wunsch 416c465ec0 Bring the texinfo doc up to date
* remove copyright years; they are not meaningful anyway
* reflect the project move from Savannah to Github
2022-03-13 00:13:29 +01:00
Joerg Wunsch 0269817217 Add a missing @end table
Has been slipped when adding some -x documentation before.
2022-02-21 22:01:05 +01:00
Joerg Wunsch 8c6c6a14ec Remove the "safemode" feature.
This feature has been designed with the sometimes quite flakey direct
(parallel or serial port attached) bitbang programming adapters in
mind that were quite common about two decades ago.

With parallel ports vanishing from modern PCs almost completely, and
the advent of various USB-attached low-cost programming devices,
this class of programmers disappeared almost completely.

Furthermore, the fuse combinations that were covered by the feature
are no longer around on all recent AVR devices, so for an ever
increasing number of devices, safemode already became meaningless and
was turned off anyway.

With the prospective version 7.x release, it's a good point in time to
introduce a major change like this one.
2022-01-31 20:44:32 +01:00
MCUdude ad6eff0f76 Set number of Arduino/STK500 connection retry attempts
Using the extended parameter flag -x. Usage: . Default number of attempts is still 10 if not -x flag is specified
2022-01-25 09:40:24 +01:00
Joerg Wunsch 37b0659951 PR #816 merged
Copy over man page additions into texinfo file as well.
2022-01-21 21:56:07 +01:00
Joerg Wunsch 153031d6d6 Copy over description of extended parameters to avrdude.1 2022-01-14 08:18:56 +01:00
Dawid Buchwald 90d0fa7346 Merge remote-tracking branch 'avrdudes/main' into main 2022-01-13 09:57:42 +01:00
Joerg Wunsch c7f7fcda8e Fix URL for linuxgpio programmer
Closes #419
2022-01-10 22:12:36 +01:00
Dawid Buchwald 1631fc4dd8 Implemented extended parameter for RTS/DTR lines management 2022-01-08 10:04:25 +01:00
Marius Greuel f20c4bd9e6 Add support for Teensy bootloader 2022-01-06 23:39:17 +01:00
Hans 4b76ccc951
Merge branch 'main' into main 2022-01-05 08:05:38 +01:00
Marius Greuel 3747db516a Add support for Micronucleus bootloader 2022-01-04 18:37:57 +01:00
Kristof Mulier 5c896992cd
Find 'avrdude.conf' based on absolute path to executable (#780)
* Find 'avrdude.conf' based on absolute path to executable

* Update coding style

* Update coding style

* Update 'src/doc/avrdude.texi' to reflect the new search method for 'avrdude.conf'
2022-01-03 23:20:31 +01:00
MCUdude f5bec43812 Add jtag2updi programmer to docs 2022-01-02 12:13:15 +01:00
MCUdude 2623e7a9fa Update docs to reflect new programmers 2022-01-01 12:06:52 +01:00
Dawid Buchwald c48c5135d8 Added SerialUPDI related documentation 2021-12-26 14:34:01 +01:00
Marius Greuel 60cb548075 Remove 'windows' folder with giveio.sys driver 2021-12-21 17:45:35 +01:00
Marius Greuel 5633a6d88a Move source files to 'src' folder 2021-12-17 09:17:42 +01:00