Using such a breakpoint is easy, you just need HEL_DEBUG_BRK
Example:
The following example shows how to stop the program execution using HEL_DEBUG_BRK:
static void ATTR_NOINLINE ATTR_USED DummyFunction() { } int main(void) { ham_Init(); // Stop program execution! HEL_DEBUG_BRK; DummyFunction(); for(;;) { // Infinite loop } return 0; }
The program execution is stopped after ham_Init
and before DummyFunction
gets called. NO$GBA halts at this point and displays the sourcecode in its debugger-window:
HEL
Library breakpoint implementation with another emulator than No$gba, it will just leave the corresponsing opcode away, assuming you specified what emulator you use (see Debug Message Functions) and therfore will not halt at the specified position.