Forum Discussion

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

function with "attribute"

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 &#39;(&#39; token[/b]

--- Quote End ---

the line 99 is the line quoted.

Any suggestions?