Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

PCI express and NIOS

Altera_Forum
Honored Contributor II
821 Views

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?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
72 Views

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