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

PHolt.1
Senior
May 23, 2023

As I wrote above, the spurious files being opened are ones containing code that was running when the debugger did a Reset.

So if your project consists of just one code file (say main.c) then you won't see this problem.

But almost nobody has a project in a single .c file. Well, you could do it but it would be very messy.

PHolt.1
Senior
May 23, 2023

"There is absolutely no need to halt the uC to see the issue. The unwanted file is opened whether or not the uC is halted"

The unwanted file gets opened upon a specific event. IME it opens when the CPU is reset or un-reset; I can't tell which but in my typical usage it happens during debugging, or after a debug build (F11). I think the CPU is briefly halted.

Brian H
Senior
May 23, 2023
"I think the CPU is briefly halted."
Okay, that's a fair assessment. I meant to say that it doesn't require the user halting the uC. A typical load/debug session definitely involves halting the uC for a period, just not because the user said "stop."
PHolt.1
Senior
May 23, 2023

It is possible for someone to almost never see this problem if the CPU spends 99% of its time in one .c file (say main.c) and 1% in other .c files.

The reason I posted above.

So on some trivial project, 1 file, it will not be seen. On a real project, say 20 files, loads of RTOS tasks spread across different files, it will be seen a lot.

qua
Associate III
May 23, 2023

Even if you only have one file, it will jump to a random position in that file. That is also very annoying.

benany
Visitor II
May 28, 2023

Same here. Please fix this issue ASAP!

PHolt.1
Senior
May 28, 2023

" "MCU GCC Compiler" → "Includes" to ensure that the correct source file is set as the main file."

No such path.

There is Include Paths but no setting for .c


_legacyfs_online_stmicro_images_0693W00000bl0fpQAA.png 

"make sure that the "Main" tab has the correct main file specified."

There is only the .elf specified and if it wasn't then nothing would run


_legacyfs_online_stmicro_images_0693W00000bl0fzQAA.png"Clean and rebuild your project: Sometimes, inconsistencies can occur during the build process, which may lead to unexpected behavior."

Yeah, that one is well known!

"Update STM32CubeIDE: Ensure that you are using the latest version of STM32CubeIDE. Updates often include bug fixes and improvements that can resolve issues like the one you are experiencing."

That has no effect. No visible fixes of any bugs for last 2 years or so.

"Seek help from the STM32CubeIDE community: If the problem persists, you can visit the STM32CubeIDE support forums or the STMicroelectronics community forums to seek assistance from other users or the development team. They may have encountered similar issues or have additional insights on how to resolve them.

That one is from chatgpt.

Actually maybe the whole post is from chatgpt.

kshoy.1
Visitor II
May 28, 2023

The "(Community Member)" yueri.1 is registered since today, 28.05.2023 and has already posted 3 comments to different topics, all in chatgpt style: lengthy, imprecise and useless.

Either one is trying to quickly acquire points by citing chatgpt or it is a chatgpt-family bot. Ban!

PHolt.1
Senior
July 26, 2023

Version 1.13 does the same.

Lukasz Nowak
Associate III
August 18, 2023

I have had this problem for many versions, including 1.13 (on Windows 10). Run launches, freshly after opening the IDE work fine. But after the first Debug session, the random files open on every Run launch, until the IDE is restarted.

It is extremely annoying.

If ST have difficulty recreating this, I can check anything on my machine - do ask.

Gaston_78
Graduate II
September 1, 2023

Looks like from STM nobody cares this issue.. :face_with_rolling_eyes:  which is very annoying, with full opened tabs after programming/RUN several times

 

Associate
September 4, 2023

Still No fix for this issue !?

Associate
September 4, 2023

In my understanding, this simply occures because when you upload your ELF, the debugger connects, interrupts the current execution and thus opens the file matching with the current location of the program. (And yes, this is boring, but this is what you expect all the time except while downloading...)
I would guess this is eclise-related rather than STMCube...