Forum Discussion
How to leave unused UFM Flash on MAX10 blank (0xFF)
I use the UFM to store my NIOS code but I reserve Sector 1 (16kB) for data storage (Liker Script).
I use "Convert Programming File" to merge the .sof and .hex to make a .pof.
After configuration, any unused Flash location by the NIOS code is set to 0x00.
I need any unused Flash location to stay blank (0xFF), espetially the 16kB sector I reserve for data storage.
"Convert Programming File" does not allow me to add more .hex files.
I have the "initialize flash content" box checked in the Flash IP Core.
How do get sector 1 to remain blank (0xFF) at configuration time?
Is this done NSBT? How?
thank you
18 Replies
- JohnT_Altera
Regular Contributor
Hi,
Could you provide me the step that you use to convert the sof and hex to POF file and the step you used to program the flash?
- Naji_Naufel_Arrow
Occasional Contributor
In Convert Programming Files:
- Select Internal Configuration
- In Options/Boot Info ... -- select UFM source: Load memory file, navigate to ./software/<project name>/mem_init/system_onchip_flash_0.hex, keep all defaults.
- Click "SOF Data" -- click Add File..., navigate to ./output_files/<project>.sof
- Keep default Programming file type: Programmer Object File (.pof)
- Click Generate
In "Programmer":
- Check the boxes for CFM0 and UFM in the Program/Configure column
- Click Change File ..., navigate to just created .pof
- Click Start and watch MAX10 get configured
- JohnT_Altera
Regular Contributor
Hi,
May I know how is the hex file genrerated? Do you observed the 1st sector of the "system_onchip_flash_0.hex" file is 0x0 or 0xff?
- Naji_Naufel_Arrow
Occasional Contributor
In NSBT, I do "Build Project", then "MakeTargets -> build -> mem_init_generate"
The "system_onchip_flash_0.hex" has 0x00 in scector 0 preceding my code and 0x00 everywhere after my code.
I will rename the .hex as .txt and add it here.
- JohnT_Altera
Regular Contributor
Hi,
You will either need to generate the hex file with unused sector to 0xFF or modify the hex file to make sure that the unused sector 1 to 0xff.
- Naji_Naufel_Arrow
Occasional Contributor
Modifying the .hex is not as simple as find 00 and replace with FF. I have to calculate checksum for the end of every line on too many lines.
Isn't there a way for Quartus tools to do it?
- JohnT_Altera
Regular Contributor
Hi,
I would recommend you to modify your Nios II BSP so that the unused memory is set as 0xFF. This will be easiest method as it will generate the hex file for you.
- Naji_Naufel_Arrow
Occasional Contributor
This is exactly what I need.
Can you please point me to instructions on doing it?
- JohnT_Altera
Regular Contributor
Hi,
Can you share with me your Nios II software BSP?
- Naji_Naufel_Arrow
Occasional Contributor
Is it the summary.html or a different file?
- JohnT_Altera
Regular Contributor
Hi,
If possible, please provide me the whole software folder to build Nios II software.