C: Yagarto RAM-Functions erzeugen - wie?

Gast #2113645
Lesenswert?

Hallo,

ich habe nun folgendes getestet:

main.c:

#define RAMFUNC _attribute_ ((long_call, section (".ramsection")))
void myFunction(void) RAMFUNC;

void myFunction(void)
{
  ...
}

sam7s256_rom.ld:

.data : {
        __data_load = LOADADDR (.data);
        __data_start = .;
        KEEP(*(.jcr))
        *(.got.plt) *(.got)
        *(.shdata)
        *(.data .data.* .gnu.linkonce.d.*)
        . = ALIGN (4);
        *(.ramsection)
        _edata = .;
    } >RAM AT>ROM

Allerdings bringt der Compiler ne Fehlermeldung:

src/main.c:451:6: error: conflicting types for 'myFunction'

Hat bitte noch jemand einen Tip?

Danke!
Peter

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren