Forum Discussion

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

Programming w/o EPCS & w/o Nios Programmer

Hopefully someone can give a little guidance to a hopefully simple programming question. I've searched the forum & documentation in vain.

I'd like to have a microcontroller be responsible for programming two flash devices, one which will store an RBF file for FPGA configuration (easy & working on our board), and one which will store the program code for the Nios processor.

The question is, what should be exactly program into the 2nd flash device? The .elf file, the .flash file from elf2flash, some other binary file? It would be nice to put the elf2flash into the chain somewhere so that we can incorporate the Altera-provided bootloader to copy from flash into SDRAM.

I guess I do have a second question as well. It looks like the Dev. Board works off of having a 16-bit wide SRAM and an 8-bit wide Flash device. Does the SOPC builder automatically mitigate different bus-widths for addressing purposes?

Thanks in advance,

Kevin

1 Reply

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

    --- Quote Start ---

    originally posted by kwolfe@Aug 3 2006, 10:27 AM

    the question is, what should be exactly program into the 2nd flash device? the .elf file, the .flash file from elf2flash, some other binary file?

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

    --- quote end ---

    --- Quote End ---

    Kevin:

    this post (http://forum.niosforum.com/forum/index.php?act=st&f=2&t=2538) helped me do something similar...

    Basically, the key is to get the executable in .hex format using

    nios2-elf-objcopy -o ihex <project name>.elf <file name>.hex from the NIOS SDK.

    Then load that--you&#39;ll have to convert it to the raw binary, but that isn&#39;t too difficult.