cancel
Showing results for 
Search instead for 
Did you mean: 

code gets lost upon debug

KPort.1
Associate

I downloaded the STM32CubeF7 bundle and extracted it. Then made a new folder under the projects folder of the bundle and started STM32CubeIDE with the workspace pointing to the projects folder. I started a new project blinkled and put the blink code in main.c

The code compiles ok, and I have a blinking led.

Now as soon as I hit the debug button, all my code gets cleared out of the main.c folder.

The file is actively overwritten, even if I keep the file open in an external editor.

What am I doing wrong here?

1 REPLY 1
KnarfB
Principal III

I have never observed that behaviour. Only Debug/Relase folders shall be cleaned when re-building. Sometimes Eclipse is slow in syncing files on a network share. Would suggest creating your workspace outside that project tree and followling "How to use STM32CubeIDE" and UM2553 STM32CubeIDE quick start guide for a first blinky. Use simple, plain ASCII path names, no spaces, umlauts etc.. You can then add existing projects to your workspace even if they are out of workspace tree. In STM32CubeIDE use File > Open Projects from file System... and find the project's folder. Note that the STM32Cube example projects are for multiple IDEs and reuse source files from various folders.