Forum Discussion
Altera_Forum
Honored Contributor
16 years ago*.hex file isn't created anymore
Hello
Something must have gone wrong in my nios IDE project settings. Normally after compiling my nios project the *.hex was automatically created. But now after compilation I have a new *.elf file, but no new *.hex file. I think this should normally be done in some after build process. As I already read in this forum the tool "nios2-elf-objcopy" is responsible for handling this job. But in my project files (*.project, *.cdtproject, *.cdtbuild) I cannot find such an entry. So my question is if there are some gui settings to switch on/off the creation of the *.hex file? If not, where is normally handled the after build process with the "nios2-elf-objcopy" call? Thanks a lot! Bergvagabund2 Replies
- Altera_Forum
Honored Contributor
I recently had this same problem. My project has an on-chip boot ROM that I needed the .hex file to program during configuration and when I upgraded from v9.0sp2 to v9.1 it stopped getting generated.
From pg 2-22 of the NIOS-II Software Developer's Handbook: creating an internal boot memory initialization file the niosii software build tools for eclipse can create a hexadecimal (intel-format) file (.hex), required to boot the niosii directly from internal memory without downloading. to create a .hex file for your project, right-click the application project, point to make targets, and click build to open the make targets dialog box. select and build the mem_init_install target. the mem_init_install target creates a file called <memorycomponentname>.hex, and places it in your quartus project directory. after creating the .hex file, recompile your quartus project. for more information about creating memory initialization files, refer to “common bsp tasks” in the niosii software build tools chapter of the niosii software developer’s handbook. When I tried to do this I did not find a mem_init_install target in the Make Targets dialog box so I clicked on Add... and in the Create a new Make target dialog box I typed mem_init_install for the Target Name: and Make Target: fields and left the defaults then clicked on Create. The next time I built my project my .hex files were generated in the Quartus-II project directory. - Altera_Forum
Honored Contributor
The solution was to regenerate the nios system in SOPC builder. After this rebuild my NIOS IDE is now working again correctly with the creation of the *.hex file in its after build process.