Hi,
I need to migrate code from EP100 (Code Warrior) to S32k144 (S32DS),
I need the equivalence in S32DS to the next CW preprocessor directive, which allows me to generate the name of the ISR function:
#define ISR(isr_name) void interrupt Os_Entry_##isr_name( void )
#define DeclareISR(isr) extern ISR(isr)
More information...
In CW, I utilized this macro as follows:
To declare Cat2 handlers in the Interrupt vectors table...
To define a CAT2 function as follows:
Any help to continue is really appreciated.
Antonio.
Solved! Go to Solution.
You can try this:
#define STRINGIFY(x) #x
#define ISR(NAME) void __attribute__ ((interrupt (STRINGIFY(NAME)))) NAME##_Handler( void )
ISR(SVC)
{
accumulator += counter;
}
So you'll get after preprocessing:
void __attribute__ ((interrupt ("SVC"))) SVC_Handler( void )
You can try this:
#define STRINGIFY(x) #x
#define ISR(NAME) void __attribute__ ((interrupt (STRINGIFY(NAME)))) NAME##_Handler( void )
ISR(SVC)
{
accumulator += counter;
}
So you'll get after preprocessing:
void __attribute__ ((interrupt ("SVC"))) SVC_Handler( void )
Hi,
I'm not familiar with CW, but ISR handlers are by default defined in startup_S32k144.S assembly source. If you need to use different names - just rename the existing interrupt handler name.
As a reference you can look at hello_interupts_s32k144 example:
Jiri
Thanks for trying but Is not the answer I was looking for.
Antonio.