Skip to main content
GeneralTao
Associate II
June 25, 2020
Question

Jumping to random file after pressing Run button

  • June 25, 2020
  • 105 replies
  • 56095 views

Hello. When I press to Run (Run main.c) button, STM32CubeIDE opens random file, possibly, from current repository, for example: startup_stm32l452xx.s, core_cm4.h etc...

Code is loading successful, but this side effect bothers me.

I would like to disable this function. How can I do it?

If you need more information about this behavior please, ask.

Thank you for reading.

105 replies

kshoy.1
Visitor II
March 3, 2023

I observe the same or similar behavior, in the meanwhile the current version is 1.11.2. The described behavior occurs after running Debug.

Initially, the IDE opens the startup_***.s file if you press the RUN button in the same session as you ran a Debug.

For some time the normal behavior can be restored if you restart the STM32CubeIDE.

After a while, restarting the IDE does not restore the normal behavior any longer. I also observe then, that (assumedly but not verified, if the startup_***.s is already opened), an apparently random window may be opened and get focus after pressing the RUN button, even if no Debug has been run after restarting CubeIDE.

At the moment a related ticket 00173614 is open. If it gets fixed this time?

HØdeg.1
Associate
March 5, 2023

I experience exactly the same thing. Cursor jumping to a random .c file. Happens in both running AND debugging mode (after running the project, then stopping it in debugging mode). Incredibly annoying!

Running version 1.11.2 on MacOS

Piranha
Principal III
March 5, 2023

Three years of ignorance... Maybe it's time for you guys to move to some actually usable IDE? ;)

https://community.st.com/s/question/0D53W00000U7PcHSAV/keil-vs-stm-ide

PHolt.1
Senior
March 6, 2023

This decision depends on various factors.

If you work alone, then you can use the same IDE and it doesn't matter much what it is. For example I design circuits with ORCAD SDT/386 and PCBs with protel PCB 2.8, both from about 1995! And both work perfectly, in a winXP VM. The great advantage is that I can open a project from years ago, do mods, generate new gerbers, etc. You can't do that with most licensed products after a certain time.

But let's say you are working on a project where others are contributing parts, and it is to be run on a PC at home, PC at work, laptop while travelling, etc, then you don't want anything that is licensed, and especially not anything using any kind of floating license which involves an inline check.

Cube does work (I've been using it for over 2 years) and one can just install it on any machine, win7-64 or later, or in a VMWARE VM for a totally standalone solution, and it is totally free. And if you disable the update check then it should just keep working for ever, with no internet connection.

Paid-for products tend to stop working past a certain age. Look at what happened with Adobe. There was such an uproar when they pulled the license server function for CS3, that they were forced to give away perpetual keys for CS2. And the Adobe bootleg scene (CS6 and later, which Adobe rent out now) went into overdrive.

ST should fix that random file opening bug. As I posted, it is dangerous because it switches the input focus from whatever app you are typing in, to Cube, and Cube consumes the next few characters before you realise you have just corrupted some .c files... This focus switch doesn't always happen but I have not investigated why and how.

LT.1
Associate II
March 8, 2023

Same issue 1.12.0.

Jpail.1
Visitor II
March 14, 2023

I finally have a work-around:

Open your editing perspective, click "Run" with you device connected of course. Right click and detach the random window that pops up. The click drag the window via the window tab circled in red and drag to the right side of the screen. When the gray separation line appears in the middle of the window as shown in the first picture, release click. Then minimize the window as shown in the second picture circled in green. Now, select "Debug", and change window perspective to debug. Repeat the same steps above in this debug perspective.

Now when either running/debugging your program, a small, minimized version of the startup_stmxxx file pops up briefly, but then re-minimizes once the run/debug initial startup is complete.

0693W00000aIs6IQAS.png0693W00000aIs6SQAS.png

Kazimierz Król
Associate III
March 20, 2023

I tried to do that, but the minimized popup window does not disappear automatically (version 1.12.0). Thanks for the idea anyway.

PHolt.1
Senior
March 14, 2023

Are you running Cube v1.12 ?

I have just loaded that and I am seeing either no issue or a lot less of it.

It used to open loads of files but I am not seeing that right now.

eos1d3
Associate II
March 14, 2023

There are three possibilities:

  1. You do not run debug mode first.
  2. You are ST employees who never have this issue.
  3. You lie as it never "open loads of file". It just open one random file each time you run it.0693W00000aIvBfQAK.png
PHolt.1
Senior
March 14, 2023

I am running in debug (F11).

Maybe there is some other difference.

I don't work for ST : -)

VSánc.2
Visitor II
April 16, 2023

Same issue on 1.12.0

NRoth.3
Associate
April 27, 2023

Very annoying... please ST.