lpcware

Unable to retrieve disassembly data from backend.

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Italia on Wed Sep 03 03:00:15 MST 2014
Hi,

i'm programming my CPU LPC2468 and my program run really good in debug mode.
Now, when i compile in release mode, my program stop tu function correctly and fall
in an infinite loop in an "if" instruction. I look the disassembly code and in the if instruction
i have the following:

boolean I2CEngine(time_t timeout)
{
while (!done)
{
if (I2CMasterState == DATA_NACK)
{
//result = I2CStop();
done = true;
}
                                  }
}

In this case the I2CMasterState is modified in the interrupt routine and the degug show
that the the if condition is sutisfacted.

DISASSEMBLY:

00002a00:   bge     0x2a0c <I2CEngine+28>
442       I2CStop();
00002a04:   bl      0x29a4 <I2CStop>
446       done = true;
00002a08:   mov     r3, #255        ; 0xff
451       if (I2CMasterState == DATA_NACK)
00002a0c:   ldr     r2, [pc, #32]   ; 0x2a34 <I2CEngine+68>
449       while (!done)
00002a10:   cmp     r3, #0
451       if (I2CMasterState == DATA_NACK)
00002a14:   Unable to retrieve disassembly data from backend.
00002a15:   movs    r0, #0
00002a17:   b.n     0x25be <coreFlashROMWrite+158>


Looking the disassembly there is also a missing coerence of the logic flow of the portion of program that i don't understand.

Thank u for u attention.

Outcomes