cancel
Showing results for 
Search instead for 
Did you mean: 

No GPIOx registers are present in System Viewer for STM32G051 or STM32G061 microcontrollers during debug session

RBein.1
Associate III

No GPIOx registers are present in System Viewer for STM32G051 or STM32G061 microcontrollers during debug session. There are 12 different .sfr files for each different variant of STM32G0 microcontroller, but only the above two lack GPIO registers in System Viewer window. Why? What is the magic reason for it, is it just a mistake by ST vendor to not include them or is there another reason? I tested what would happened if I loaded a custom file i.e. STM32G050.sfr instead and I can clearly see the GPIO config and its state being toggled that way. So than the question really is - why is it not included in STM32G051.sfr??? I know that all GPIO registers are memory mapped, but that is not a convenient way to debug whatsoever.

I would really appreciate if someone reached out regarding this issue.


_legacyfs_online_stmicro_images_0693W00000bihUjQAI.png

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hi @RBein.1​ ,

To add the correct SVD file in Keil, please follow these steps:

  1. Copy the STM32G051.svd file that you downloaded from ST web site in …\Keil_v5\UV4 folder.
  2. Open Command Prompt and write this command "cd …\Keil_v5\UV4" to change directory for UV4 folder and press enter.
  3. To convert the STM32G051.svd file to STM32G051.sfr, please write this command "SVDConv STM32G051.svd --generate=sfr" in Command Prompt and press enter.
  4. So, an STM32G051.sfr file is created in UV4 folder.
  5. Open your project with MDK-ARM toolchain and click in “Options for Target�? as shown in the below figure.


_legacyfs_online_stmicro_images_0693W00000bitYiQAI.png 6.Browse the STM32G051.sfr file generated in UV4 folder as shown in the below figure.


_legacyfs_online_stmicro_images_0693W00000bitYnQAI.pngI hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
KDJEM.1
ST Employee

Hello @RBein.1​ ,

I think that you use the MDK-ARM toolchain and it is the issue of updating files.

So to solve the problem, try to use the correct system view description published in ST Web site.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you for your contribution in the ST community.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

KDJEM.1
ST Employee

Hi @RBein.1​ ,

To add the correct SVD file in Keil, please follow these steps:

  1. Copy the STM32G051.svd file that you downloaded from ST web site in …\Keil_v5\UV4 folder.
  2. Open Command Prompt and write this command "cd …\Keil_v5\UV4" to change directory for UV4 folder and press enter.
  3. To convert the STM32G051.svd file to STM32G051.sfr, please write this command "SVDConv STM32G051.svd --generate=sfr" in Command Prompt and press enter.
  4. So, an STM32G051.sfr file is created in UV4 folder.
  5. Open your project with MDK-ARM toolchain and click in “Options for Target�? as shown in the below figure.


_legacyfs_online_stmicro_images_0693W00000bitYiQAI.png 6.Browse the STM32G051.sfr file generated in UV4 folder as shown in the below figure.


_legacyfs_online_stmicro_images_0693W00000bitYnQAI.pngI hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

RBein.1
Associate III

Dear Kaouthar,

This is fantastic help. I ignored/forgot to check ST website for this issue.

Thanks for the effort of demonstrating the steps required for .svd to .sfr conversion.

Rytis