Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
736 Views

elf2flash for Stratix-IV PCB instructions confusing...

I have a NIOS II design for the Stratix-IV 530KHC2 Dev. PCB. Hardware works, software works fine when downloaded via Eclipse. The HW is now 

programmed into FLASH fine. Now I want to program the SW into FLASH so that NIOS II boots from FLASH, copies the code into DDR3 

and starts to run from there. 

I am confused about the given instructions: 

elf2flash --base=0x08000000 --end=0x0BFFFFFF --reset=0xB4A0000 --input=<yourfile>_sw.elf --output=<yourfile>_sw.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec 

 

The NIOS II has a reset address of 0x00000000 (setup in QSYS) which is propagated into the .elf file by Eclipse. So when I try to follow the above conversion I get an error  

0x00000000 does not agree with 0xB4A0000. 

 

So what shell I do? I set the --reset=0x00000000 but that can't be right because I want my SW to be in the "User Software" space 

Do I modify NIOS II reset address to 0xB4A0000 ? That doesn't seem right either. 

 

Eclipse's BSP Editor under "linker script" does not allow me to change anything - its all greyed out. 

 

How do I create a .FLASH file that puts the boot-loader at 0x00000000 and copies the SW from external FLASH at 0xB4A0000 into DDR3 and runs from there? 

 

Thanks for you help :-P 

 

Shvitzer
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
37 Views

Even though I got a warning about the conflict between then BSP reset address of 0x00000000 and the command line of --reset=0xB4A0000 it did produce a .FLASH file. I used this .FLASH file with 

"nios2-flash-programmer --base=0x08000000 my_prog_4_24_sw.flash" and it programmed the FLASH fine, however when booting it the NIOS Console did not display my prompt. So I tried a simple 

program that displays on the LEDs a software generated count and it works ! In other words the SW which was burned into FLASH booted and ran fine. 

I still don't know why it does not access the NIOS Console. 

 

Shvitzer
Reply