- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all
I build a SOPC system to realize the UART port communicate with PC. I launch Eclipse NiosII plateform after building SOPC hardware. I assign the UART port the IRQ is 2. I have to call the alt_irq_enable at initializing the UART port. But the C builder inform me undefined reference to `alt_irq_enable'. What happens in my project? Hope get help!Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add following line of code please,
# include "sys/alt_irq.h"- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Add following line of code please, # include "sys/alt_irq.h" --- Quote End --- Hi, waiyung. The line has been added before i post the topic. Are there other cause can lead this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Pilleman said that in other thread: --- Quote Start --- My assumption is that you are using the ENHANCED Interrupt API which doesn't implement alt_irq_interruptible()/alt_irq_non_interruptible() anymore. The only way I know (means not that there is not an other way) how to use the both functions, is to manually change ALT_ENHANCED_INTERRUPT_API_PRESENT in system.h to ALT_LEGACY_INTERRUPT_API_PRESENT. Every time you regenerate your BSP or syslib you have to change it again! But that's just a workaround. I had the same problems and then included the VIC as EIC in my design. You can use the VIC with ENHANCED API. But much better, the VIC can handle the interruptible stuff without changing your code. That means your ISRs are interruptible without a call to alt_irq_interruptible(). Disadvantage: Until the momen, I don't know how set the option that an IRQ is not interruptible. --- Quote End ---- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank Aprado! you give me a lot of help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yea, I ran into the same issue using the older style irq register stuff. I have a block of code in QSYS that feeds out an interrupt to the NIOS. Below is an example of old vs enhanced IRQ for you all to see. All of the variables in UPPERCASE were taken from the system.h file. You can also look at a sample in your c:\altera folder in the NIOS directory. look up count_binary.
C:\altera\13.0sp1\nios2eds\examples\software\count_binary OLD IRQ API EXAMPLE ///////// static void isr_PUSH_BUTTONS(void *context) { printf("PB IRQ hit "); } main { alt_irq_register(PUSH_BUTTONS_IRQ, 0 , isr_PUSH_BUTTONS); } ///////// ENHANCED IRQ API ///////// static void isr_PUSH_BUTTONS(void *context) { printf("PB IRQ hit "); } main { alt_ic_isr_register(PUSH_BUTTONS_IRQ_INTERRUPT_CONTROLLER_ID, PUSH_BUTTONS_IRQ, isr_PUSH_BUTTONS, 0, 0); alt_ic_irq_enable(PUSH_BUTTONS_IRQ_INTERRUPT_CONTROLLER_ID, PUSH_BUTTONS_IRQ); while(1){} } /////////
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