2020-06-25 06: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.
Solved! Go to Solution.
2020-07-03 03:41 AM
Sounds like unexpected behavior. I cannot reproduce on my environment Windows 10. What happens if you just for the sake of testing:
Would be interesting to know if it is still the same issue with a fresh workspace? If no issue with new workspace, then I wonder if you made any preferences settings in old workspace?! Eclipse is a huge jungle of settings. Few people on planet earth know them all and the implications they may have in various corner cases...
2020-06-30 07:51 AM
I imagine most people would want the editor to open the file to be able to show the line where the execution is halted. So in your case the problem is that it is not the right file that is opened?
Some follow-up questions:
Which optimization level are you using when debugging? This could be a result of using a high optimization levels. The source code look-up only works with -O0 and -Og.
2020-07-03 02:23 AM
Thank you for answer.
I mean just Run mode, not Debug mode (image on the bottom). CubeIDE opens different files. Last time it opened startup_stm32l452xx.s and system_stm32l4xx.c.
Also I noticed, that it opens files only when ide detects some errors.
For example, if I gives none r-value to third parameter of HAL_DMA_Start_IT function like here:
HAL_DMA_Start_IT(&hdma_usart2_tx, (uint32_t)mes, (uint32_t)&huart2.Instance->TDR, strlen(mes));
Ide shows me system_stm32l4xx.c file and places cursor to 7 line (in code further):
/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
} // <------------ here is cursor
May be it tries to help me to define error, but I don't understand how should I use this information.
I just know: if ide opens file for me - something wrong in code.
Also, I use
Windows 10,
STM32CubeIDE Version: 1.3.1 Build: 6291_20200406_0752 (UTC)
My optimization level is None (-O0)
2020-07-03 03:41 AM
Sounds like unexpected behavior. I cannot reproduce on my environment Windows 10. What happens if you just for the sake of testing:
Would be interesting to know if it is still the same issue with a fresh workspace? If no issue with new workspace, then I wonder if you made any preferences settings in old workspace?! Eclipse is a huge jungle of settings. Few people on planet earth know them all and the implications they may have in various corner cases...
2020-07-04 02:43 PM
And also Eclipse is probably the only IDE on planet Earth, where some "geniuses" thought that blending together IDE settings with project settings is a good idea. Damaged workspaces are a thing exactly because of this "genius" design... :)
2020-07-07 03:25 AM
Thank you for answer. And sorry for delay.
mattias norlander, I tried your advice. It really helped me. May be during learning this ide I changed some configs.
I also amazed, what new workspace was created with new interface icons. May be some update changes take effect only in new workspace.
2020-07-07 04:00 AM
That is the "genius" design behind the Eclipse workspaces and the whole industry's dumbness of "being OK" with such a fundamentally flawed design. The same story as with this SalesForce pseudo-forum...
2021-12-02 12:48 AM
I faced the same problem! Interferes with work! Constantly, even when there are no errors, a random file from the project opens in the tab after clicking on "Run" (Run as).
2021-12-23 12:51 AM
For me (and a co-worker) too. New project doesn't change the behavior... I am working with CubeIDE 1.8.0 . Have you found a solution, its quite annoying?
Best wishes and a nice Christmas
Tobias
2022-03-22 11:22 AM
Same issue on 1.9.0.