Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12410 Discussions

Hex to Mif file converter for LM32 Hex files

Altera_Forum
Honored Contributor II
1,349 Views

I have ported the LatticeMico32 to an Altera Cyclone. I have a 8K x 32 memory but the hex file I have has 4 words per line and I get the following line while trying to compile in quartus II 13.1 

 

 

Warning (113009): Data at line (1) of memory initialization file "yo.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. 

 

The program used to generate the hex file, lm32-objcopy.exe does not have an option to make less than 4 32-bit words per line.  

Does altera have any tools that could convert the files to the right format or mif file? I tried the elf2mif program but it doesn't seem to be working on cygwin nor my elf files..is it only for NIOS elf files? 

 

Salman
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
435 Views

I haven't used the elf2mif for non Altera's elfs, but I have used a converter srec_cat or SRecord program to do many similar conversions in the past. 

 

http://srecord.sourceforge.net/ 

 

It was originally a srecord conversion tool, but now includes many popular memory formats. 

 

Pete
Altera_Forum
Honored Contributor II
435 Views

Thanks...much better than trying to modify the files by hand and multiple unix utilities... 

 

Salman 

 

 

 

--- Quote Start ---  

I haven't used the elf2mif for non Altera's elfs, but I have used a converter srec_cat or SRecord program to do many similar conversions in the past. 

 

http://srecord.sourceforge.net/ 

 

It was originally a srecord conversion tool, but now includes many popular memory formats. 

 

Pete 

--- Quote End ---  

Reply