- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Quartus 4.2 Nios 1.2 I want to place the fuction "prova()" in the memory named "onchip_memory": <div class='quotetop'>QUOTE </div> --- Quote Start --- void prova __attribute__ ((section ( ".onchip_memory"))) (void) { while(1){} } [/b] --- Quote End --- I get the compilation error: <div class='quotetop'>QUOTE </div> --- Quote Start --- ../hello_world.c:99: error: parse error before '(' token[/b] --- Quote End --- the line 99 is the line quoted. Any suggestions?Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Soin,
Put the 'attribute' in the declaration rather than the definition:extern void prova (void) __attribute__ ((section ( ".onchip_memory")));
void prova (void) { while(1){} }
Regards, --Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it works!
Thank u very much! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page