Commit Graph

3252 Commits

Author SHA1 Message Date
stefanrueger
fd1c49e538 Provide avr_get_config_value() and avr_set_config_value() functions
Example usage:

  int ocden = 0;
  if(avr_get_config_value(pgm, p, "ocden", &ocden) == 0 && ocden) // ocden == 1 means disabled
    pmsg_warning("OCDEN fuse not programmed, single-byte EEPROM updates not possible\n");
2023-11-23 17:42:07 +13:00
stefanrueger
606658a12d Update NEWS 2023-11-22 23:50:16 +13:00
Stefan Rueger
bf1aa2bcb8 Merge pull request #1576 from mcuee/mingw_readline_test
Add GNU readline to mingw github action
2023-11-22 23:41:34 +13:00
Stefan Rueger
6df3f9894b Merge pull request #1571 from stefanrueger/sram
Add memory sram and remove memory data
2023-11-22 23:37:47 +13:00
Stefan Rueger
c394fcf23e Merge pull request #1569 from mcuee/cmake_update
Update src/CMakeLists.txt
2023-11-22 23:36:49 +13:00
Hans
664d36df07 Update part cmd (#1568)
Co-authored-by: stefanrueger <stefan.rueger@urclocks.com>
2023-11-22 23:35:47 +13:00
Martin
92c576d942 Support for STK500 v1 and v2 devices with STK500_XTAL != 7372800 (#1566)
* fix -x vtarg handling (HAS_VTARG_READ vs. HAS_VTARG_ADJ)
* stk500v1: implement new option -x xtal=nnn (part of #1560)
* fix parsing of frequencies, values w/o k or M prefix were not recognised
   now frequency parameter fosc=nnnn or fosc=nnnnH[z] are also ok
* stk500v2: xtra argument -x xtal=nnnn
* unify xtra argument messages for v1 and v2, better error message wording
* update man and doc
* stk500v1: add option -B handling identical to stk500v2
* allow spaces in extra parameter, e.g. -x "fosc= .1e3 kHz"

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
2023-11-22 22:23:45 +13:00
mcuee
c4b5097b1f Use -static linking option for MinGW
This will prevent the dependency to libwinpthread-1.dll.
2023-11-20 15:39:36 +08:00
mcuee
390e3bacd8 Add GNU readline to mingw github action
Same as https://github.com/avrdudes/avrdude/pull/1513.
2023-11-20 15:23:02 +08:00
stefanrueger
a3a1871d9b Sort all memories of all parts in canonical order 2023-11-17 14:28:51 +13:00
stefanrueger
1b9d087004 Handle SRAM r/w 2023-11-16 11:27:22 +13:00
stefanrueger
1d2a36c6db List memory sram after io 2023-11-16 11:14:07 +13:00
stefanrueger
309e6baf18 Add memory sram at the expense of data
The memory data was introduced for the sole purpose to provide an
nvm_data_offset for Microchip programmers. As an address offset it would
tell programmers to read/write in data space. It so turned out that this
nvm_data_offset always was 0x1000000 for PDI and UPDI parts.

This commit removes this artificial data memory and treats the data offset
in the code as what it currently is: a constant.

At the same time the commit introduces an sram memory with offset and size
for virtually all parts known to AVRDUDE.
2023-11-15 22:55:10 +13:00
mcuee
20b6df6b04 Update src/CMakeLists.txt
This is to adopt the CMake improvements in PR #1553 even though the PR itself was abondoned.

The author of the change is @Youw.
2023-11-14 20:55:35 +08:00
stefanrueger
c82fec9c4b Update NEWS 2023-11-13 02:33:24 +00:00
Hans
ce59853981 Print warning when avrdude and avrdude.conf versions doesn't match (#1564) 2023-11-13 02:31:11 +00:00
Hans
71bf4f72a9 Always print error if part and programmer doesn't have a common programming interface (#1563)
* Harmonize WIN32 implementation of serial time-outs with Posix

This is from @mariusgreuel in Issue #1249.
https://github.com/avrdudes/avrdude/issues/1249

> The WIN32 time-out is specified as ReadTotalTimeoutConstant + buflen * ReadTotalTimeoutMultiplier, which makes it potentially much longer than the Posix one (i.e. at least double). ReadIntervalTimeout is also set to timeout, which essentially renders the interval timeout ineffective, so IMHO, we should explicitly disable that feature.

* Update NEWS

* Always print error if part and programmer doesn't have a common programming interface
even though the user uses -F. It won't exit though.

* Don't mention -F in error message if -F is already used

---------

Co-authored-by: mcuee <xiaofanc@gmail.com>
Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
2023-11-13 02:30:30 +00:00
Stefan Rueger
fb550221c7 Merge pull request #1555 from stefanrueger/option-N
Provide option -N for do not load personal config file
2023-11-13 02:29:10 +00:00
stefanrueger
0c385910a8 Update NEWS 2023-11-11 17:10:05 +00:00
Stefan Rueger
9596faac79 Merge pull request #1557 from stefanrueger/programmer-not-recognised
Test programmers for prog_modes and type
2023-11-11 16:47:43 +00:00
Stefan Rueger
0fe1bf0e29 Merge pull request #1556 from stefanrueger/no-paged-eeprom
Remove paged eeprom property from ATtiny43U
2023-11-11 16:47:02 +00:00
Stefan Rueger
736c158d0b Merge pull request #1554 from stefanrueger/signature-write
Review write_byte() functions
2023-11-11 16:31:36 +00:00
Stefan Rueger
84e7ff134d Suppress multiple-modes warnings for dryrun type programmers 2023-11-04 15:08:47 +00:00
Stefan Rueger
cf4285f5b8 Test programmers for prog_modes and type
This corrects the error message when AVRDUDE cannot use a programmer to
say it is owing to lack of prog_modes or type.
2023-11-03 17:21:52 +00:00
Stefan Rueger
3f647ec6db Remove paged eeprom property from ATtiny43U
The property paged should only be used for flash of classic parts.
2023-11-03 17:18:38 +00:00
Stefan Rueger
ff3e65e34a Provide option -N for do not load personal config file 2023-11-03 17:15:15 +00:00
Stefan Rueger
97badba85d Review write_byte() functions ...
adding code that allows read-only memories to appear written successfully
provided the data to be written is already in the memory. This is useful
so that "writing" a backup to read-only memories works
  - Without generating an error
  - Without actually trying to write to the part

Trying to write a read-only memory with a byte that is not there will
cause a write error. This is useful if for example one tries to write a
backup of a part to another part with different signature. If the
signature is written back first, this constitutes a "check we are writing
to the same type of part".
2023-11-03 17:07:03 +00:00
Stefan Rueger
08b82ea69e Update NEWS 2023-11-03 13:46:13 +00:00
Stefan Rueger
c37a90907b Merge pull request #1550 from mcuee/issue1249
Harmonise WIN32 and POSIX serial comms timeout
2023-11-03 13:40:24 +00:00
朝日薫
a0dfe3b377 Issue#1546 Allow UPDI_SIB of AVR_EB in serialupdi (#1549) 2023-11-03 13:38:31 +00:00
朝日薫
d42f7d8ae1 Change execution position of REVID check (#1543) 2023-11-03 13:33:51 +00:00
mcuee
8222ad8ffc Add Arduino avrdude_packing github action for git man (#1540)
Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
2023-11-03 13:27:36 +00:00
Stefan Rueger
d8b9b92b2a Merge pull request #1538 from stefanrueger/memory-types
Introduce memory types in lieu of string comparisons with memory names
2023-11-03 13:24:12 +00:00
Stefan Rueger
f9920fc11e Treat chip_rev as unsigned char 2023-11-03 13:05:01 +00:00
Stefan Rueger
291f9ff288 Remove unused variables 2023-11-03 13:00:27 +00:00
Stefan Rueger
9c894e159d Set readsize and page_size of UPDI fuses to 1 ...
... so that the fuses access is byte-wise not by paged_load/wite
2023-11-02 22:42:25 +00:00
Stefan Rueger
528b56b1c7 Use __func__ in calls of trace_buffer() 2023-11-02 18:32:13 +00:00
Stefan Rueger
37df3462e0 Fix usbdev_recv_frame communication trace 2023-11-02 18:16:40 +00:00
Stefan Rueger
124fcc8110 Unify communication traces using trace_buffer() or trace2_buffer() 2023-11-02 16:58:24 +00:00
Stefan Rueger
0fc5749c24 Merge branch 'avrdudes:main' into memory-types 2023-11-02 11:48:21 +00:00
Stefan Rueger
96b081b2f9 Update NEWS 2023-11-02 01:18:48 +00:00
Stefan Rueger
53d161d1a3 Fix typo 2023-11-02 01:13:54 +00:00
mcuee
0db4cb0125 Harmonize WIN32 implementation of serial time-outs with Posix
This is from @mariusgreuel in Issue #1249.
https://github.com/avrdudes/avrdude/issues/1249

> The WIN32 time-out is specified as ReadTotalTimeoutConstant + buflen * ReadTotalTimeoutMultiplier, which makes it potentially much longer than the Posix one (i.e. at least double). ReadIntervalTimeout is also set to timeout, which essentially renders the interval timeout ineffective, so IMHO, we should explicitly disable that feature.
2023-11-01 10:58:06 +08:00
Stefan Rueger
76cbf91a19 Add notice2() messages for sigrow access 2023-10-31 17:09:18 +00:00
Stefan Rueger
c9eb0659f6 Suggest -xrestore when flash overlaps the bootloader in -c urclock 2023-10-31 13:31:56 +00:00
Stefan Rueger
4622a6d429 Add sigrow sub-memories to jtagmkII_read_byte() 2023-10-31 11:30:39 +00:00
Stefan Rueger
566cfad7e9 Review and fix single fuse r/w for jtag2/jtag3 2023-10-31 00:20:23 +00:00
Stefan Rueger
dab59045de Review and fix fuses r/w for jtag3 2023-10-30 23:32:44 +00:00
Stefan Rueger
af4614e2d8 Handle sigrow sub-memories in jtagmkII_read_byte() 2023-10-30 19:17:28 +00:00
Stefan Rueger
d6f4cdd72b Show parameter that could not be set 2023-10-30 18:49:03 +00:00