cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to running GDB server without ST-Link

SKled.1
Senior II

I am trying to debug a program in STM32CubeIDE on a Renode emulator, with a running gdbserver, started by Renode.

So in Debug Configurations dialog, Debugger tab, there is a radiobutton Connect to remote GDB server, but when clicking Debug, it complains about no ST-link being found.

Is it possible somehow to set things up such that I'm debugging only with GDB, without requiring a hardware debugger?

8 REPLIES 8
MM..1
Chief II

I mean this works only with

0693W00000VOjhWQAT.png 

Semer CHERNI
ST Employee

Hello @Community member​ 

First let me thank you for posting.

Unfortunately, this is emulator is not officially supported by ST.

But if you are able to make it work it is going to be interesting to share the details with the community.

Thx

Semer.

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.

I'm not sure I can, out of that batch, make a running Renode instance start a gdb server.

Perhaps one can start a new renode instance with all the stuff needed, like loading a platform model, AND starting gdbserver... I'll look into that.

Is the ST-LINK_gdbserver _the_ thing that requires the HW debugger? Because, I set in the debug config to connect to a "remote server", which souns to me like it would not do anything with the ST-LINK_gdbserver.

This i use with stlink remotely. But i mean isnt for renode.

Maybe this 0693W00000VOpNDQA1.png

Hello,

depending on how things go with what "MM..1" showed & I found out, well, if it's innate in CubeIDE to want the ST-link (or Segger) present, I have no chance of making that work, right?

Btw,

let me state that it might be in ST-Micro's interest to allow easy interoperability between their default IDE and Renode, for at least two reasons:

  • given long lead times for actually getting STM32 products in recent years, it might motivate some companies looking at other vendors' offerings to stay with their known vendor, if they can at least easily write & test their firmware before the hardware is available
  • Antmicro, the maker of Renode, has already collaborated / is collaborating with e.g. Microchip for some of their offerings. I'll leave it at that. ;)

Ah, damn. Forgot about those other profile types.

I got farther with that, though I'm still doing something wrong w.r.t. starting the emulation at the right moment in all of this, or the .elf wasn't really loaded (Renode complained about PC/SP being 0), need to look into that more.

Pavel A.
Evangelist III

CubeIDE debugger has also OpenOCD option. It is opensource, you can hack it.

Chris F
Associate II

With the hints provided by other users here in this thread, I got remote debugging of an application running on an emulated STM32 MCU in renode working:

  1. Load your machine in the renode monitor shell. For example: (monitor) include @scripts/single-node/nucleo_l433rc_p.resc 
  2. Start the GDB server in the machine to listen on port 3333 (or any other unused port): (nucleo_l433rc_p) machine StartGdbServer 3333

  3. In CubeIDE (v1.13.2) add a GDB Hardware Debug configuration like this:GDB-remote-Debug-Configurations.png

  4. Click the Debug button so that the debugger connects to the GDB server
  5. Start your machine in renode
  6. Use the debugger in the CubeIDE