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

hi evryone, can anybody plz tell me how hex data is stored in onchip memory de2-115, because i am reading from onchip memory using nios2 but data is different from the hex file stored in it

rkaib
Beginner
1,294 Views
 
0 Kudos
3 Replies
FawazJ_Altera
Employee
941 Views

Hello,

Once your hex file is generated in Nios II eclipse, you can use it as initialization file for the on-chip memory. This option is available inside Platform Designer, On chip memory parameters

 

 

By enabling "Enable non-default initialization file" you can select your hex as initialization file for this memory.

 

Thanks

0 Kudos
rkaib
Beginner
941 Views

hi FJumaah,

that 's what I have done, but the problem is that the data I am reading are different from the data of the hex file

in nios2 I am declaring memory as:

#define mem (unsigned char*) ONCHIP_MEMORY_0_BASE, then

I am reading: printf("%d, %d, %d\n\r",*mem,*(mem+1), *(mem+2) );

but the data printed on the console are different if you compare them with the first 3 data of the hex file and I get different data when I power on again the board, really strange!!!

would you have any clue about it

0 Kudos
FawazJ_Altera
Employee
941 Views

Hello,

is the data completely different?

I suspect this might be due to Endian issue (Big or little).

 

thanks

0 Kudos
Reply