Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHi
I am trying to do the same thing by following the instructions of this post. However, in my case, only the sof file works and the elf file is not working. I'm wondering if I miss anything and hope someone could kindly help me. I have a simple project which controls two leds. After the sof file is downloaded, the second led is on. If the elf file is working on the NiosII CPU, the first led blinks. I cannot see the led blink after I download sof file which initializes the on-chip memory with the hex file converted from elf. Here are some detailed steps: 1. The reset vector of NiosII CPU is already set in the on-chip memory. (Please see my attached qsys file) 2. The "Enable non-default initialization file" option is checked. The initialization file is "my_nios2_mem" which locates in the root of my project. 3. The "my_nios2_mem.hex" is generated from elf file with the following command: bash-3.1$ elf2hex --input=sof_elf_epcs_niosii.elf --output=my_nios2_mem.hex --base=0x00000000 --end=0x0003ffff --width=32