2020-06-25 6:27 AM
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.
2025-05-27 6:06 AM
haha, some recursion in your 1st paragraph, made me laugh
"It is a real error"
of course, no questiuon about that..just want to see how bad it is..i've worked with a well known £10k+ licence dev tools and ST ecosystem is better, for 'free'..I am surprised how stable it is..embedded is a jungle
2025-05-27 6:06 AM
I don't think it is a totally random file. The file opened is one which contained code that was running when the debugger stopped the CPU.
If running under an RTOS then stuff opens all over the place because loads of tasks are running under it.
2025-05-27 6:15 AM
"I seems that you dislike people more than IDE issues."
I think I failed to express myself - it bothers me that people are annoyed.
2025-05-27 6:23 AM - edited 2025-05-27 6:27 AM
Thanks @padawan
I had watched the video for maybe a minute, waiting for it to stop, only to realize it was running in a loop.
But this was solved already i think. I'll try to find the post with answer. Hm. Very sad.
Or more correctly, the change I did in CubeIDE setup stopped that from happening.
2025-05-27 6:32 AM - edited 2025-05-27 6:33 AM
Hi ferro,
at https://wiki.st.com/stm32mcu/wiki/STM32CubeIDE:STM32CubeIDE_errata_1.18.x
at
ID 162500
After programming a device in Run mode, STM32CubeIDE opens every time a new tab with startup file and give focus on that tab.
and the errata is worng: its not only a/the startup file. The files are random, like .c or .s or others.
So it is not solved!
padawan
2025-05-27 6:43 AM
I see. Very frustraiting.
I am on 1.17 and I know about this thread only because I had the same issue, and I solved it months ago, and dont remember how I did it.
I'll switch to 1.18 in few weeks so might come here again. Annoyed.
2025-05-27 10:14 AM
Ferro, I'm astonished by people like you. Instead of offering a solution or contributing anything of value, you focus on expressing your personal views, for example, how you're bothered by people who are bothered by things (completely irrelevant).
Meanwhile, a community member kindly shares a video where it's clearly visible that a "startup..." file randomly opens just seconds after hitting debug, and yet you say you've watched it several times and see nothing? On top of that, if everyone is reporting the same issue, maybe it's actually not resolved?
Why don't you just open the IDE, compile a hello world, hit run, and see what happens? Try to be a bit more constructive, people post here because they're genuinely facing a problem and don't want to waste time reading irrelevant messages.
2025-05-27 10:17 AM
It shouldn't be a complicated thing. There is a thread that controls the debug session with the device and there is a GUI thread controlling the IDE. Somehow these are not communicating properly. It leads the IDE thinking the debug session has started, when it hasn't (play/pause button clickable too soon) and the IDE using an invalid stack pointer value to jump to random code. Perhaps initializing the stack pointer in this code with NULL and only jumping to a file once it contains a valid value or something might fix it.
What information is exchanged between the debugger and the IDE? When there is a breakpoint it communicate an address. When halting it reads various registers and memory regions. Live values are probably more complicated, but we can leave that out of the scope for this problem. I guess the number of events communicated isn't that much. We just have to pinpoint where it all goes wrong.
How can we debug STM32CubeIDE itself? Do we have to build it from source? Is there source available? Do we have to debug the GBD driver too? I don't know where to start. But if someone can give a hint I might try to look into it.
2025-05-27 10:36 AM
@padawan etc.
I just thought about buying a development kit that we all agree on (maybe an H7, around £60), sharing a single project, and comparing the results and settings. It would be better to have sth tangible.
What do you think ?
2025-05-27 10:45 AM
Well, this was fun to read. Thanks.