Forum Discussion
Altera_Forum
Honored Contributor
22 years agoChanging location of .entry section
Hi, i'm working on a bootloader for a system with a Cyclone 1C6, Nios II/s,256kb SRAM and an Atmel serial dataflash (2 megabits). The bootloader will load the main application from the data...
Altera_Forum
Honored Contributor
22 years agoActually I have found a solution but it involves changing the auto generated linker script; so you have to use the auto generated script as basis for a custom linker script, as these script look quite intimidating http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif . If you look at generated.x in the system library, there is this sections block:
SECTIONS
{
.entry :
{
KEEP (*(.entry))
} > reset
.exceptions :
{
. = ALIGN(0x20);
*(.irq)
KEEP (*(.exceptions));
} > sram
.
.
.
} All I had to do was to change the > reset into > sram, and everything ended up where I wanted it. Of course, I copied the generated.x to another file, so that it won't be overwritten at the next change of the system.