Discovered problem.
It was my fault not really intuitive though.
When I removed the JTAG UART from Qsys and regenerated .sopcinfo
I got the error from eclipse
undefined reference to `alt_ic_isr_register'
Of course the JTAG UART qsys inclusion was generating
# define ALT_ENHANCED_INTERRUPT_API_PRESENT
In the system.h file.
My custom peripheral has no HAL driver and therefore no# _sw.tcl file to indicate enhanced interrupt API and therefore I needed to use legacy interrupts.
What I did was use conditional compilation i.e.
# ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
static void codec_isr (void *context)
# else
static void codec_isr(void *context, alt_u32 id)
# endif
{
}
And
# ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
a = alt_ic_isr_register (CODEC_BURST_MASTER_0_IRQ_INTERRUPT_CONTROLLER_ID ,CODEC_BURST_MASTER_0_IRQ, codec_isr, NULL, 0x0);
# else
a = alt_irq_register (CODEC_BURST_MASTER_0_IRQ_INTERRUPT_CONTROLLER_ID ,NULL, codec_isr);
# endif
And of course, using the legacy interrupts, the code now builds.
Let’s see if that will work.