Commit Graph

592 Commits

Author SHA1 Message Date
Jan Egil Ruud 32a6ca39e4 Cleaned up whitespace in jtag3.c so it at least is consistent within the file. 2022-11-22 13:05:14 +01:00
Jan Egil Ruud 10ccf0f515 Initial commit for jtag3 TPI support. Can read signature on ATtiny104 XPlained mini, but nothing else yet. 2022-11-21 21:18:13 +01:00
Joerg Wunsch f90e36f231 Add a workaround for issue #1173
The readline compat layer for libedit which otherwise provides native
readline functionality in NetBSD and MacOS appears to have a bug that
causes subsequent prompts to be delayed until another line is being
processed.

Re-installing the callback over and over again works around that, and
does not seem to harm with GNU libreadline.
2022-11-20 22:52:41 +01:00
Joerg Wunsch 77ad26ddf4 Replace the hint to AUTHORS by an URL
Suggested by: Hans
2022-11-18 21:24:10 +01:00
Joerg Wunsch efad24e3de Rewrite authors/copyrights 2022-11-18 10:31:45 +01:00
Stefan Rueger d211c4e5f5
Merge pull request #1164 from MCUdude/hvupdi-type2-fix
Fix Type 2 HV UPDI
2022-11-01 18:17:52 +00:00
Stefan Rueger 02fe08aed2
Open programmer before allocating part
So any programmer that knows exactly which part it is connected to
can set the -p part option should the user not have done so.

Also no longer exits main without closing open programmer.
2022-11-01 18:12:00 +00:00
MCUdude 577ee72db7 Fix Type 2 HV UPDI
Used on AVR-DD and AVR-Ex targets
2022-10-31 11:06:14 +01:00
Stefan Rueger 50046da923
Merge pull request #1151 from dbuchwald/serialupdi_page_erase
Implementation of SerialUPDI page erase operation
2022-10-29 11:02:17 +01:00
Stefan Rueger d87eb14dc9
Make -p variable partdesc global 2022-10-29 10:55:58 +01:00
Stefan Rueger 87df3216cb
Make fileio() and do_op() arguments const where possible 2022-10-29 10:48:47 +01:00
Stefan Rueger a1018999c4
Correct plural for message writing %d bytes in term.c 2022-10-26 08:42:03 +01:00
Stefan Rueger 418cf08e84
Change avrdude.conf.in comment on location of per-user config file 2022-10-25 18:13:28 +01:00
Stefan Rueger 3769332afd
Merge pull request #1142 from MCUdude/stk600-pdi
STK600 supports programming using PDI
2022-10-23 23:10:10 +01:00
Stefan Rueger ae5b460859
Merge pull request #1141 from stefanrueger/paged
Always use paged access for programmers that serve bootloaders
2022-10-23 22:33:31 +01:00
Stefan Rueger baaad71aa5
Support optiboot, optiboot_dx and optiboot_x bootloaders for -c arduino (#1140)
* If bootloaders are served, send word addresses for classic parts and
  byte addresses for newer parts, eg, UPDI and PDI
* Load ext addr for stk500v1 bootloaders after grazing 64k boundaries
* Fix bootloader stk500v1 EEPROM r/w for classic parts with page size 1
2022-10-23 22:32:29 +01:00
Stefan Rueger 16922842be
Improve -B bitclock documentation 2022-10-23 22:26:07 +01:00
Stefan Rueger 2c7083f001
Merge pull request #1139 from steelman/isp-clock-error-message
Mention -B in the error message and document -F better
2022-10-23 21:59:21 +01:00
Stefan Rueger 4f6bab6303
Merge pull request #1138 from MCUdude/pic-detect-mode-cherry
Detect PICkit4 and SNAP in PIC mode
2022-10-23 21:57:26 +01:00
Stefan Rueger 5b008a04cf
Revamp terminal output: progress bar, callback and stdout/stderr (#1132)
* Print parms output to stdout
* Flush terminal writes and other minor changes
* Prepare terminal for periodic calls to programmer to reset bootloader WDT
* Only show progress reports for memories > 32 bytes or on -vv
* Freeze progress bar on serious error
* Allow cached r/w byte routines to be used in pgm->read_byte and pgm->write_byte
2022-10-23 21:56:45 +01:00
steelman 34fa2faba5
Look for ~/.config/avrdude/avrduce.rc configuration file (#1131)
* Look for ~/.config/avrdude/config configuration file

Traditionally per-user configuration files have been placed
in user's home directory with their names beginnig with a dot
to hide them from some tools like ls(1). However, the number
of programs following this convention have grown over time
to the point where the number of hidden files becomes inconvenient to
some users. For this reason the XDG Base Directory Specification[1]
specifies an alternate place to store configuration files under
~/.config directory.

This patch enables avrdude to look for ~/.config/avrdude/config
configuration file, if ~/.avrduderc doesn't exist.

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.8.html

* Safely concatenate directories and configurations files and minor changes in docs

* Make stats variable available for WIN32 again in main.c

* Utilise full usr_config[] array space

* Check for xdg-style avrdude.rc file first before fallback ~/.avrduderc

Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
2022-10-23 21:52:54 +01:00
Dawid Buchwald fa1c081a94 Implemented page erase operation for SerialUPDI 2022-10-23 15:06:06 +02:00
MCUdude 992e9666a3 STK600 supports programming using PDI 2022-10-22 12:51:03 +02:00
Łukasz Stelmach c890ff90eb Mention -B in the error message
One of possible problems of failed initialization is too hight frequency
of ISP clock. Mention using -B option as a possible solution.

Closes #1133
2022-10-21 02:33:34 +02:00
Stefan Rueger b9396bcd02
Always use paged access for programmers that serve bootloaders 2022-10-21 00:56:43 +01:00
Łukasz Stelmach 9977f1ed12 Document meaning of -F during initialization 2022-10-20 19:52:35 +02:00
MCUdude 72da5c73db Fix formatting and replace tabs with spaces 2022-10-20 12:39:11 +02:00
MCUdude 867d83c215 Print error message if no HID device is connected when using hidapi 2022-10-20 12:27:59 +02:00
MCUdude 14446950df Check for PICkit4 or SNAP in PIC mode 2022-10-20 12:19:10 +02:00
MCUdude b083416e3b Let Avrdude use the valid SNAP USB PID first 2022-10-20 12:19:10 +02:00
MCUdude 13817459e1 Add missing USB VID/PIDs 2022-10-20 12:19:10 +02:00
MCUdude c999083b8f Change message type from error to warning and add additional USB info 2022-10-20 12:18:42 +02:00
Stefan Rueger b864d7e73a
Update NEWS and resolve minor residual messaging issues 2022-10-17 16:39:45 +01:00
Stefan Rueger e172877724
Review and overhaul AVRDUDE's messaging system (#1126)
* Change avrdude_message(MSG_XYZ, ...) to msg_xyz(...)
* Define and use pmsg_xyz(...) instead of msg_xyz("%s: ...", progname, ...)
* Review and change avrdude_message() levels
   - Introduce new levels warning, error and ext_error
   - Distribute info level to info, warning, error, ext_error
   - Assign levels (more) consistently
   - Unify grammar, punctuation and style of messages
* Use imsg_xyz() to print indented messages
* Show function name in errors and warnings on -v
* Reduce effective verbosity level by number of -q above one
2022-10-17 15:44:55 +01:00
Stefan Rueger 2503ae03ce
Merge pull request #1125 from MCUdude/updi-lock-fix
Fix UPDI erase when target is locked
2022-10-17 14:17:32 +01:00
Stefan Rueger ff1d26ad18
Merge pull request #1122 from mariusgreuel/pr-teensy-warning
Suppress Teensy USB communication error message on reboot
2022-10-17 14:17:07 +01:00
Stefan Rueger 8e879cfae6
Merge pull request #1121 from stefanrueger/avr_cache
Use byte-wise read/write when page size is 1 in terminal cache
2022-10-17 14:16:43 +01:00
Dan Applegate 946b701b08
Fix writing of last word on DWORD TPI parts (#1115)
* Fix writing of last word on DWORD TPI parts

* Add n_word_writes AVRMEM config option

* TPI word chunk mode in avr_write_mem

* Simplify addition of n_words_write mem component to grammar

Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
2022-10-17 14:15:50 +01:00
Stefan Rueger 08f4f6c63f
Merge pull request #1112 from MCUdude/jtag3-page-erase-updi
Fix jtag3_page_erase for targets with UPDI
2022-10-17 14:12:17 +01:00
MCUdude bfec594ffd Fix issue where locked UPDI devices couldn't be erased
Resolves issue #1124
2022-10-13 14:14:46 +02:00
Stefan Rueger 714c2fbf95
Rename variable for clarity in avrcache.c 2022-10-12 15:55:22 +01:00
Stefan Rueger 8a3864d263
Fall back on bytewise r/w if paged access fails for avr cache 2022-10-12 15:53:54 +01:00
Marius Greuel 86155bdf66 Suppress Teensy USB communication error message on reboot 2022-10-11 18:23:03 +02:00
Stefan Rueger 48919f59b3
Use byte-wise read/write when page size is 1 in terminal cache 2022-10-11 15:31:18 +01:00
Stefan Rueger e14e5d2f74
Update NEWS 2022-10-11 14:49:44 +01:00
Stefan Rueger 22362e9f08
Merge branch 'main' into pr-pointer-truncation 2022-10-11 14:43:19 +01:00
Stefan Rueger d3a3257cf7
Improve help message in terminal and provide new command pgerase (#1113) 2022-10-11 14:40:37 +01:00
Marius Greuel 9377acee0e Fix pointer truncation for Windows x64 2022-10-08 19:02:03 +02:00
MCUdude 1ca1be0447 Use avr_mem_is_flash_type() instead of checking m->desc directly 2022-10-06 20:59:32 +02:00
MCUdude d5e4ed9f89 Fix jtag3_page_erase for targets with UPDI
Very handy to have now that #1106 is merged
2022-10-05 23:52:05 +02:00