Forum Discussion

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

Building hex files fails - ext_flash

Hello Altera forums,

I have a program based on the Simple Socket Server (RGMII), which I can compile and load to my SOPC with no problems. I'm trying to generate hex files so that I don't have to reload the program every time I program the board. I'm doing this in the eclipse IDE.

I right click on my project, click on make targets -> build, then select mem_init_generate

The build fails with this error:

14:58:32 **** Build of configuration Nios II for project Simple_Socket_BUP ****
make mem_init_generate 
Info: Building ../Simple_Socket_BUP_bsp/
make --no-print-directory -C ../Simple_Socket_BUP_bsp/
make: *** No rule to make target `ext_flash.flash', needed by `ext_flash.dat'.  Stop.
14:58:32 Build Finished (took 166ms)

I haven't had any success finding a solution to this problem. Do you know where I could find some info to help with this?

I am using Quartus Prime 16.1 with the eclipse IDE that is included with this.

Thanks!

10 Replies

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

    Hi,

    Have you build the project without error?

    Step 1. Right click on my project, click build project ->if build is successful then proceed to mem_init_generate.

    step 2. Click on make targets -> build, then select mem_init_generate

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

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for the reply.

    Step 1 works fine, and I can run the program on the board.

    Step 2 results in the error message I posted above.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Which version of Quartus and Nios IDE are you using?

    Can you attach the exact error message form problems tab of the eclipse? Also, share c file if possible.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As stated in the original post, I'm using Quartus 16.1 with the Nios IDE included with it. The exact error message is also included in the original post.

    The problem occurs with any of the templates, including the count_binary template program, which makes me think my issue is related to my SOPC.

    Here is a link to the project on github: https://github.com/samdejong86/arria-v-adc-ethernet

    More specifically, here is the qsys file: https://raw.githubusercontent.com/samdejong86/arria-v-adc-ethernet/master/nios_cpu_qsys.qsys (https://raw.githubusercontent.com/samdejong86/arria-v-adc-ethernet/master/a5gx_starter_fpga_bup_qsys.qsys)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Used Quartus 17.0 std and project from GitHub: https://github.com/samdejong86/arria-v-adc-ethernet

    Created a new project for eclipse with .sopcinfo file, And used .ccp files from the project given.

    I was not able to regenerate the error mentioned. It successfully able to generate mem_init_generate.

    Kindly compile the full project and create a new project in eclipse and check if still, you are facing the same problem you can use the latest version of the Quartus.

    Best Regards,

    Anand Raj Shankar

    (This message was posted on behalf of Intel Corporation)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I changed to Quartus 17.1, and the IDE that comes with it, and I was still unable to build the hex files using 'mem_init_generate'. I got the same error message about ext_flash as I got in v16.1
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I think the problem might be with my makefiles. Could you send me the project and bsp files that are working for you?

    What OS are you using? I'm running on Scientific Linux 6.5. I've tried on Ubuntu 16.04 as well, with no success

    Thanks,

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

    I was able to resolve my issue by running this command:

    elf2flash --input=ADC_Socket.elf --output=ext_flash.flash --base=0x0 --end=0x07FFFFFF --boot=$QUARTUS_ROOTDIR/../nios2eds/components/altera_nios2/boot_loader_cfi.srec

    to generate ext_flash.flash. I can now make the project correctly.

    Thank you for your assistance.