Forum Discussion

MChin10's avatar
MChin10
Icon for New Contributor rankNew Contributor
6 years ago

I am trying to build my code in NIOS getting error

./lights_example_bsp/\libhal_bsp.a(alt_main.o): In function `alt_main':

C:\intelFPGA\16.1\qsys_tutorial\software\lights_example_bsp/HAL/src/alt_main.c:154: undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

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

please help me on this

3 Replies

  • AnandRaj_S_Intel's avatar
    AnandRaj_S_Intel
    Icon for Regular Contributor rankRegular Contributor

    Hi,

    1. Can you clean build your bsp library and then generate bsp and build project and check.
    2. Please check your console if any message related to memory or message like on_chip_memory is not within region? if so, increase your onchip memory size in qsys design.(After generating qsys system check time stamp of sopcinfo file)

    Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

    Regards

    Anand

    • MChin10's avatar
      MChin10
      Icon for New Contributor rankNew Contributor
      Hi Now I am getting following error while running NIOS Downloading ELF Process failed pausing target processor :not responding resetting and trying again: FAILED loading target processor failed regards, Mounica
      • AnandRaj_S_Intel's avatar
        AnandRaj_S_Intel
        Icon for Regular Contributor rankRegular Contributor

        Hi Mounica,

        Connect cpu.data_master to all program memories

        1. We may see above error.If your board is in reset state you or cpu.data_master is not connected to all program memories.
        2. Check the switch state of reset.
        3. check the cup.data_master connection.
        4. Check the reset and clock pin assignments.

        Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

        Regards

        Anand