- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had a NIOS system working with my custom peripheral this morning on the transceiver starter kit this morning.
I then added a PCI express interface and had to modify the design a bit so I could fit it. I then recompiled the NIOS and got.... undefined reference to `alt_ic_isr_register' I see that# define ALT_ENHANCED_INTERRUPT_API_PRESENT is missing from the system.h file for some reason. Any ideas?Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page