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.

1 ACCEPTED SOLUTION

Accepted Solutions
mattias norlander
ST Employee

Sounds like unexpected behavior. I cannot reproduce on my environment Windows 10. What happens if you just for the sake of testing:

  1. Start a new workspace
  2. Create a new test project
  3. Use the "Run" button to download code.

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...

View solution in original post

92 REPLIES 92
mattias norlander
ST Employee

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:

  • CubeIDE only opens one file each time it halts correct?
  • Which CubeIDE version and which OS are you running on?

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.

GeneralTao
Associate II

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)

mattias norlander
ST Employee

Sounds like unexpected behavior. I cannot reproduce on my environment Windows 10. What happens if you just for the sake of testing:

  1. Start a new workspace
  2. Create a new test project
  3. Use the "Run" button to download code.

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...

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... 🙂

GeneralTao
Associate II

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.

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...

Jenny Kenny
Associate

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).

0693W00000GZkaTQAT.gif

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

sintech
Associate

Same issue on 1.9.0.