Skip to main content
JSILV.2
Associate III
November 9, 2022
Question

Issue on Semihosting on CUBE IDE

  • November 9, 2022
  • 1 reply
  • 1238 views

Salutations for all.

I programmed my CUBE IDE on Debug Mode by the recipe-> https://community.st.com/s/article/how-to-use-semihosting-with-stm32cubeide-and-stm32. It Works.

But when I STOP the running program on CUBE IDE the TARGET STOP the program either. And if I shut off the CUBE IDE, the TARGET seems as not have the Embedded program on it. If I run the TARGET powered alone, it seems like not have any Embedded program.

If I use one program copy but without the semihosting features, using the ST-Link GDB Server, the target works alone even disconnected from CUBE IDE.

Question: What should I do in order to have the Embedded Program into TARGET even Flashing on CUBE IDE by the ST-LINK Open OCD? Is it possible?

The Semihosting Feature is very useful for development.

Regards.

This topic has been closed for replies.

1 reply

Pavel A.
Super User
November 9, 2022

A program built with semihosting depends on the debugger and is not expected to run standalone.

(of course, a program can detect that debugger isn't connected, and avoid calling semihosted functions).

JSILV.2
JSILV.2Author
Associate III
November 9, 2022

Dear Pavel.

I am referring that the functions that should runs in the target is OUTSIDE the semihosting ones. For example, I made a simple Blinking LED into the debuggered program with the semihosting and even this LED blinking does not runs. But a clean program (without Semihosting) works as expected even when the Target are standalone.

Comments are welcome.

Regards

Pavel A.
Super User
November 12, 2022

So if you want to run standalone, just do not build with semihosting ?

Do you call initialize_monior_handles?