avrdude/src
Jörg Wunsch d134dc8fff
Alias keyword ()
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
..
doc Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
msvc Add C code alternative to __builtin_popcount. 2022-01-08 16:13:32 +01:00
CMakeLists.txt Merge pull request from dl8dtl/safemode-removal 2022-02-05 22:03:12 +01:00
Makefile.am Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
arduino.c Merged AVRDUDES/main into SerialUPDI branch 2021-12-21 21:38:51 +01:00
arduino.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
avr.c Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
avr910.c Merged AVRDUDES/main into SerialUPDI branch 2021-12-21 21:38:51 +01:00
avr910.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
avrdude.1 Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
avrdude.conf.in Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
avrdude.h Merge pull request from mariusgreuel/pr-msvc 2022-01-07 18:30:19 +01:00
avrdude.spec.in Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
avrftdi.c Use alloca for stack based memory allocation 2022-01-07 17:54:36 +01:00
avrftdi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
avrftdi_private.h Add compatibility shim for MSVC 2022-01-07 17:54:36 +01:00
avrftdi_tpi.c Add C code alternative to __builtin_popcount. 2022-01-08 16:13:32 +01:00
avrftdi_tpi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
avrpart.c Alias keyword () 2022-02-10 20:39:19 +01:00
bitbang.c Clean up legacy code 2022-01-07 17:57:02 +01:00
bitbang.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
bootstrap Make `bootstrap' executable 2021-12-19 00:35:52 +01:00
buspirate.c buspirate: fix invalidScanfArgType_int warning 2022-01-07 19:22:57 +01:00
buspirate.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
butterfly.c Merged AVRDUDES/main into SerialUPDI branch 2021-12-21 21:38:51 +01:00
butterfly.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
cmake_config.h.in Clean up legacy code 2022-01-07 17:57:02 +01:00
config.c Alias keyword () 2022-02-10 20:39:19 +01:00
config.h Alias keyword () 2022-02-10 20:39:19 +01:00
config_gram.y Alias keyword () 2022-02-10 20:39:19 +01:00
configure.ac Merge pull request from mariusgreuel/pr-msvc 2022-01-07 18:30:19 +01:00
confwin.c Remove ac_cfg.h from libavrdude.h 2022-01-10 15:12:33 +01:00
crc16.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
crc16.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
dfu.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
dfu.h Add compatibility shim for MSVC 2022-01-07 17:54:36 +01:00
fileio.c Merge pull request from mariusgreuel/pr-msvc 2022-01-07 18:30:19 +01:00
flip1.c Clean up legacy code 2022-01-07 17:57:02 +01:00
flip1.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
flip2.c Merge pull request from mariusgreuel/pr-msvc 2022-01-07 18:30:19 +01:00
flip2.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
freebsd_ppi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
ft245r.c Fix receive buffer implementation in ftdi_syncbb programmer 2022-01-17 22:53:58 +01:00
ft245r.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
jtag3.c Add support for reading from more memory sections 2022-02-07 21:51:35 +01:00
jtag3.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
jtag3_private.h Add target voltage adjustment for Curiosity Nano boards 2022-01-03 18:51:33 +01:00
jtagmkI.c Fix memory leaks 2021-12-24 10:14:16 +01:00
jtagmkI.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
jtagmkII.c Reduce the number of attempts to 10 2022-01-19 23:25:47 +01:00
jtagmkII.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
jtagmkII_private.h Add more jtagmkii baud rates 2022-01-02 12:13:13 +01:00
jtagmkI_private.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
lexer.l Alias keyword () 2022-02-10 20:39:19 +01:00
libavrdude.h Alias keyword () 2022-02-10 20:39:19 +01:00
linux_ppdev.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
linuxgpio.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
linuxgpio.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
linuxspi.c Fix typos all over the code 2022-01-07 11:31:16 +01:00
linuxspi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
lists.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
main.c Remove the "safemode" feature. 2022-01-31 20:44:32 +01:00
micronucleus.c Fix -Wpointer-sign warning in micronucleus.c 2022-01-07 23:48:56 +01:00
micronucleus.h Add support for Micronucleus bootloader 2022-01-04 18:37:57 +01:00
par.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
par.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
pgm.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
pgm_type.c Add support for Teensy bootloader 2022-01-06 23:39:17 +01:00
pickit2.c Clean up legacy code 2022-01-07 17:57:02 +01:00
pickit2.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
pindefs.c Merge pull request from dl8dtl/libavrdude-remove-ac_cfg_h 2022-01-11 12:44:26 +01:00
ppi.c Clean up legacy code 2022-01-07 17:57:02 +01:00
ppi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
ppiwin.c Clean up legacy code 2022-01-07 17:57:02 +01:00
ser_avrdoper.c Clean up legacy code 2022-01-07 17:57:02 +01:00
ser_posix.c Clean up legacy code 2022-01-07 17:57:02 +01:00
ser_win32.c Clean up legacy code 2022-01-07 17:57:02 +01:00
serbb.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
serbb_posix.c Clean up legacy code 2022-01-07 17:57:02 +01:00
serbb_win32.c Clean up legacy code 2022-01-07 17:57:02 +01:00
serialupdi.c Replaced tabs by spaces 2022-01-13 10:01:01 +01:00
serialupdi.h Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
solaris_ecpp.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500.c Replace incorrect warning message 2022-01-29 20:08:43 +01:00
stk500.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500_private.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500generic.c Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500generic.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500v2.c Clean up legacy code 2022-01-07 17:57:02 +01:00
stk500v2.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
stk500v2_private.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
teensy.c Add support for Teensy bootloader 2022-01-06 23:39:17 +01:00
teensy.h Add support for Teensy bootloader 2022-01-06 23:39:17 +01:00
term.c Set back to programming mode on quit 2022-01-09 10:27:36 +01:00
term.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
tpi.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
update.c Reduce verbosity when setting fuses and uploading programs 2022-01-20 09:45:34 +01:00
updi_constants.h Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
updi_link.c Implemented extended parameter for RTS/DTR lines management 2022-01-08 10:04:25 +01:00
updi_link.h Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
updi_nvm.c Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
updi_nvm.h Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
updi_readwrite.c Fix typos all over the code 2022-01-07 11:31:16 +01:00
updi_readwrite.h Moved SerialUPDI sources to correct location 2021-12-21 21:45:36 +01:00
updi_state.c Implemented extended parameter for RTS/DTR lines management 2022-01-08 10:04:25 +01:00
updi_state.h Implemented extended parameter for RTS/DTR lines management 2022-01-08 10:04:25 +01:00
usb_hidapi.c Clean up legacy code 2022-01-07 17:57:02 +01:00
usb_libusb.c Clean up legacy code 2022-01-07 17:57:02 +01:00
usbasp.c Assign proper type to msg[] in errstr() 2022-01-29 23:32:39 +01:00
usbasp.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
usbdevs.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
usbtiny.c Add direct SPI mode to USBtiny 2022-01-09 10:57:22 +01:00
usbtiny.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
whereami.c Find 'avrdude.conf' based on absolute path to executable () 2022-01-03 23:20:31 +01:00
whereami.h Find 'avrdude.conf' based on absolute path to executable () 2022-01-03 23:20:31 +01:00
windows.rc.in Derive program version from last commit 2022-01-03 15:04:25 +01:00
wiring.c Merged AVRDUDES/main into SerialUPDI branch 2021-12-21 21:38:51 +01:00
wiring.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00
xbee.c Merged AVRDUDES/main into SerialUPDI branch 2021-12-21 21:38:51 +01:00
xbee.h Move source files to 'src' folder 2021-12-17 09:17:42 +01:00