New Compiler Extensions

  • 1
  • 2
  • Page 2 of 2
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: New Compiler Extensions

 · 
Posted: 20.05.2023 - 18:34  ·  #9
Updates are now on the website. As mentioned before I recommend downloading and installing from the website this time, not through PED or PEDNew.

===============================================================================================================================

Updates sind jetzt auf der Website verfügbar. Wie bereits erwähnt, empfehle ich diesmal das Herunterladen und Installieren von der Website, nicht über PED oder PEDNew.
TheBeginner
Schreiberling
Avatar
Gender: n/a
Location: Wunsiedel Bayern
Age: 67
Posts: 755
Registered: 06 / 2013
Subject:

Re: New Compiler Extensions

 · 
Posted: 20.05.2023 - 20:24  ·  #10
Danke :-)



Gruß Frank
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: New Compiler Extensions

 · 
Posted: 22.11.2023 - 16:50  ·  #11
Hello all.

A new update was added last weekend. Apart from some more advances with skeleton records, there is also an update to BMPEdit, and a bugfix for Term2X from Miparo. Plus some improvements in the optimiser aimed at improving how pointers (and in particular pointers to records) are optimised.

There is also a bug fix for forward declarations of functions that return records. This bug is also in V5.xx versions of the compiler.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: New Compiler Extensions

 · 
Posted: 24.01.2024 - 19:16  ·  #12
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
  • 1
  • 2
  • Page 2 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   78   92 · Page-Gen-Time: 0.023686s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI