Issue with Interrupt Vector Table (TriCore)

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
AlTi
Newbie
Posts: 40
Joined: Thu Jun 25, 2015 9:52 am

Issue with Interrupt Vector Table (TriCore)

Post by AlTi » Wed Jul 29, 2015 12:08 pm

Hi,

I have found an issue with the Interrupt Vector Table, which can lead to wrong entry address calculations, because the TriCore needs the Interrupt Vector Table to be aligned to addresses where Bits [12:5] are 0. In the TriCore´s architecture manual (vol1) you can find a more detailed discription (look out for figure 5-2).
I solved this problem in my application by aligning the interrupt table vector to 0x1000 with the linker script template "ee_tc2Yx_gnu_relocable.ld.tmpl".

Code: Select all

  /*
   * Section for interrupt table
   */
  CORE_SEC(.inttab) 0 : ALIGN(0x1000)
  {
    *(.inttab)
    *(.*.inttab)
  }
I hope, this helps.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Issue with Interrupt Vector Table (TriCore)

Post by paolo.gai » Wed Jul 29, 2015 1:40 pm

Thanks for your post!

We'll sure take a look at it soon and patch the linker script. The issue never came up during our development, we'll also investigate why.

Ciao,

PJ

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: Issue with Interrupt Vector Table (TriCore)

Post by e.guidieri » Wed Jul 29, 2015 2:07 pm

The linker files to be patched are ee/pkg/mcu/infineon_common_tc2Y/{ee_tc2Yx_gnu_flash.ld.tmpl,ee_tc2Yx_global_gnu_ram.ld}

The one you used works on object code level (probably adding alignment requirement object sections), not at relocation level, and only if activate the Single ELF Build.

And for, for what I understood, to be sure that you could use Bit[12] (used by priorities greater than 127) you should ALIGN at 0x2000 (8192).

Ciao,
Errico

AlTi
Newbie
Posts: 40
Joined: Thu Jun 25, 2015 9:52 am

Re: Issue with Interrupt Vector Table (TriCore)

Post by AlTi » Wed Jul 29, 2015 2:27 pm

Yes, you are right with the alignment. It should be at 0x2000.

Thank you,
Alex

Post Reply