Site Search

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. .

Article header img 09 3


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).

Article header img 11 7

Set the Main tab Settings > Advanced > hal > linker settings as follows.

Article header img 10 5

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.

Article header img 12 1


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.

Article header img 13 1

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.

Article header img 14 1


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”.

Article header img 15 1

9. Programming

In the Quartus ® Prime Programmer, use the POF generated earlier to program the MAX ® 10 CFM and UFM.

Article header img 16 1


Let's take a look at the board.

Article header library 119173 pic01 1

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.

Article header img 18 1


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]

Related products

MAX® 10 FPGA Development Kit