Commit Graph

3475 Commits

Author SHA1 Message Date
stefanrueger
4708f6e14e Emulate 512-byte protected bootloader for dryboot 2024-01-28 00:32:07 +13:00
stefanrueger
aa9369cd73 Fix warning grammar 2024-01-27 18:03:28 +13:00
stefanrueger
a460fcad55 Clarify documentation 2024-01-27 17:46:50 +13:00
stefanrueger
91d7c9f702 Document factory reset command 2024-01-27 13:13:10 +13:00
stefanrueger
bfd14562f9 Provide factory reset command 2024-01-27 13:12:49 +13:00
stefanrueger
084f25f188 Make terminal command args constant strings 2024-01-27 12:10:46 +13:00
stefanrueger
652ef2efc7 Document factory_fcpu part property 2024-01-27 12:09:57 +13:00
stefanrueger
6b71a8d253 Populate factory_fcpu values in avrdude.conf.in 2024-01-27 12:01:30 +13:00
stefanrueger
aa668fa6a3 Provide factory_fcpu variable 2024-01-27 11:54:01 +13:00
MCUdude
a757d8639c Add CH343 documentation URL 2024-01-26 13:40:39 +01:00
stefanrueger
625fcc4e33 Add dryboot programmer 2024-01-26 21:22:47 +13:00
MCUdude
8cf806f4c0 Add CH343 USB to serial adapter 2024-01-26 07:55:12 +01:00
stefanrueger
a59493f333 Fix upload of one-byte files to flash 2024-01-23 22:12:48 +13:00
Stefan Rueger
2f89aece1e Merge pull request #1631 from MCUdude/table-docs
Update `part` table in avrdude.texi
2024-01-22 13:56:55 +13:00
Stefan Rueger
ef7e8b3ed3 Merge pull request #1629 from MCUdude/pr1568-fix
Make linuxgpio.c compile #1568
2024-01-22 13:56:39 +13:00
Stefan Rueger
a922799414 Merge pull request #1625 from ndim/detect-dynamic-libreadline-in-USE_STATIC_LIBS-case
Detect dynamic readline and serialport libraries for avrdude USE_STATIC_LIBS builds
2024-01-22 13:56:04 +13:00
Stefan Rueger
e1def05780 Merge pull request #1618 from matthijskooijman/jtag3-raise-max-bitclock
Remove 1 Mhz limit on jtag3/atmelice/etc ISP bitclock
2024-01-22 13:55:36 +13:00
Stefan Rueger
3440bd65b7 Merge pull request #1615 from ndim/update-gpl-2.0-text
Update the GPL version 2 text
2024-01-22 13:54:50 +13:00
MCUdude
9de163d1f4 Update part table 2024-01-21 21:35:40 +01:00
MCUdude
baf98f0a47 Fix typo from PR #1568 2024-01-21 14:11:34 +01:00
Dawid Buchwald
1b0b263ae9 Implementation of NVM v4 protocol for #1621 2024-01-20 12:10:23 +01:00
Dawid Buchwald
45b5365830 Added candidate fix for #1622 2024-01-19 15:10:42 +01:00
Dawid Buchwald
d25cacd6fb Fix candidate for unconfirmed issue #1623 2024-01-19 09:13:36 +01:00
Hans Ulrich Niedermann
0b9d1bc1ff Detect dynamic readline and serialport for USE_STATIC_LIBS
Detect the dynamic libraries for libreadline and libserialport
even when building avrdude with USE_STATIC_LIBS.

Fixes: https://github.com/avrdudes/avrdude/issues/1624
2024-01-18 14:47:17 +01:00
Matthijs Kooijman
7580173593 Remove artificial limit on jtag3 bitclock
Previously, the code would limit the clock to 1Mhz. If a higher clock
was specified, it would be set to 1.024Mhz (0x400 khz).

This commit removes this artificial limit, while still preventing
overflowing the two bytes available in the command (effectively limiting
to 65535 kHz).

The original limit seems inappropriate, because the JTAGEICE3 and ATMEL
ICE actually support higher clocks than the old limit. For SPI, the
JTAGICE3 documents supporting up to 1.875Mhz and the ATMEL ICE up to
5Mhz. In practice the JTAGEICE3 (with the newer EDBG version where it
becomes pretty much identical to the ATMEL ICE) also works up to 5Mhz.

When trying to set higher values, the behaviour seems to depend on the
current value. The programmer seems to either keep the previous value
(e.g. from 3Mhz to 10Mhz), or use 8kHz / 125μs (e.g. from 5Mhz to
10Mhz). In any case, the value read back afterwards (and printed with
-v) reflects the actual value.

Also note that the code also applies a lower limit of 1kHz (to ensure
the raw value sent to the device, in kHz, is never zero), but in
practice sending a value of lower than 8kHz ends up setting 8kHz
(125μs). This is also the minimum value in the device documentation.

This commit was tested with:

         Programmer Type       : JTAG3_ISP
         Description           : Atmel AVR JTAGICE3 in ISP mode
         ICE HW version        : 2
         ICE FW version        : 3.55 (rel. 130)
