Are there any examples how to define ISR vectors?
Are there any examples how to define ISR vectors?
I am running through some exercises/tutorial using RDKRX63N based on IAR workbench, but also try relate the exercises to E2 and this toolchain.
I can see that IAR EW uses “#pragma vector=xxx” followed by __interrupt void isr(void). Can this definition also be used for GCC toolchain, or are ISRs defined completely different?
I can read it myself in the manuals, but have not found where to read.
Thanks.
Br Michael
Hi Michael,
Thank you for your patience!
The interrupt service routines are completely different, to verify them first please create a new sample project in e2 Studio and investigate the interrupt_handlers.c and interrupt_handlers.h files, as well as vector_table.c.
The GCC compiler uses attributes instead of pragmas – for reference, please check https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes. You may use “__attribute__((interrupt))” to declare a function as an interrupt (please also see interrupt_handlers.h/.c).
The vector table is, however, just a normal C array of function pointers (“typedef void (*fp) (void);”) which is placed in a separate section (called “.fvectors”) using the section attribute, e.g. __attribute__ ((section (“.fvectors”))) (please also see vector_table.c for further details). This will be present at 0xFFFFFF80 in the linker script (placing it at 0xFFFFFF80 is the only thing that makes it the fixed vector table – as described in the RX software/hardware manual at https://llvm-gcc-renesas.com/pdf/r01us0032ej0120_rxsm.pdf on page 34).
We hope this helps.
—
Kind regards,
Ciprian
The GNU Tools Support Team
Hello Michael,
Thank you for your feedback!
This is a confirmation message to let you know that we have received your request and that we are looking into it as soon as possible.
We will be getting back to you soon with our findings.
—
Thank you,
The GNU Tools Support Team