When building a GeMRTOS Nios V/II project, Quartus may emit Warning (113015) during compilation if memory initialization files generated by the mem_init_generate make target have a record length that does not match the memory data port width. The fix requires a one-line change to the BSP’s mem_init.mk file.
Issue Description #
This warning appears when using memory initialization files generated by the mem_init_generate make target in the makefile produced by the Nios® II Embedded Design Suite (EDS). The .hex files are generated with a default record length that may differ from the actual memory data port width, triggering the warning.
How to Fix It #
Modify the mem_init.mk file inside the BSP directory to add a --record switch to the $(ELF2HEX) command:
- Open
<BSP directory>/mem_init.mkin a text editor. - Find the line containing the
$(ELF2HEX)command. - Add the following switch to that command:
--record=${mem_hex_width}/8
Example of the modified $(ELF2HEX) line:
XXXXXX = $(ELF2HEX) --record=4 $< $(mem_start_address) $(mem_end_address) --width=$(mem_hex_width) $(mem_endianness) --create-lanes=$(mem_create_lanes) $(elf2hex_extra_args) $@
Key Takeaways #
- Warning 113015 is harmless in most cases but indicates the generated
.hexrecord length does not match the memory port width — this can cause unexpected initialisation behaviour. - The fix is a single addition to
mem_init.mk: add--record=${mem_hex_width}/8to the$(ELF2HEX)command line. - The value
4in the example (--record=4) corresponds to a 32-bit (4-byte) memory width — adjust the formula for other port widths. - This fix must be reapplied if the BSP is regenerated, as
mem_init.mkis overwritten during BSP regeneration.
Source: Intel Support, Article 000081351.