Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

How can I load a file into memory?

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

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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