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

EPCS embedded reprogramming

Altera_Forum
Honored Contributor II
1,035 Views

Hi, 

I'm trying to figure out how to reprogram the epcs from within the uClinux environment on the NIOS. Has anyone tried this. Is it possible to use the MTD drivers for the EPCS to reprogram the entire EPCS including the FPGA code? Any help would be much appreciated. 

 

 

Thank You, 

Brian Hammerbacher
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
345 Views

Hi Brian, 

 

> Has anyone tried this. 

 

Yes. jdhar has developed an MTD driver. The code is part of the buildroot sources. 

You can also program the epcs device using u-boot. 

 

> Is it possible to use the MTD drivers for the EPCS to reprogram the entire EPCS including the 

> FPGA code? Any help would be much appreciated. 

 

Yes, provided you can create a valid binary file. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

 

--- Quote Start ---  

originally posted by hammer42@May 25 2006, 10:42 PM 

hi, 

i'm trying to figure out how to reprogram the epcs from within the uclinux environment on the nios.  has anyone tried this.  is it possible to use the mtd drivers for the epcs to reprogram the entire epcs including the fpga code?  any help would be much appreciated. 

 

 

thank you, 

brian hammerbacher 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15573) 

--- quote end ---  

 

--- Quote End ---  

 

Look at the flashw util in uClinux-dist .
0 Kudos
Altera_Forum
Honored Contributor II
345 Views

The use of the simple tool &#39;dd&#39; can also help - if you have a binary file, you can write directly to the MTD device.

0 Kudos
Altera_Forum
Honored Contributor II
345 Views

Ok, I tried to take an srec and convert it to a binary to use for DD, but the objcopy in linux couldn&#39;t recognize the nios srec. Is there another way to convert it into something that can be copied using DD?

0 Kudos
Altera_Forum
Honored Contributor II
345 Views

 

--- Quote Start ---  

originally posted by hammer42@May 31 2006, 02:52 AM 

ok, i tried to take an srec and convert it to a binary to use for dd, but the objcopy in linux couldn&#39;t recognize the nios srec.  is there another way to convert it into something that can be copied using dd? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15696) 

--- quote end ---  

 

--- Quote End ---  

 

You should look at the .flash format of altera. 

And write a utility to convert .flash to binary. 

# Creating .flash file for the FPGA configuration sof2flash --epcs --input=$SOPC_KIT_NIOS2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof --output=standard.flash# Creating .flash file for the project elf2flash --epcs --after=standard.flash --input=zImage --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_epcs.srec
0 Kudos
Reply