March 13, 2013

KEIL and bkpt 0xab

This was particular my inattentiveness this time. Once I created new function which returns object created on the HEAP (using C++ and KEIL on Freescale KL25), program stopped working. It got stucked at instruction BKPT 0xab. I thought somehow semihost got enabled, did recheck if it was not enabled.

After I checked all options offered in KEIL, I started to think this must be related to the heap. The problem was in startup assembly file where HEAP was initialized to 0.

I have attached picture from disassembly: