Forum Discussion
Altera_Forum
Honored Contributor
15 years agoYou also probably want to link all the readonly data sections with the data, not with the code. A normal (aka unix) program link puts the rodata with the code so that writes to it fault.
If your code and data are in tightly coupled memory blocks you don't want readonly data accesses to be slow Avalon MM transfers. IIRC the standard linker script is for large programs loaded into SDRAM (or similar) - I use a very custom script that assigns code/data to many different memory areas and includes the instructions to set %sp and %gp.