- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm working on trying to get a simple Hello World application on Nios II to boot from onchip RAM. I'm using a custom board with an Stratix IV FPGA. In SOPC I added an Nios core ,JTAG UART and an onchip RAM. I'm using the latest Quartus II 9.1 and Nios II 9.1. System builds and the Nios SW runs as expected when programming Nios through the Nios IDE. Then I try to use the elf2hex tool to convert the elf to an hex file that can be used for the onchip RAM. In SOPC I have set the onchip RAM to be initialized with my hex file and I have confirmed that in the fitter summary for the RAM it is initialized with the hex file that elf2hex gives. Now to my problem. After rebuilding the application in Quartus II with the new hex file it gives the following warning: Warning: Width of data items in "hello_world.hex" is greater than the memory width. Wrapping data items to subsequent addresses. Found 3131 warnings, reporting 10 Warning: Data at line (2) of memory initialization file "hello_world.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning: Data at line (3) of memory initialization file "hello_world.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning: Data at line (4) of memory initialization file "hello_world.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning: Data at line (5) of memory initialization file "hello_world.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. . . . and so on... I have specified my onchip ram to be 32-bit width. And I use this for elf2hex convertion: [NiosII EDS]$ elf2hex --base=0x00000000 --end=0x00001fff --width=32 --input=nios_boot2.elf --output=hello_world.hex --verbose I have tried also width 8 and 16 and no difference. The result file from elf2hex is always 20KB in size and if I open it it contains almost only zeros. Loading the file after Quartus compilation results in no Hello World text printed out as it does if I load it with the Nios IDE. Should I convert the elf to hex in some other way then using the elf2hex? If so how? Thanks for any answers! DanielLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For my applications using internal ram as the boot memory for NIOS the command I use is:
elf2hex --base=0x00 --end=0x3fff --width=32 --little-endian-mem --no-zero-fill --input=elf_file.elf --output=your_onchip_mem.hex The base and end values must be the address range your source actually compiles in. Mine is assembly so I control it closely. This basic method has worked for applications in Stratix2 and Cyclone3 (I had to go back and look at my notes).
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page