Forum: Mikrocontroller und Digitale Elektronik Fehlermeldung im AVR-Studio 4


von E.T. (Gast)


Lesenswert?

Hallo,

ich habe vor dieses -> http://flosserver.dyndns.org/Sternenhimmel.php
Projekt nachzubauen, dazu habe ich mir das Programm von den Jungs 
schicken lassen. Wenn ich es im AVR Studio builden möchte kommt immer 
folgene Fehlermeldungen.

../irmp.c:830:31: error: variable 'nec_param' must be const in order to 
be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:851:31: error: variable 'nec_rep_param' must be const in order 
to be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:876:31: error: variable 'samsung_param' must be const in order 
to be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:901:31: error: variable 'matsushita_param' must be const in 
order to be put into read-only section by means of 
'__attribute__((progmem))'
../irmp.c:926:31: error: variable 'kaseikyo_param' must be const in 
order to be put into read-only section by means of 
'__attribute__((progmem))'
../irmp.c:976:31: error: variable 'rc5_param' must be const in order to 
be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:1001:31: error: variable 'denon_param' must be const in order 
to be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:1026:31: error: variable 'rc6_param' must be const in order to 
be put into read-only section by means of '__attribute__((progmem))'
../irmp.c:1126:31: error: variable 'grundig_param' must be const in 
order to be put into read-only section by means of 
'__attribute__((progmem))'


Darauf hin hab ich ihn angeschrieben. Leider weis er auch nix genaueres 
über diese Fehlermeldung. Kann mit von euch evtl. jemand sagen was das 
Problem sein könnte?

lg E.T.

von Johann L. (gjlayde) Benutzerseite


Lesenswert?

1
On AVR, variables with the progmem attribute to locate data
2
in flash memory must be qualified as const.

http://gcc.gnu.org/gcc-4.6/changes.html

Ergo: Entsprechende Daten müssen const sein.

von Oliver (Gast)


Lesenswert?

Oder kompilier das ganze mit WinAVR. Da steckt noch ein älterer Compiler 
drin, der das ohne const verdaut.

Oliver

von Hubert G. (hubertg)


Lesenswert?

Schreib von den angegebenen Variablen ein const und gut ists.

von E.T. (Gast)


Angehängte Dateien:

Lesenswert?

Danke für eure Hilfe, hat prima geklappt. Auch wenn das Programm leider 
nicht so ganz passt.

Die LED's blinken nur im einheitlichen Takt. :-(
Vielleicht sieht ja jemand von euch was auf die schnelle, wenn nicht 
muss ich mal sehen wie ich es hinbekomme.

***lg E.T.***

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.