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

How can I load a file into memory?

Altera_Forum
Honored Contributor II
1,583 Views

I'm using Nios II Ide to test some imaging software. By now I've used litttle images created pixel by pixel. I'd like to load a bigger image into memory, but I wasn't able.  

 

The C command fopen doesn't work, and I don't want to write the image pixel by pixel (I'd like to try with 640x480). 

 

Thanks
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
358 Views

Sorry, I forgot... 

 

I'm trying to simulate my programs with Nios II ISS (I'm not using a development board, it's only a simulation) 

 

Thanks
0 Kudos
Altera_Forum
Honored Contributor II
358 Views

I think this topic got lost for a while. I've emailed someone. Hopefully They'll be able to help. Tell us if you've figured this out.

0 Kudos
Altera_Forum
Honored Contributor II
358 Views

fopen will only work if you have a filesystem. The only one currently available is the zip filing system which would require you to put your data into an uncompressed zip file and then program this zip file into flash. 

 

As for getting data into memory you can just put your binary file through objcopy to convert into elf format with symbols around it. This will then be available in memory. Hope that helps
0 Kudos
Altera_Forum
Honored Contributor II
358 Views

Did you solve your problem? 

Tell us if you didn't.
0 Kudos
Reply