Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

alt_irq_init

There is an annoying error message when I try to compile my project in NIOS IDE. I am using quartus 9.0 (sp2). I build a project with SOPC builder and when I try to compile the C code I see the follwoing error:

Linking myproject.elf...

<project folder>/myprojct_syslib/Release/myproject_syslib.a(alt_main.o)(.text+0xc): In function `alt_main':

<quartus 9.0 installed fodler>/nios2eds/components/altera_hal/HAL/src/alt_main.c:102: undefined reference to `alt_irq_init'

collect2: ld returned 1 exit status

make: *** [myproject.elf] Error 1

Build completed in 17.187 seconds

There is a forum that user has similar issue but the solution is removing ".a" file and cleaning the project! For sure solution does not work! Sometimes I restarted my computer and error will be gone! sometimes I rebuild the hardware in sopc builder and the error will be gone.

Has anyone seen this before?

-Amir

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If I recall, there were issues with the version of Eclipse included in versions this old. Be sure to clean and re-build your main C project at minimum and, if that doesn't work...your BSP/syslib as well.

    Cheers!

    slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks Slacker for the reply! I think my problem was related to diffrenet versions of Quartus! I build my design in sopc builder and compile c code both in version 9.0. For compilation I always use of Quartus 10. After compilation is done I need to open qpf file in 9.0 before running nios IDE otherwise i get the error that I mentioned in the thread!

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    now,I have the same problem with yours.

    **** Build of configuration Debug for project hello_world_0 ****

    make -s all includes

    Compiling hello_world.c...

    Linking hello_world_0.elf...

    /cygdrive/e/JIDA/9.10next_stage/IN_FIR300why/hello_world_0_syslib/Debug/libhello_world_0_syslib.a(alt_main.o)(.text+0x14): In function `alt_main':

    /cygdrive/c/altera/90/nios2eds/components/altera_hal/HAL/src/alt_main.c:102: undefined reference to `alt_irq_init'

    collect2: ld returned 1 exit status

    make: *** [hello_world_0.elf] Error 1

    Build completed in 3.078 seconds

    Did you solve this problem? How did you solve it? Can you share it with me?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    My problem was related to different version of Quartus. I generated a SOPC build with Quartus version 9 and compiled the RTL with version 10. after for running the Quartus version 10, if I want to run NIOS IDE i need to open qpf file in Quartus 9 and then compile NIOS IDE

    --- Quote Start ---

    now,I have the same problem with yours.

    **** Build of configuration Debug for project hello_world_0 ****

    make -s all includes

    Compiling hello_world.c...

    Linking hello_world_0.elf...

    /cygdrive/e/JIDA/9.10next_stage/IN_FIR300why/hello_world_0_syslib/Debug/libhello_world_0_syslib.a(alt_main.o)(.text+0x14): In function `alt_main':

    /cygdrive/c/altera/90/nios2eds/components/altera_hal/HAL/src/alt_main.c:102: undefined reference to `alt_irq_init'

    collect2: ld returned 1 exit status

    make: *** [hello_world_0.elf] Error 1

    Build completed in 3.078 seconds

    Did you solve this problem? How did you solve it? Can you share it with me?

    --- Quote End ---