Hello Merlin,
there is a silly bug in avrco 5.07.00 with optimizer 3.4.1.0
Look at the picture of the Attachement:
Bytes are written to wrong Memory Locations (red circles)
program optimizerAddressBug;
Device = mega2560, VCC=5;
Import;
From System Import ;
Define
ProcClock = 16000000; {Hertz}
StackSize = $0064, iData;
FrameSize = $0064, iData;
Implementation
{$IDATA}
type
T_Button = record
btnNr : byte;
btnData : array[0..9] of byte;
End;
var
btnArray[$573] : array[0..17] of T_Button;
begin
btnArray[0].btnNr := 1;
btnArray[1].btnNr := 2;
btnArray[2].btnNr := 3;
btnArray[3].btnNr := 4;
btnArray[4].btnNr := 5;
btnArray[5].btnNr := 6;
btnArray[6].btnNr := 7;
btnArray[7].btnNr := 8;
btnArray[8].btnNr := 9;
btnArray[9].btnNr := 10;
btnArray[10].btnNr := 11;
btnArray[11].btnNr := 12;
btnArray[12].btnNr := 13;
btnArray[13].btnNr := 14;
btnArray[14].btnNr := 15;
btnArray[15].btnNr := 16;
btnArray[16].btnNr := 17;
btnArray[17].btnNr := 18;
end optimizerAddressBug.
Thomas.AC
there is a silly bug in avrco 5.07.00 with optimizer 3.4.1.0
Look at the picture of the Attachement:
Bytes are written to wrong Memory Locations (red circles)
Code
program optimizerAddressBug;
Device = mega2560, VCC=5;
Import;
From System Import ;
Define
ProcClock = 16000000; {Hertz}
StackSize = $0064, iData;
FrameSize = $0064, iData;
Implementation
{$IDATA}
type
T_Button = record
btnNr : byte;
btnData : array[0..9] of byte;
End;
var
btnArray[$573] : array[0..17] of T_Button;
begin
btnArray[0].btnNr := 1;
btnArray[1].btnNr := 2;
btnArray[2].btnNr := 3;
btnArray[3].btnNr := 4;
btnArray[4].btnNr := 5;
btnArray[5].btnNr := 6;
btnArray[6].btnNr := 7;
btnArray[7].btnNr := 8;
btnArray[8].btnNr := 9;
btnArray[9].btnNr := 10;
btnArray[10].btnNr := 11;
btnArray[11].btnNr := 12;
btnArray[12].btnNr := 13;
btnArray[13].btnNr := 14;
btnArray[14].btnNr := 15;
btnArray[15].btnNr := 16;
btnArray[16].btnNr := 17;
btnArray[17].btnNr := 18;
end optimizerAddressBug.
Thomas.AC
Attachments
Filename: | optimizerAddressError.png |
Filesize: | 84.16 KB |
Title: | simulator showing optimizer bug |
Download counter: | 142 |