Cortex core registers

Sysprogs forums Forums VisualGDB Cortex core registers

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #9842
    tw39124
    Participant

    I am debugging a project on an STM32F439, which is a Cortex-M4 based MCU. I can use the Hardware Registers window to see all of the STM peripheral registers (GPIO, UART etc) without any problem.

    However, there does not seem to be a nice user interface by which I can view the core Cortex-M registers. I’m not talking about the generic CPU registers that I can view in the Visual Studio registers window (r0, r1, PC, SP etc, although a better UI than the awful VS text-based window would be nice!), but those defined in the ARM documentation (the System Control Space, NVIC etc). These are all at memory-mapped addresses, so it would appear to be a trivial task to include them in the XML register definitions files. Has anyone written the XML definitions for these registers? Is there a reason they are not included in the STxxxxxxx definitions?

    #9843
    support
    Keymaster

    Hi,

    Are you using the latest STM32 package (should be version 4.0 under Tools->VisualGDB Package Manager)? It should contain register definitions for ARM Cortex registers.

    #11834
    tw39124
    Participant

    Thanks, this appeared to fix it – I can now see the ARM Cortex registers.

    #12779
    dabramson
    Participant

    I am looking to see the Processor Core Registers in an STM32F4 chip. The ones in Figure 2 in the attachment (from PM0214 by ST).

    I do have the ARM Cortex M4 node, but do not see these registers under it. I’m using 5.3R3 (build 1864) and STMDevice Package version 4.3.

    Please help!

    Attachments:
    You must be logged in to view attached files.
    #12782
    support
    Keymaster

    Hi,

    Please use the via Debug->Windows->Registers command to view the CPU registers.

    #12820
    dabramson
    Participant

    That window just says “No data available”.

    I checked that “enable address-level debugging” is enabled under Tools->Options Debugging Node.

     

    #12821
    support
    Keymaster

    Hi,

    Please try right-clicking there and selecting the register groups you need.

    #12833
    dabramson
    Participant

    When I right click in the VS Registers window it gives me a with Copy (disabled) and Select All. There are no register groups. Interestingly I can see the CPU core registers when I hover over them in the disassembly window. Any other suggestions?

    #12835
    support
    Keymaster

    Hi,

    This could happen if the gdb stub you are using did not report the registers correctly or if VisualGDB did not parse them properly (our plugin for Segger J-Link had a bug with the registers, but it got fixed years ago). Please let us know which gdb stub you are using and also attach:

    • A screenshot of the registers window with the right-click menu
    • Your VisualGDB version and build number
    • The full GDB log from the debug session as described here

    Thanks.

    #20334
    cbc
    Participant

    Hi.

    I have the same problem as dabramson. I can’t see the processor core registers for a STM32F4 when I open:
    Debug->Windows->Registers.

    But I found a solution.

    In the watch window I can display the registers when I write:
    $r0
    $r1
    $r2
    $r3
    .
    .
    $r12
    $sp
    $lr
    $pc
    $xpsr
    $msp
    $psp
    $primask
    $basepri
    $faultmask
    $control

    #20337
    support
    Keymaster

    Hi,

    If those expressions work in the watch window, the gdb stub is reporting them correctly. So you should be able to right-click in the Registers window and enable other register groups (VS only enables the basic CPU registers by default).

    #20345
    cbc
    Participant

    Hi.

    Thanks for your reply.

    The only options I get when I right click in the Registers window is:
    Copy
    Select All

    #20346
    support
    Keymaster

    Hi,

    Strange, this should normally not happen. Could you please attach a screenshot of the entire VS window (and the context menu) illustrating this? It might contain some clues explaining what is going on.

    #20349
    cbc
    Participant

    Hi. Thanks for your answer.

    I have tried to attach a screenshot.

     

     

    Attachments:
    You must be logged in to view attached files.
    #20351
    cbc
    Participant

    Hi.

    I’m sorry. The resolution was not to good. This one should be better.

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.