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 2)

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

Now get back to the target Keil's project and select all following settings.
If you haven't created STM32CubeIDE's project from your Keil's project yet, then follow these two blog entries:
[Keil][STM32CubeIDE] How to create STM32CubeIDE project from Keil's project source files?
[Keil][STM32CubeIDE] Keil integration into STM32CubeIDE
1621634557373-png.169637

1621634566370-png.169638

1621634571085-png.169639


Now is the hardest step. You need to search for "arm-none-eabi-gdb.exe" file in your version of STM32CubeIDE - unfortunately the full path is needed.
Mine was as presented in the picture below:
169640


I noticed several problems with loaded image by OpenOCD. I suggest not to check "Load image" option.
1621634581662-png.169641

169642

169643


At this point perhaps OpenOCD is not working locally at your PC. The following error can appear then.
169644


I suggest to use Keil to program FLASH. You can do so from STM32CubeIDE - use Build Target approach and "program_flash" command.
The picture below presents effect of FLASH programming command. It uses Keil's project settings. Of course your board needs to be powered on and connected through a debugger/programmer.
169645


Now start OpenOCD in separate CMD window in a place where you created debug config file for a dummy STM32CubeIDE's project for the same MCU, as an example below:
169646

Copy/paste content:
"openocd.exe" "-c" "gdb_port 3333" "-f" *.cfg"

Run debug once again:
169647


OpenOCD should detect incoming connection now:
169653


The final effect of debugging Keil's project inside STM32CubeIDE is presented on following pictures:
169649

169650


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
Views
7,899
Last update

More entries in Uncategorized

More entries from niciki

Share this blog entry page

Back
Top