Variables in {$DATA} area

with xMegas

Marco
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

Variables in {$DATA} area

 · 
Gepostet: 20.12.2012 - 21:23 Uhr  ·  #1
Hello,

I have defined a byte variable in {$DATA} area and an INC(var) instruction in the main.
It compile without error, but at runtimes the inc() instruction seems ignored...
Only a direct assignment var:=1; seems work...

Moving the var declaration into {$IDATA} solved the problem.

Is it still available in xMegas some {$DATA} memory space ?

Regards,
Marco
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Variables in {$DATA} area

 · 
Gepostet: 21.12.2012 - 00:01 Uhr  ·  #2
Hello Marco,

while $DATA (Registerspace) is in the linear address room for all AVRs
the Registerspace of the XMegas is completely separate.
For example the registers can be reached with LDS and STS with AVRs
this is not possible with XMegas. So some standard operations will not
work with XMegas. Here $DATA should be avoided, except ASM is used.

rolf
Marco
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

Re: Variables in {$DATA} area

 · 
Gepostet: 23.12.2012 - 13:07 Uhr  ·  #3
Ok, I suspected something like this, but not sure because I expected an error or warning at compile time...

Happy Christmas !

Marco
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Variables in {$DATA} area

 · 
Gepostet: 23.12.2012 - 16:00 Uhr  ·  #4
Hello Marco,

INC and DEC of DATA vars should work now in next update.

rolf
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   81   95 · Page-Gen-Time: 0.027501s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI