hello.
I'm Hanako Altera, and I provide technical support for Altera® FPGA products at Macnica.
This is the second part of “How to boot Nios ® II with UFM on MAX ® 10”. See below for the first part (steps 1 to 5).
Let's boot Nios® II with MAX® 10 UFM [Part 1]
6. Set up BSP Editor on Nios® II SBT and run Generate
On the Nios ® II SBT, set the boot program software project that has been verified to work properly via JTAG, and launch Nios II > BSP Editor for the Nios ® II BSP project folder. .
This time, we will boot from the on-chip flash (UFM) and execute the memory in the on-chip RAM, so we will set the following.
In the Linker Region Name of the Lnker Script tab, specify all active displayed sections to On-Chip Memory (RAM).
Set the Main tab Settings > Advanced > hal > linker settings as follows.
Click the Generate button to run.
7. Convert boot program to HEX file with Nios® II SBT
Right-click > Make Targets > Build... on the application folder where the Nios ® II boot program is imported, select mem_init_generate in the Make Targets dialog Box, and Build.
A mem_init folder appears in the application folder, and the boot program stored in the UFM is converted to an initial value file (.hex) and generated.
8. Conversion of programming files
Quartus ® Prime converts SOF files and HEX files for UFM to POF files.
Start Files menu > Convert Programming Files and set as follows.
Click the Option/Boot info… button and set the Max ® 10 Device Options dialog Box as follows:
UFM sources:
⇒ Select Load memory file
File path:
⇒ Select the HEX file for Nios ® II boot generated in the mem_init folder built with Nios ® II SBT
Click the OK button, then click the Generate button under Convert Programming Files. A POF will be generated with the message "Generated “file name”.pof successfully”.
9. Programming
In the Quartus ® Prime Programmer, use the POF generated earlier to program the MAX ® 10 CFM and UFM.
Let's take a look at the board.
Oh! The L is blinking, it's a success!
The Nios ® II is running the boot program successfully, and the lights are different.
When did the Nios® II boot program change?
Start Nios ® II SBT again and specify the application folder
Build Make Targets > Build… > mem_init_generate and update HEX. (See step 7)
Then update the POF file in Convert Programming Files. (See step 8)
If you program to MAX ® 10 and write only to UFM, it will be updated.
However, please be careful.
UFM has a guaranteed number of write and erase operations. So, let's use UFM after debugging firmly.
Reference FAQ
What is the user flash memory (UFM) endurance in MAX® 10 devices?
Also, since the MAX® 10 UFM has a smaller capacity than the external ROM (CFI Flash, etc.) commonly used as boot memory, make sure that you have enough capacity before using it. .
This time, I showed you how to configure the Nios ® II boot ROM with UFM.
Related article
Boot Nios® II with FPGA's on-chip memory
Let's boot Nios® II with MAX® 10 UFM [Part 1]