Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 토론

Remote Update using EPCS64 with Nios

Altera_Forum
명예로운 기여자 II
1,181 조회수

Hi all. I am hoping somebody can help. 

 

I have created a 'factory' image (fpga+nios code) that is stored at offset 0x0 in the EPCS64 device. So, it boots fine. Not to get too long winded, I have some code that can program new data in different places in the EPCS64 device. In my particular case, I am storing new fgpa+nios code at sector 32 (my old code ends in sector 15, so I am not overwriting any existing code). I can program and verify fine. 

 

I then use the remote update megafunction to reconfigure with the new firmware, and have problems. It seems to load the new fpga configuration code (all I did was turn on a LED in the new code), but it still runs my old nios code. It will not continue to load the new nios code and execute it. So, I believe my problem is with the bootloader portion? Any thoughts? 

 

I can program new code at offset 0x0, sector 0 over my old stuff (erase, and program new code at offset 0x0) and it works. However, I do not want to do this in field. I always want to keep my factory image for default in case the update does not work. 

 

I tried to do some research but having a hard time finding some answers. When I create my new files, I use the following commands 

 

// create fpga.flash from .sof# Creating .flash file for the FPGA configuration 

$SOPC_KIT_NIOS2/bin/sof2flash --epcs --input=C:/fpga_factory/fpga. 

sof --output=fpga.flash 

 

// create flash file from nios code# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --epcs --after=fpga.flash --input=factory.e 

lf --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2 

/boot_loader_epcs_stratix_ii.srec 

 

Based on these commands, does the converter (for the bootloader or anything else) need to know any new addresses? Anyone have any recommendations? Do I need to be doing a different command or using a different bootloader? 

 

Thanks for your help!
0 포인트
3 응답
Altera_Forum
명예로운 기여자 II
509 조회수

I'm about to try this myself. One thought - is your nios code in a M-RAM, that gets loaded by the EPCS boot loader, or are you using M4K's for your nios code with initialization in the FPGA config? 

 

I plan to use the latter.  

 

If you're using the first, then your NIOS code isn't coming from FPGA config data, it's somewhere else in the EPCS flash, and I think the same code will be loaded regardless of which FPGA image is configured. 

 

\cb
0 포인트
Altera_Forum
명예로운 기여자 II
509 조회수

And I succeeded in using the reconfig. Booting directly from the M4K onchip memory, I had no problem, so I suspect the original poster was storing code in the EPCS, and had both FPGA images point to the same address in EPCS to load the NIOS image. 

 

I expect that if you use the EPCS boot loader, you would set a parameter that tells it where to locate the NIOS image, and you must set this parameter differently depending on your image. 

 

\chuck
0 포인트
Altera_Forum
명예로운 기여자 II
509 조회수

 

--- Quote Start ---  

In my particular case, I am storing new fgpa+nios code at sector 32 (my old code ends in sector 15, so I am not overwriting any existing code). I can program and verify fine. 

 

 

--- Quote End ---  

 

 

Hi Simonsk, 

 

How can you achieve programming the second pair at sector 32 of EPCS64?
0 포인트
응답