Forum Discussion
Altera_Forum
Honored Contributor
20 years agoLinker Flags in NiosII IDE
Could anyone tell me what I'm doing wrong?
My aim is to place an array at a particular address, as an example 0x10000. Help files descibe one way of declaration section as a linker flag--section-start SECTION=ADDRESS I set --section-start FRAME=0x10000 and in с file char Frame __attribute__ ((section ("FRAME"))); But the linker says: nios2-elf-g++: FRAME=0x10000: No such file or directory I've missed something, haven't I? Regards3 Replies
- Altera_Forum
Honored Contributor
I've managed it!
In autogenerated file generated.x I added the section description
And here it is! The array Frame[] is placed at 0x10000SECTIONS { ............................ . = 0x10000; .frame : { *(.frame) } } - Altera_Forum
Honored Contributor
Great work...
I have searched this kind of solution for a long time. Thanks for sharing with us.http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/happy.gif - Altera_Forum
Honored Contributor
It's a good idea to browse through Redhat's website, as well....for any of the binutils (http://sources.redhat.com/binutils/) tools. The syntax of linker scripts is covered here....
For those who really want to know how it works. Cheers, - slacker