This error appears when compiling a MAX 10 design whose on-chip memory has initialised contents — which is the normal case for a GeMRTOS system, because the processors’ program memory is initialised from the compiled software image.
MAX 10 devices store their configuration in internal flash. Only some internal configuration modes reserve the extra flash region, ERAM, used to hold the initial contents of on-chip memory. If the project is set to a mode without ERAM, Quartus® Prime has nowhere to put the memory initialisation and stops with:
Error (16031): Current Internal Configuration mode does not support memory initialization or ROM. Select Internal Configuration mode with ERAM.
Fix in the GUI #
Assignments → Device → Device and Pin Options → Configuration → Configuration mode, then select:
Single Uncompressed Image with Memory Initialization
Recompile. The modes whose names end in with Memory Initialization are the ones that reserve ERAM; the plain Single Compressed Image and Single Uncompressed Image modes do not, and will reproduce the error.
Fix in the project file #
The same setting can be made directly in the .qsf, which is often easier to keep under version control and to compare between projects:
set_global_assignment -name INTERNAL_FLASH_UPDATE_MODE "SINGLE IMAGE WITH ERAM"This is the assignment used by the GeMRTOS MAX 10 reference project. If you are comparing a design that builds against one that does not, this line is worth checking first.
Why it shows up with GeMRTOS #
A GeMRTOS system is a multiprocessor design: each Nios V processor needs its program memory initialised at configuration time. Any design that initialises on-chip memory from a hex file — whether that is a bootloader, a lookup table or a full application image — needs an internal configuration mode with ERAM. The error is not specific to GeMRTOS, but a GeMRTOS design will hit it on the first compile if the mode was left at a default without ERAM.