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

Configuration layout of EPCS ?

Altera_Forum
Honored Contributor II
1,278 Views

Hi, this is my first post here ....:oops: 

I would like to understand the layout of the data stored in the EPCS configuration flash. 

I cannot find clear information in the documentation. The doc "Advanced Boot Copier Example" helps because it states that the nios software image (boot record) has following layout: 

4 bytes : length of data 

4 bytes : destination of data 

But what is the format of the fpga hardware configuration ? 

Looking at the EPCS bootloader source code i understand that the first 4 bytes (at the flash address 0x00) are 0x56565656 , the following 4 bytes are not relevant, and the next 4 bytes are the length of the hardware configuration. But reading my EPCS at 0x00 gives: 

0x56565656 0xFFFF0F6C 0xFFFFBFEE 

so 0xFFFFBFEE cannot be the length of the configuration ?!?!?!? 

Also the before mentioned document states that there is a signature "0xa5a5a5a5" which i cannot find anywhere.... 

I simply want to calculate where the hardware configuration ends in the EPCS :( 

Someone can help ? Any documents which explain the layout of the epcs clearly ?
0 Kudos
1 Reply
beyondTime
Novice
542 Views

Hello,

maybe it helps re-reading epcs eeprom content and analyzing for 'non code' areas or 'pattern filled' areas (on linux).

nios2-flash-programmer '--cable=USB-Blaster on <device description>' --device=<device number> --instance=<device instance to access> --debug -e --go --base=0x<POINTER_TO_EPCS_BASE> -R <epcs-data-backup.file>

objdump -h <epcs-data-backup.file>

 

partial example (not 'Advanced Boot Copier Example', but custom undefined working bootloader) getting from 'nios2-elf-objdump -s' :

 

000000 ffffffff ffffffff ffffffff ffffffff  ................
000010 566ffffe 000f1008 00566fff fe000f10  Vo.......Vo.....

 

 

or 'cat':

 

S1230000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF566FFFFE000F100800566FFFFE000F1022

 

 

 

best regards, beyondTime

( nios2eds 13.0sp1, Xenial 16.04 )

0 Kudos
Reply