2024-01-16 17:07:01 +01:00
Dawid Buchwald
d38fa2a157 Added reset request to NVMprog operation 2024-01-15 16:31:06 +01:00
Dawid Buchwald
db5d6f4c89 Added support for NVM v5, based on NVM v3 2024-01-14 19:52:48 +01:00
Hans Ulrich Niedermann
ececf3258e Update the GPL version 2 text
Update the GPL version 2 text to the current text as published at

    https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

The changes are
  * the updated mailing address of the FSF
  * reference to LGPL with name change ("Library" -> "Lesser")
  * whitespace formatting
  * "write to" new FSF address to get a copy of the license
    instead of "seeing http://www.gnu.org/licenses/"
2024-01-11 23:26:42 +01:00
Dawid Buchwald
c0199fa714 Merge branch 'avrdudes:main' into issue_1609 2024-01-11 21:09:14 +01:00
Dawid Buchwald
c33ec9c51b Updated NVM controller code to latest pymcuprog 2024-01-11 20:56:13 +01:00
mcuee
a336e47a6e Update README.md for Linux avrdude package installation
The original `apt-get` command is only for Debian/Ubuntu or similar distros.
2024-01-10 11:13:19 +08:00
mcuee
5b7f66da04 Update README.md
Change Mac OS to macOS.
Adding Homebrew for macOS.
2024-01-10 11:09:17 +08:00
Dawid Buchwald
2358893974 Split current NVM code into three separate modules 2024-01-09 18:24:28 +01:00
stefanrueger
5b3c3139d0 Remove test code 2024-01-08 22:39:44 +13:00
stefanrueger
0dd7804d7d Update NEWS 2024-01-08 22:27:01 +13:00
Stefan Rueger
a8837f4bb0 Merge pull request #1612 from mcuee/github_action_clang
Update build.yml to add MSYS2 ucrt64, clang32 and clang64 build
2024-01-08 22:25:40 +13:00
Stefan Rueger
2d872af5e0 Merge pull request #1608 from stefanrueger/z-scanf-modifier
Harden AVRDUDE against pre-C99 libraries
2024-01-08 22:25:12 +13:00
mcuee
8f4fd46874 Update build.yml to add MSYS2 ucrt64, clang32 and clang64 build 2024-01-08 10:22:34 +08:00
stefanrueger
9053883313 Suppress cast warning 2024-01-08 11:01:01 +13:00
stefanrueger
c4dcc34e58 Replace %z... modifiers in printf/scanf 2024-01-07 23:09:55 +13:00
stefanrueger
5bd5d54046 Warn if C library fails %zi scanf format 2024-01-07 23:08:53 +13:00
stefanrueger
03d786e8b0 Update NEWS 2024-01-04 02:09:15 +13:00
Hans
60df52326f Look for matching prog_modes in locate_part_by_signature() (#1605) 2024-01-04 02:06:33 +13:00
Stefan Rueger
593ea4f83b Merge pull request #1604 from askn37/pr1602-nano-every-eeprom
Arduino Nano Every EEPROM writing
2024-01-04 02:05:12 +13:00
朝日薫 / K.Sato
ed017002af jtagmkII_updi_term_keep_alive (#1603) 2024-01-04 02:04:41 +13:00
Stefan Rueger
d11e2f6232 Merge pull request #1602 from stefanrueger/eeprom-optiboot-updi
Force STK500 EEPROM paged r/w for bootloaders
2024-01-04 02:03:41 +13:00
Stefan Rueger
0b1ac3a4f5 Merge pull request #1601 from stefanrueger/avr64du28-32
Support AVR64DU28 and AVR64DU32
2024-01-04 02:03:18 +13:00
Hans
a245cd5370 Use -xmode to switch PICkit4 and SNAP application modes (#1596)
* Use libusb to switch a PICkit4 or SNAP to AVR mode

* Fix case

* implement -xmode=pic
Thanks Wireshark

* Print PIC switch info messages

* Fix typo

* Rename SNAP and PICkit4 USB PID

* Make it possible to enter avr mode even when the tool is in bootloader/recovery mode

* Add -xmode to docs

* Tweak grammar

* Add -xmode support for pickit4_isp and snap_isp
still need to figure out how to actually trigger the mode switch form stk500v2.c

* Don't print "unable to open port" error on pgm->open softfail

* Add const

* Simplify SNAP/PICkit4 mode switching code

* Formatting

* Add extra argument to jtag3_open_common
This makes it possible to switch SNAP/PK4 modes from stk500v2.c as well, using pickit4_isp and snap_isp

* Improve extended parameter parsing

* Improve error message

* Improve extended parameter parsing

* Immediately exit after a mode switch

* Remove unnecessary line

* Add missing serial_close

* Remove unnecessary else

* Minor code tweaks

* Update docs

* Formatting

* Improve external parameter parsing and error handling

* Remove unused parameter
2024-01-04 02:02:24 +13:00
askn37
f0a82fdcc6 Nano Every EEPROM writing 2023-12-27 21:47:47 +09:00
stefanrueger
d08a14ced3 Correct bootrow size 2023-12-25 01:12:09 +13:00