In the next release of the compiler there will be extensions to interrupts.
You will be able to define your own interrupt names and even overlay multiple interrupt names, although you will still only be permitted to define one overlay.
This allows you to override the interrupt name in the dsc file with something more meaningful to you.
As an example, for the new device AVR64EA28, if you look at the data sheets there are two interrupts that can reside at position 10 in the vector table, TCA0_CMP0 and TCA0_LCMP0 , depending on the mode of TCA0. Obviously the DSC file can contain only one of these definitions, but you can now override the names with your own like this:
Code
const
TCA0_CMP0 : interrupt = 10;
TCA0_LCMP0 : interrupt = 10;
and you may put both definitions in your code. You may now define
Code
interrupt TCA0_CMP0;
begin
...
end;
or
Code
interrupt TCA0_LCMP0;
begin
end;
but not both.
Here is an example of a file that that specifies all the interrupts as defined in the data sheet:
Code
unit Interrupts;
||| This is an automatically generated file to include all the interrupts
||| for AVR64EA28 device
|||
||| Device architecture: AVR8X
|||
||| Device Family: AVR
|||
||| Interrupts are specified as interrupt constants.
|||
||| The following interrupts are defined:
|||
||| const
||| CRCSCAN_NMI : interrupt = 1;
||| BOD_VLM : interrupt = 2;
||| CLKCTRL_CFD : interrupt = 3;
||| RTC_CNT : interrupt = 4;
||| RTC_PIT : interrupt = 5;
||| CCL_CCL : interrupt = 6;
||| PORTA_PORT : interrupt = 7;
||| TCA0_LUNF : interrupt = 8;
||| TCA0_OVF : interrupt = 8;
||| TCA0_HUNF : interrupt = 9;
||| TCA0_CMP0 : interrupt = 10;
||| TCA0_LCMP0 : interrupt = 10;
||| TCA0_CMP1 : interrupt = 11;
||| TCA0_LCMP1 : interrupt = 11;
||| TCA0_CMP2 : interrupt = 12;
||| TCA0_LCMP2 : interrupt = 12;
||| TCB0_INT : interrupt = 13;
||| TCB1_INT : interrupt = 14;
||| TWI0_TWIS : interrupt = 15;
||| TWI0_TWIM : interrupt = 16;
||| SPI0_INT : interrupt = 17;
||| USART0_RXC : interrupt = 18;
||| USART0_DRE : interrupt = 19;
||| USART0_TXC : interrupt = 20;
||| PORTD_PORT : interrupt = 21;
||| AC0_AC : interrupt = 22;
||| ADC0_ERROR : interrupt = 23;
||| ADC0_RESRDY : interrupt = 24;
||| ADC0_SAMPRDY : interrupt = 25;
||| AC1_AC : interrupt = 26;
||| PORTC_PORT : interrupt = 27;
||| TCB2_INT : interrupt = 28;
||| USART1_RXC : interrupt = 29;
||| USART1_DRE : interrupt = 30;
||| USART1_TXC : interrupt = 31;
||| PORTF_PORT : interrupt = 32;
||| NVMCTRL_EEREADY : interrupt = 33;
||| NVMCTRL_FLREADY : interrupt = 33;
||| NVMCTRL_NVMREADY : interrupt = 33;
||| USART2_RXC : interrupt = 34;
||| USART2_DRE : interrupt = 35;
||| USART2_TXC : interrupt = 36;
|||
{SLIB}
interface
// global part
uses ;
const
CRCSCAN_NMI : interrupt = 1;
BOD_VLM : interrupt = 2;
CLKCTRL_CFD : interrupt = 3;
RTC_CNT : interrupt = 4;
RTC_PIT : interrupt = 5;
CCL_CCL : interrupt = 6;
PORTA_PORT : interrupt = 7;
TCA0_LUNF : interrupt = 8;
TCA0_OVF : interrupt = 8;
TCA0_HUNF : interrupt = 9;
TCA0_CMP0 : interrupt = 10;
TCA0_LCMP0 : interrupt = 10;
TCA0_CMP1 : interrupt = 11;
TCA0_LCMP1 : interrupt = 11;
TCA0_CMP2 : interrupt = 12;
TCA0_LCMP2 : interrupt = 12;
TCB0_INT : interrupt = 13;
TCB1_INT : interrupt = 14;
TWI0_TWIS : interrupt = 15;
TWI0_TWIM : interrupt = 16;
SPI0_INT : interrupt = 17;
USART0_RXC : interrupt = 18;
USART0_DRE : interrupt = 19;
USART0_TXC : interrupt = 20;
PORTD_PORT : interrupt = 21;
AC0_AC : interrupt = 22;
ADC0_ERROR : interrupt = 23;
ADC0_RESRDY : interrupt = 24;
ADC0_SAMPRDY : interrupt = 25;
AC1_AC : interrupt = 26;
PORTC_PORT : interrupt = 27;
TCB2_INT : interrupt = 28;
USART1_RXC : interrupt = 29;
USART1_DRE : interrupt = 30;
USART1_TXC : interrupt = 31;
PORTF_PORT : interrupt = 32;
NVMCTRL_EEREADY : interrupt = 33;
NVMCTRL_FLREADY : interrupt = 33;
NVMCTRL_NVMREADY : interrupt = 33;
USART2_RXC : interrupt = 34;
USART2_DRE : interrupt = 35;
USART2_TXC : interrupt = 36;
implementation
//initialization
// at StartUp
// finalization // optional
// at System_ShutDown
end Interrupts.
The aim is to more closely align the system to data sheets.
I will post here when the new update is ready.
===================================================
In der nächsten Version des Compilers wird es Erweiterungen für Interrupts geben.
Sie werden in der Lage sein, Ihre eigenen Interrupt-Namen zu definieren und sogar mehrere Interrupt-Namen zu überlagern, obwohl Sie weiterhin nur eine Überlagerung definieren dürfen.
Dadurch können Sie den Interrupt-Namen in der dsc-Datei mit einem für Sie aussagekräftigeren Namen überlagern.
Ein Beispiel: Für den neuen Baustein AVR64EA28 gibt es zwei Interrupts, die an Position 10 in der Vektortabelle liegen können, TCA0_CMP0 und TCA0_LCMP0 , je nach Modus von TCA0. Offensichtlich kann die DSC-Datei nur eine dieser Definitionen enthalten, aber Sie können die Namen mit Ihren eigenen überschreiben:
Code
const
TCA0_CMP0 : interrupt = 10;
TCA0_LCMP0 : interrupt = 10;
und Sie können beide Definitionen in Ihrem Code verwenden. Sie können nun definieren
Code
interrupt TCA0_CMP0;
begin
...
end;
oder
Code
interrupt TCA0_LCMP0;
begin
end;
aber nicht beides.
Hier ist ein Beispiel für eine Datei, die alle im Datenblatt definierten Interrupts spezifiziert:
Code
unit Interrupts;
||| This is an automatically generated file to include all the interrupts
||| for AVR64EA28 device
|||
||| Device architecture: AVR8X
|||
||| Device Family: AVR
|||
||| Interrupts are specified as interrupt constants.
|||
||| The following interrupts are defined:
|||
||| const
||| CRCSCAN_NMI : interrupt = 1;
||| BOD_VLM : interrupt = 2;
||| CLKCTRL_CFD : interrupt = 3;
||| RTC_CNT : interrupt = 4;
||| RTC_PIT : interrupt = 5;
||| CCL_CCL : interrupt = 6;
||| PORTA_PORT : interrupt = 7;
||| TCA0_LUNF : interrupt = 8;
||| TCA0_OVF : interrupt = 8;
||| TCA0_HUNF : interrupt = 9;
||| TCA0_CMP0 : interrupt = 10;
||| TCA0_LCMP0 : interrupt = 10;
||| TCA0_CMP1 : interrupt = 11;
||| TCA0_LCMP1 : interrupt = 11;
||| TCA0_CMP2 : interrupt = 12;
||| TCA0_LCMP2 : interrupt = 12;
||| TCB0_INT : interrupt = 13;
||| TCB1_INT : interrupt = 14;
||| TWI0_TWIS : interrupt = 15;
||| TWI0_TWIM : interrupt = 16;
||| SPI0_INT : interrupt = 17;
||| USART0_RXC : interrupt = 18;
||| USART0_DRE : interrupt = 19;
||| USART0_TXC : interrupt = 20;
||| PORTD_PORT : interrupt = 21;
||| AC0_AC : interrupt = 22;
||| ADC0_ERROR : interrupt = 23;
||| ADC0_RESRDY : interrupt = 24;
||| ADC0_SAMPRDY : interrupt = 25;
||| AC1_AC : interrupt = 26;
||| PORTC_PORT : interrupt = 27;
||| TCB2_INT : interrupt = 28;
||| USART1_RXC : interrupt = 29;
||| USART1_DRE : interrupt = 30;
||| USART1_TXC : interrupt = 31;
||| PORTF_PORT : interrupt = 32;
||| NVMCTRL_EEREADY : interrupt = 33;
||| NVMCTRL_FLREADY : interrupt = 33;
||| NVMCTRL_NVMREADY : interrupt = 33;
||| USART2_RXC : interrupt = 34;
||| USART2_DRE : interrupt = 35;
||| USART2_TXC : interrupt = 36;
|||
{SLIB}
interface
// global part
uses ;
const
CRCSCAN_NMI : interrupt = 1;
BOD_VLM : interrupt = 2;
CLKCTRL_CFD : interrupt = 3;
RTC_CNT : interrupt = 4;
RTC_PIT : interrupt = 5;
CCL_CCL : interrupt = 6;
PORTA_PORT : interrupt = 7;
TCA0_LUNF : interrupt = 8;
TCA0_OVF : interrupt = 8;
TCA0_HUNF : interrupt = 9;
TCA0_CMP0 : interrupt = 10;
TCA0_LCMP0 : interrupt = 10;
TCA0_CMP1 : interrupt = 11;
TCA0_LCMP1 : interrupt = 11;
TCA0_CMP2 : interrupt = 12;
TCA0_LCMP2 : interrupt = 12;
TCB0_INT : interrupt = 13;
TCB1_INT : interrupt = 14;
TWI0_TWIS : interrupt = 15;
TWI0_TWIM : interrupt = 16;
SPI0_INT : interrupt = 17;
USART0_RXC : interrupt = 18;
USART0_DRE : interrupt = 19;
USART0_TXC : interrupt = 20;
PORTD_PORT : interrupt = 21;
AC0_AC : interrupt = 22;
ADC0_ERROR : interrupt = 23;
ADC0_RESRDY : interrupt = 24;
ADC0_SAMPRDY : interrupt = 25;
AC1_AC : interrupt = 26;
PORTC_PORT : interrupt = 27;
TCB2_INT : interrupt = 28;
USART1_RXC : interrupt = 29;
USART1_DRE : interrupt = 30;
USART1_TXC : interrupt = 31;
PORTF_PORT : interrupt = 32;
NVMCTRL_EEREADY : interrupt = 33;
NVMCTRL_FLREADY : interrupt = 33;
NVMCTRL_NVMREADY : interrupt = 33;
USART2_RXC : interrupt = 34;
USART2_DRE : interrupt = 35;
USART2_TXC : interrupt = 36;
implementation
//initialization
// at StartUp
// finalization // optional
// at System_ShutDown
end Interrupts.
Ziel ist es, das System besser auf die Datenblätter abzustimmen.
Ich werde hier posten, wenn das neue Update fertig ist.
Regards
Merlin