Commit Graph

722 Commits

Author SHA1 Message Date
Stefan Rueger
53de22cb83 Update avrintel.c for LGT8F(8|16|32)8P parts 2022-11-20 01:12:14 +00:00
Stefan Rueger
f276d325ec Handle verification errors in read only memory areas gracefully 2022-11-20 00:27:49 +00:00
Stefan Rueger
ee25a62df6 Emulate chip erase in terminal when pgm->chip_erase() soft fails 2022-11-19 23:09:18 +00:00
Stefan Rueger
d65a9a3cee Adapt -c urclock to new reset vector protection in urboot v7.7 2022-11-19 19:39:39 +00: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
Joerg Wunsch
9df522a219 Add <sys/select.h> where appropriate
Under Posix systems, this header is documented to be required
when using select().
2022-11-17 14:14:22 +01:00
Joerg Wunsch
01be288b18 Add fallback for EM_AVR
OpenBSD still lacks this definition, so provide our own for
them.
2022-11-16 21:21:51 +01:00
Stefan Rueger
a3eeedd176 Silence some compiler warnings 2022-11-16 02:32:32 +00:00
Stefan Rueger
2abb666bd2 Prepare urclock for autobaud synchronisation 2022-11-16 02:08:13 +00:00
Stefan Rueger
d901e0a768 Update urbootPutVersion() to reflect urboot v7.7 changes 2022-11-16 00:42:36 +00:00
Stefan Rueger
82b9491cbd Harden urclock against bootloader bricking
- Detect write restrictions with new pgm->readonly(..., addr)
 - Check in byte-wise cached write whether mem/addr allows write
 - Emulated chip erase tells user CE is delayed until first -U
 - After bootloader CE urclock_chip_erase will init reset vector
 - Low level paged write @ 0 unconditionally protects reset vector
 - Low level paged read @ 0 checks and repairs reset vector
2022-11-16 00:08:46 +00:00
Stefan Rueger
afc2f7cf0c Hint at option -xdelay=... for urclock programmer not responding messages 2022-11-12 13:47:48 +00:00
Stefan Rueger
ff9c8bbe46 Silence min()/max() compiler warnings, fix urclock.c typo etc 2022-11-12 13:32:53 +00:00
Stefan Rueger
e2b69dec75 Remove MacOS compiler warnings for urclock.c 2022-11-12 01:12:31 +00:00
Stefan Rueger
b178deef5f Handle n_page_erase in urclock for parts t441, t841 and t1634 2022-11-11 01:33:42 +00:00
Stefan Rueger
6e3a99be87 Add write statistics for patched flash input files at notice2 level 2022-11-11 01:27:55 +00:00
Stefan Rueger
22bd977365 Indent erasing chip message in main 2022-11-10 23:18:43 +00:00
Stefan Rueger
c67bfe39a3 Show input file staistics before patching in update.c 2022-11-10 23:00:18 +00:00
Stefan Rueger
321bddbf7b Rename urclock's option forcetrim to restore 2022-11-10 22:35:40 +00:00
Stefan Rueger
2434c3f7f6 Make terminal write's automatic number width less surprising 2022-11-10 19:38:21 +00:00
Stefan Rueger
4c4952d4f6 Ensure default_programmer from config files is used 2022-11-10 18:20:13 +00:00
Stefan Rueger
afa408e2c6 Make urclock.c iron out a bug in some bootloaders 2022-11-09 21:00:16 +00:00
Stefan Rueger
d5d0b940cc Harden vector bootloaders more against reset overwrites 2022-11-09 19:28:29 +00:00
Stefan Rueger
84a3e2cc2b Fix avr.c comment 2022-11-09 19:27:34 +00:00
Stefan Rueger
c7ba53bca0 Harden urclock against terminal time outs and vector overwrites 2022-11-09 16:16:59 +00:00
Stefan Rueger
ea65918dca Omit verify after write failure in term.c 2022-11-09 15:43:57 +00:00
Stefan Rueger
20b86fb739 Warn in uclock when bootloader cannot read/write memories 2022-11-08 20:16:05 +00:00
Stefan Rueger
6a6d333849 Update urclock documentation 2022-11-08 15:18:30 +00:00
Stefan Rueger
cf3c81f714 Update urclock's -x parameters 2022-11-07 18:01:23 +00:00
Stefan Rueger
715db4c690 Make -A default for urclock programmer 2022-11-07 02:43:34 +00:00
Stefan Rueger
21d93ec8cb Update urclock programmer 2022-11-07 01:26:47 +00:00
Stefan Rueger
e6c26d8db4 Provide urclock programmer 2022-11-06 01:29:07 +00: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
mcuee
f2a413d2dc Merge branch 'avrdudes:main' into Xplained_Pro_PDI 2022-10-24 07:57:55 +08: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