Commit Graph

1856 Commits

Author SHA1 Message Date
Jörg Wunsch 23a09a6197
Merge pull request #869 from MCUdude/alias-memories
Add fuse name aliases to avrdude.conf + tweak update.c
2022-02-11 21:15:34 +01:00
MCUdude 3fc39c47ad Print memory name alias together with the canonical name if present
in avrdude.conf. An example would be "avrdude: reading fuse0/wdtcfg memory:"
2022-02-11 21:10:05 +01:00
MCUdude d6ccf7a3ff Add memory alias names for megaAVR0/tinyAVR0,1,2/AVR-Dx/AVR-Ex fuses 2022-02-10 22:34:33 +01:00
Joerg Wunsch 452f673f38 Back out the last "alias" commit (search for existing alias).
It breaks the alias handling completely as the search happens
way too late. So instead, just keep any possibly duplicate
name as it won't be in our way anyway.
2022-02-10 21:26:05 +01:00
Joerg Wunsch 38a3af37e2 Mention PRs #863 and #868. 2022-02-10 20:39:51 +01:00
Jörg Wunsch d134dc8fff
Alias keyword (#868)
Implementation for an "alias" keyword.

By now, only applied inside memory descriptions.

* Make "mem_alias" a separate nonterminal.

The previous implementation attempt caused a syntax error in
yacc code, and separating mem_alias on the same level as
mem_spec appears to be the cleaner solution anyway.

* Maintain real memory aliases.

Instead of duplicating the aliased memory with a new name, maintain a
second list of memory aliases (per device) that contains a pointer to
the memory area it is aliased to. That way, a memory name can be
clearly distinguished between the canonical one and any aliases.

* Check p->mem_alias != NULL before touching it

* Add avr_find_memalias()

This takes a memory region as input, and searches whether an
alias can be found for it.

* We need to add a list structure for the mem_alias list, always.

By that means, mem_alias won't ever be NULL, so no need to check
later.

Also, in avr_dup_part(), duplicate the alias list.

* In a memory alias, actually remember the current name.

* In avr_dup_part(), adjust pointers of aliased memories

While walking the list of memories, for each entry, see if there is an
alias pointing to it. If so, allocate a duplicated one, and fix its
aliased_mem pointer to point to the duplicated memory region instead
of the original one.

* Add avr_locate_mem_noalias()

When looking whether any memory region has already been defined for
the current part while parsing the config file, only non-aliased names
must be considered. Otherwise, a newly defined alias would kick out
the memory definition it is being aliased to.

* When defining a mem_alias, drop any existing one of that name.

* Actually use avr_find_memalias() to find aliases

* Add declaration for avr_find_memalias()

* When defining a memory, also search for an existing alias

If the newly defined name has the same as an existing alias, the alias
can be removed.

Note that we do explicitly *not* remove any memory by the same name of
a later defined alias, as this might invalidate another alias'es
pointer. If someone defines that, the alias name just won't ever be
found by avr_locate_mem().
2022-02-10 20:39:19 +01:00
Jörg Wunsch ba314f23e9
Merge pull request #863 from MCUdude/jtag3-read-memory-alias
Add support for reading from more memory sections
2022-02-10 20:35:06 +01:00
MCUdude a43f220ef9 Add support for reading from more memory sections
It's now possible to read the following memories if present: osccal16, osccal20, tempsense, osc16err, osc20err
2022-02-07 21:51:35 +01:00
Joerg Wunsch 1c0b70da89 PR #859 done 2022-02-05 22:03:59 +01:00
Jörg Wunsch b6a6c681df
Merge pull request #859 from dl8dtl/safemode-removal
Remove the "safemode" feature.
2022-02-05 22:03:12 +01:00
Joerg Wunsch 3eda1d15f9 Mention PR #858 2022-02-05 21:59:04 +01:00
Marius Greuel c6438532f0
Merge pull request #858 from yegorich/cmake-install-fix
CMake: use CMAKE_CURRENT_BINARY_DIR to locate avrdude.conf
2022-02-05 21:46:38 +01:00
Joerg Wunsch 6fd68ed7fe Mention Hans Eirik Bull for his recent contributions 2022-02-01 23:26:20 +01:00
Joerg Wunsch 36de84ab48 Mention Dawid and Marius for their recent contributions. 2022-02-01 20:35:15 +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
Yegor Yefremov 7ed3632902 CMake: use CMAKE_CURRENT_BINARY_DIR to locate avrdude.conf
With the split CMakeLists.txt infrastructure avrdude.conf
will be created in the build/src and not build folder. Hence,
fix its location in the install command.
2022-01-31 07:18:59 +01:00
Joerg Wunsch e28e28d7c3 With the new CMake file structure, no need to dive into "src" 2022-01-30 10:46:27 +01:00
Joerg Wunsch a3868a8260 Mention PR/issue 855, 856, 857 2022-01-30 10:45:53 +01:00
Jörg Wunsch e0bc6a8bd6
Merge pull request #855 from MCUdude/fix-arduino-retry-attempts
Fix Arduino retry attempts
2022-01-30 10:45:24 +01:00
Jörg Wunsch 69177dfe3f
Merge pull request #857 from dl8dtl/fix-856
Assign proper type to msg[] in errstr()
2022-01-30 10:41:53 +01:00
Joerg Wunsch b84e6862a7 Assign proper type to msg[] in errstr()
Obviously, the array ought to be of type char.

Closes Issue #856
2022-01-29 23:32:39 +01:00
MCUdude 7144a9f2ae Replace incorrect warning message
Was mistakenly added in PR #854.
2022-01-29 20:08:43 +01:00
MCUdude 28be45d8b6 Fix Ardino sync attempts
In order for the Arduino bootloader to re-sync with Avrdude, the microcontroller needs to be reset to start the bootloader again.
2022-01-29 19:53:42 +01:00
Joerg Wunsch 4ff72ac462 Mention all closed PRs and bug issues. 2022-01-27 23:20:26 +01:00
Jörg Wunsch 4ea4ff7fba
Merge pull request #850 from dl8dtl/usbasp-errstr
Fix libusb-1.0 error strings
2022-01-27 23:18:51 +01:00
Jörg Wunsch 7e7c4e630e
Merge pull request #854 from MCUdude/arduino-stk500
Set number of connection retry attempts for Arduino/STK500 programmer
2022-01-27 23:17:28 +01:00
Jörg Wunsch 39deb3a600
Merge pull request #852 from yegorich/cmake-split
CMake: split configuration in two files
2022-01-27 23:16:37 +01:00
Jörg Wunsch dd8c3ff830
Merge pull request #843 from mariusgreuel/pr-ftdi-syncbb
Fix receive buffer implementation in ftdi_syncbb programmer
2022-01-27 23:15:10 +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
MCUdude 286c0f5e2a Don't print irrelevant information for the Arduino programmer 2022-01-24 22:16:31 +01:00
MCUdude f6bbaadfa6 Print clock info after the correct clock speeds has been set
The "new" clock speed set by the -B flag wasn't reflected in the output log
2022-01-23 22:45:54 +01:00
Yegor Yefremov acee6afa4e CMake: split configuration in two files
The main CMakeLists.txt file in the project's root directory takes
care of the main project settings like project name and version,
handling the options, finding dependencies, etc.

The src/CMakeLists.txt handles options that are necessary to build
libavrdude library and avrdude binary.
2022-01-23 21:22:07 +01:00
Joerg Wunsch 42a154dddf Fix libusb-1.0 error strings
Previously, all libusb-1.0 error strings have been translated
by libusb_to_errno() into an errno-like integer, only in order
to pass that one straight into strerror().

For unhandled libusb-1.0 error codes, ERANGE was returned, which
is just nonsense ("Result too large", bug #848).

Instead, use a single function errstr() now that either can
use strerror() on some well-defined errno-like code, or otherwise
just return a string that mentions the numeric value.
2022-01-21 23:13:56 +01:00
Joerg Wunsch de3d7c1659 PR #849 merged 2022-01-21 21:56:36 +01:00
Joerg Wunsch a8f7e96222 PR #815 merged 2022-01-21 21:56:07 +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 4538d91091 PR #829 merged 2022-01-21 21:56:07 +01:00
Jörg Wunsch 6d762a835b
Merge pull request #849 from dl8dtl/buildscripts
Add a build script for Unix-like systems
2022-01-21 21:55:57 +01:00
Jörg Wunsch cce7a934d6
Merge pull request #815 from MCUdude/add-memory-sections
Add more memory sections to read from
2022-01-21 21:49:29 +01:00
Jörg Wunsch 490558049e
Merge pull request #816 from andrewshadura/usbtiny-spi
Add SPI support to USBtiny
2022-01-21 21:40:00 +01:00
Jörg Wunsch 512cce405c
Merge pull request #829 from yegorich/cmake-install-liavrdude
CMake: add initial support for installing lib and include files
2022-01-21 21:37:21 +01:00
Joerg Wunsch e5ac9e943c Add a build script for Unix-like systems 2022-01-21 21:33:10 +01:00
Joerg Wunsch 0b1db09daf PR #944 merged 2022-01-21 21:28:15 +01:00
Jörg Wunsch 1b8b1d69e7
Merge pull request #844 from MCUdude/jtagmkii-retry-attempts
jtagmkii: Reduce the number of sync attempts to 10 + print number of attempts
2022-01-21 21:27:30 +01:00
Hans d401b2224e
Merge branch 'main' into jtagmkii-retry-attempts 2022-01-21 13:28:20 +01:00
Joerg Wunsch 950583323f PR #845 merged 2022-01-20 10:23:31 +01:00
Jörg Wunsch 0682af212c
Merge pull request #845 from MCUdude/reduce-verbosity
Reduce verbosity when setting fuses and uploading programs
2022-01-20 10:22:52 +01:00
MCUdude b1cbbfc9f0 Reduce verbosity when setting fuses and uploading programs
Affects commands with no -v flag and one -v flag
2022-01-20 09:45:34 +01:00
MCUdude dbac0ecf8c Reduce the number of attempts to 10
+ print number of attempts
2022-01-19 23:25:47 +01:00
Joerg Wunsch 325604f970 PR #842 done 2022-01-19 22:56:47 +01:00