Closed trembel closed 3 years ago
Additional informations in #15
What about naming the fields "module-instance_name", iff module-instance is available? As far as I've seen now (attiny412.atdf and AVR128DA28.atdf), the module-instance only shows up in the interrupt map.
Yeah, this is what I was thinking as well. Though we need to check whether this regresses any of the "old" ATDF files. It might also be worth it to look at the C headers, how they name interrupts on the newer MCUs.
iotn412.h
- Header of attiny412:
/* ========== Interrupt Vector Definitions ========== */
/* Vector 0 is the reset vector */
/* CRCSCAN interrupt vectors */
#define CRCSCAN_NMI_vect_num 1
#define CRCSCAN_NMI_vect _VECTOR(1) /* */
/* BOD interrupt vectors */
#define BOD_VLM_vect_num 2
#define BOD_VLM_vect _VECTOR(2) /* */
/* PORTA interrupt vectors */
#define PORTA_PORT_vect_num 3
#define PORTA_PORT_vect _VECTOR(3) /* */
/* RTC interrupt vectors */
#define RTC_CNT_vect_num 6
#define RTC_CNT_vect _VECTOR(6) /* */
#define RTC_PIT_vect_num 7
#define RTC_PIT_vect _VECTOR(7) /* */
...
This are all AVR targets containing the module-instance
keyword:
(From the atdf's in Microchip ATautomotive Series Device Support (2.1.39), Microchip ATmega Series Device Support (2.2.108), Microchip ATtiny Series Device Support (2.5.116), Microchip AVR-Dx Series Device Support (1.6.88))
Okay, that does not seem to include any of the "old" chips which I was worried about ... And the C header does look like it is doing the same thing you proposed so I think this is the way to go!
New AVR MCUs contain a list containing all interrupts, similar to the following (
attiny412.atdf
):The
module-instance
is neglected at the moment, leading to a bad naming of the addresses, e.g.CMP0
- without informations on the peripheral: