Alas, MacOS doesn't handle nonstandard baud rates like other systems
in regular tcsetattr() calls. Instead, they invented a new ioctl
(IOSSIOSPEED). So, if we notice we are going to configure a
nonstandard rate on MacOS, issue that ioctl after configuring
everything else using tcsetattr().
This means that you can use ... to read the "rest" of the memory.
$ read eeprom ... will dump the entire memory
$ read eeorm 0x80 ... will dump the memory from address 0x80 to the end address
If you run the following command: $ write eeprom 0x00 0x10 A B C ...
It will write the following data to EEPROM:
|ABCCCCCCCCCCCCCC|
starting from address 0x00
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.
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().
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.
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.
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.
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.