cancel
Showing results for 
Search instead for 
Did you mean: 

Jumping to random file after pressing Run button

GeneralTao
Associate II

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.

227 REPLIES 227
Thsl
Associate II

Hi 

Now im using version 2.0 but get same issue when the project run , got multiple files opening on IDE sometime even i cant find the main file , how to avoid this in new version , anybody knows please help.

Thanks.

The sad news is that apparently there i no solution to this! Not even with PHD students or professional developers in 2025, we can avoid one file to be opened randomly! Stranagli enough that's the state of the software industry in 2025 and beyond!

 

Have you tried disabling live variables? I got the exact same behavior in Visual Studio Code when I enabled live variables there.

PHolt.1
Senior III

Problem is that a lot of people want live variables...

Live variables are live calculations, as I understand it. To write a + b in the field. But if you need it, write the variable c = a + b in the code and view it using standard methods. No problem. Or just printf to the SWV console.

Mkotb
Associate II

This worked well

padawan
Senior II

If you have to workaround a bug, there is still a bug.

And

its a bug not a feature...

padawan

PHolt.1
Senior III

This BUG is so annoying.

Been doing a lot of editing and ALWAYS it opens start startupxxx.s file. Yes I know there was a hack posted to prevent a specific file opening, but it isn't generally useful because if running in an RTOS environment, Cube always also opens some RTOS file like tasks.c.

The real problem is that if you are doing any keyboard input when this happens, this file(s) obtains focus and receives the keystrokes. You need to carefully close these files, saying NO to the Save? invitation, otherwise you corrupt your project.

STM are leaving this bug in for a reason, absolutely deliberately, but they are not saying WHY.