SEGGER step-debug jump unexpected into Disassembly code

I use SEGGER step-debug commands F5, F10 and F11.

Sometime F10 cause the debugger to step into disassembly code, making continue debugging hard.

Restart debugging 'cause exactly same behavior, but then later the issue disappear. 

I cannot see any reason since the code is not strange at all. No code-optimizing is configured.

Just one Example:

void CBtCmd::Advert(char *adv)
if(Port == 1)  // Here F10 result in jump to disassembly while previous code work fine in C++ 
memcpy(TxBuf(), adv, ADV_LEN);
SCmd.BtTx(TxBuf() ,ADV_LEN);

QUESTION: Is there any way to prevent SEGGER unexpected jump into Disassembly ?

  • Actual it looks like it jump into some exception-code, but only when in single step-debug.

  • As far as I know, the segger jumps into disassembly, if it was not able to figure out where the source files for that part of the code section is. 

    In your case if you are stepping one line in the same source file, then it is a bit strange that it jumps into disassembly.

    1. Make sure that there are no unintentional breakpoints set in the disassembly code.
    2. Understand what lies at the address of the disassembly code where the execution jumps to. 
    3. If the assembly instruction does not show any jump to the code section of the disassembly section, then it could be a segger IDE bug, please contact them through forum do understand more.