Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,558 Views

max10 dual image + dual hex for nios

Hi All, 

Is it possible to make dual image configuration with separated hex image for nios in each ? Question is related to situation when you need to perform safe remote update of nios firmware image. 

Thanks !
0 Kudos
13 Replies
Altera_Forum
Honored Contributor I
83 Views

Hi, 

 

Dual Configuration means you will have 2 images ( one factory and one remote ). Both of them will be separate. So you can use NEW hex in remote image. Can't you? 

 

Feel free to let me know if I have misunderstood. 

 

Cheers, 

Bhaumik
Altera_Forum
Honored Contributor I
83 Views

Yes, you are right about 2 images, but in this case I believe they means hardware configuration images, not software :( As on update you are updating only CFM. 

 

• Configuration Flash Memory (CFM)—to store hardware configuration data for MAX 10 FPGA. 

• User Flash Memory (UFM)—to store user data or software applications. 

 

Maybe I'm wrong and there is any chance to have different nios image for every configuration image.
Altera_Forum
Honored Contributor I
83 Views

Hello, 

 

Here are my comments.  

 

(1) I have seen people storing hardware and software both images into single flash memory by using EPCS Controller connected to Nios processor. I do not know exactly how do they do it. But if this works for you, you would be able to eliminate need for User Flash memory. Also in this case, as both Hardware and software images are going to be combined into single image, by using Altera Remote Status Update block, you might be able to perform Remote status update. 

 

(2) In case, you choose 2 flash memory, can't you have one to one mapping? 

For example, Let have 2 images (factory image and Update (sometimes referred as application) image ) in Configuration Flash memory. One at offset 0x0 and another at offset 0x10_0000.  

Now let have 2 images in User Flash memory also. One which corresponds to factory image (located at 0x0 in CFM -configuration flash memory ) and another for update image (located in 0x10_0000 in CFM.). In your hardware image, design logic to take data from correspondence software image in UFM. That is if Factory image is booted, it should consider only its correspondence image in UFM. Similarly for update image. 

If you have to make any update, you should change only application image in CFM and its correspondence image in UFM. In this way, factory image will remain intact. 

 

I hope this makes some sense. 

 

Anyway, Are you confused? Let us know. We will see if we can help. 

 

Cheers, 

Bhaumik
Altera_Forum
Honored Contributor I
83 Views

Hi Andy, 

 

I don't think there's any Altera docs specifically detailing what you're after. However, I think it should be possible to generate 'factory' & 'application' FPGA images, each containing a Nios with a different reset vector corresponding to a different address in UFM. 

 

This application note: remote system upgrade for max 10 fpga devices over uart with the nios ii processor (https://www.altera.com/en_us/pdfs/literature/an/an741.pdf) discusses something similar. It also details what manipulation is needed of the various binaries for programming and remote upgrades. 

 

Note: it does discuss the use of an external FLASH device for holding the Nios image. The UFM is not big enough to hold a single user Nios image for larger applications. You're looking to put two Nios images in this space. So, you may need to consider an external flash device to hold these. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
83 Views

Agree with thing about UFM size, too small :( 

 

I have max10 evaluation kit, do you have any advice about external memory to store nios software ?
Altera_Forum
Honored Contributor I
83 Views

I'd 'simply' choose one that's big enough. I have a standard 16Mbit EPCS (equivalent) connected up to the MAX 10 on my eval board. However, Altera are pushing QSPI devices which offer increased capacity and speed for little cost (2 extra wires) & cost (it'll continue to get cheaper). 

 

Look at this max 10 fpga development kit (https://www.altera.com/products/boards_and_kits/dev-kits/altera/max-10-fpga-development-kit.html). It has a Micron N25Q512A83GSF40F QSPI FLASH connected up. I suggest you consider that a suitable reference design. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
83 Views

Hello, 

 

i have the same problem.  

How can i "merge" 2 applications to 1 *.hex file, so i can convert this *.hex file with the "convert programming tools" into a *.pof file :confused: ? 

With the Altera EDK (Eclipse) i can generate only 1 application to a *.hex file with the "mem_init_generate" tool. 

 

Regards, 

Andi 

 

update: 

I found this tool http://srecord.sourceforge.net/. I merged both applications (2 .flash files generated with nios edk "mem_init_generate" for each application) into one intel hex file like this: 

srec_cat -output_block_size 16 .\..\software\factoryapp\onchip_flash_0.flash .\..\software\testapp\onchip_flash_0.flash -o .\..\software\build_srec_tool\combined_apps.hex -intel 

 

Then i used the "convert programming tool" to generate a single pof to download and it works!
Altera_Forum
Honored Contributor I
83 Views

Hello, 

 

i have the same problem. 

How can i "merge" 2 applications to 1 *.hex file, so i can convert this *.hex file with the "convert programming tools" into a *.pof file ? 

With the Altera EDK (Eclipse) i can generate only 1 application to a *.hex file with the "mem_init_generate" tool. 

 

Regards, 

Andi 

 

UPDATE: 

I found this tool http://srecord.sourceforge.net/. I merged both applications (2 .flash files generated with nios edk "mem_init_generate" for each application) into one intel hex file like this: 

srec_cat -Output_Block_Size 16 .\..\Software\FactoryApp\onchip_flash_0.flash .\..\Software\TestApp\onchip_flash_0.flash -o .\..\Software\Build_Srec_tool\combined_apps.hex -intel 

 

Then i used the "convert programming tool" to generate a single pof to download and it works!
Altera_Forum
Honored Contributor I
83 Views

Hi there, 

 

I have the same problem. Dual configuration (two *.sof) and two files for a NIOS in each configuration.  

 

Is there a built-in function that creates a *.pof file out of that? 

 

@Andi: Do you have a little bit more detailed instructions on how you did that. How did you set the reset vectors? Anything needs to be changed in Eclipse? 

 

Best Regards
Altera_Forum
Honored Contributor I
83 Views

Hi there, 

 

I have the same problem. Dual configuration (two *.sof) and two files for a NIOS in each configuration.  

 

Is there a built-in function that creates a *.pof file out of that? 

 

@Andi: Do you have a little bit more detailed instructions on how you did that. How did you set the reset vectors? Anything needs to be changed in Eclipse? 

 

Best Regards
Altera_Forum
Honored Contributor I
83 Views

......................

Altera_Forum
Honored Contributor I
83 Views

Hi Andi, thanks a lot for this detailed explanation. I will try this in the next few days.

Altera_Forum
Honored Contributor I
83 Views

Andi, 

 

Your solution seems to work well. Thank you very much.  

 

I'm not sure why Altera doesn't support doing this with their own tools.