Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Debug][Keil][STM32CubeIDE] How to debug Keil's STM32 project in STM32CubeIDE?

[Debug][Keil][STM32CubeIDE] How to debug Keil's STM32 project in STM32CubeIDE? (Part 1)

The background:
I have found a way to debug a Keil's project using OpenOCD inside STM32CubeIDE.
This approach assumes that the Keil built the project to the .elf file using fromelf.exe tool.
The same method can be successfully used for debugging in any other capable environment, e.g. VSCode.

The solution:
Let's start with creating debug config file in STM32CubeIDE for the same MCU like in Keil's project. It will be used to debug a target Keil's project.
As an example STM32L041G6Ux will be used:
1621633035131.png

1621633063436.png


STM32 project location can be wherever you like. It is only important to have "Executable" and "STM32Cube" checked.
1621633073219.png

1659481586686.png


The result of creating a dummy STM32CubeIDE's project for the same MCU is presented below:
1621633142521.png


Now create debug configuration file by selecting all settings as follows:
1621633151101.png

1621633157830.png

1621633163936.png

1621633179001.png

1621633172922.png

1621633188677.png


At this point using STLINK, you should start debugging just created dummy STM32CubeIDE's project:
1621633199894.png

NOTE: This newly generated Debug Configuration File "..._Debug.cfg" can be used to debug Keil's project in both: STM32CubeIDE and/or VSCode.

From this point you can proceed to:
[Debug][Keil][STM32CubeIDE] How to debug Keil's STM32 project in STM32CubeIDE? (Part 2)
or
[Debug][Keil][VSCode] How to debug Keil's STM32 project in VSCode?

Hope it was helpful for someone there.

------------------------------------------------------
Is this blog entry helpful or does it need an improvement?
Please leave the comment below.

Comments

There are no comments to display.

Part and Inventory Search

Blog entry information

Author
niciki
Read time
2 min read
Views
7,897
Last update

More entries in Uncategorized

More entries from niciki

Share this entry

Back
Top