Compiler issue
Hello,
the simple line
while(i0.NewDataFromEeprom == FALSE);
is compiled differently by CrossStudio for ARM.
For ARM Ram Debug the compilation is correct:
A0003448 E59F3064 ldr r3, 0xA00034B4 <MainInit2+0x19c>
A000344C E5933034 ldr r3, [r3, #0x34]
A0003450 E3530000 cmp r3, #0
A0003454 0AFFFFFB beq 0xA0003448 <MainInit2+0x130>
But for ARM Flash Debug the result is
00004178 E59F30A0 ldr r3, 0x00004220 <MainInit2+0x1e8>
0000417c E5933034 ldr r3, [r3, #0x34]
00004180 E3530000 cmp r3, #0
00004184 0A00001E beq 0x00004204 <MainInit2+0x1cc>
...
00004204 EAFFFFFE b 0x00004204 <MainInit2+0x1cc>
...
I.e. it becomes an infinite loop without checking the variable any longer.
The first idea was that a project property setting might be wrong. But the suspicious ones are equal in both configurations:
Enable Unused Symbol Removal No
Optimization Level None
Keep symbols _vectors
What might be the reason for these different results?
Does anybody have clue?
Regards,
Henry
Please sign in to leave a comment.
Comments
4 comments