J-LinkGDB Server and Cortex-M3: mixed up registers

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • J-LinkGDB Server and Cortex-M3: mixed up registers

    Hello,

    I am trying to use the GDB server (V3.80a) with a CORTEX-M3 CPU (STM32). This does not work because the CPU registers seem to be mixed up:

    (gdb) monitor reg pc
    Reading register (R9 = 0x080060B8 )
    (gdb) monitor reg sp
    Reading register (R15 = 0x08000120)

    pc maps to R9 and sp to R15 but I expect it to be pc -> R15 sp -> R13.

    Is there a setting to change the mapping?

    Regards,

    Anton