Forum Discussion

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

Please Help!!! .text linker section assignment in NIOS BSP Editor

Hi,

I have a Nios with a 2KBytes on-chip memory and its firmware image(.hex) store at external flash.

What is the difference between if I assign the .text linker section to "on-chip memory" and assigned it to "External Flash" ?

Which approach is much more better? Do I need to do some firmware handling in the NIOS if assigning .text to "External Flash"?

As I know that code will be executed more faster if in on-chip memory compare to external flash but it'll consume the memory block in the FPGA, am I understanding correctly?

Thanks advance in helping!!^^

http://www.alteraforum.com/forum/attachment.php?attachmentid=12603&stc=1

1 Reply

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

    The code will run faster from the on-chip memory but the main difference is also how you upload your software to the FPGA. When using on-chip memory, you can upload your software through JTAG and execute it directly without flashing it. It will of course not survive a power cycle, but for development it makes things easier and faster.

    Then when you want to write your software permanently, if using the external flash then you just have to write it to the flash, but if you use the on-chip memory things are a bit more complicated. You need to generate a .hex file, check that the .hex file is the one used to initialize the on chip ram in Quartus, recompile the Quartus project (or at least run the assembler, I think it's enough), and flash the whole FPGA image.