Sysprogs forums › Forums › VisualGDB › Cortex core registers
Tagged: cortex registers
- This topic has 15 replies, 4 voices, and was last updated 6 years, 9 months ago by support.
-
AuthorPosts
-
December 21, 2016 at 15:57 #9842tw39124Participant
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?
December 22, 2016 at 06:16 #9843supportKeymasterHi,
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.
July 26, 2017 at 10:47 #11834tw39124ParticipantThanks, this appeared to fix it – I can now see the ARM Cortex registers.
October 27, 2017 at 19:26 #12779dabramsonParticipantI 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.October 28, 2017 at 03:56 #12782supportKeymasterHi,
Please use the via Debug->Windows->Registers command to view the CPU registers.
November 1, 2017 at 20:10 #12820dabramsonParticipantThat window just says “No data available”.
I checked that “enable address-level debugging” is enabled under Tools->Options Debugging Node.
November 1, 2017 at 20:12 #12821supportKeymasterHi,
Please try right-clicking there and selecting the register groups you need.
November 2, 2017 at 19:04 #12833dabramsonParticipantWhen 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?
November 2, 2017 at 21:55 #12835supportKeymasterHi,
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.
March 7, 2018 at 16:34 #20334cbcParticipantHi.
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
$controlMarch 7, 2018 at 18:01 #20337supportKeymasterHi,
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).
March 8, 2018 at 08:57 #20345cbcParticipantHi.
Thanks for your reply.
The only options I get when I right click in the Registers window is:
Copy
Select AllMarch 8, 2018 at 18:38 #20346supportKeymasterHi,
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.
March 9, 2018 at 11:35 #20349cbcParticipantHi. Thanks for your answer.
I have tried to attach a screenshot.
Attachments:
You must be logged in to view attached files.March 9, 2018 at 11:39 #20351 -
AuthorPosts
- You must be logged in to reply to this topic.