cancel
Showing results for 
Search instead for 
Did you mean: 

In the process of generating the code from the IOC configuration, STM32CubeIDE also deletes manually added source and include file paths.

Vvine
Associate II

In my STM32CubeIDE project, the source code and project file directories are different. The source files are available as linked folder. Therefore, I had made a manual configuration for the source file paths and include file paths. Some paths are relative and some are workspace paths.

Whenever I generate new source code from IOC file, it overwrites both source and include paths with its own generated paths.

Is there any option to control this behaviour? I dont mind which paths the tool itself generates along with the source code generations, however should not remove manually added paths from me.

Please let me know there is any solution/workaround for this.

I am using STM32CubeIDE v1.4.0 .

Thanks.

10 REPLIES 10
Markus GIRDLAND
ST Employee

Hello Vvine!

Could you try to update to version 1.4.2 and see if that helps?

One of the bug fixes in 1.4.2 was:

"90615 [STM32CubeMX] Unexpected project data deletion when some utilities are used"

It sounds like that might be what you are experiencing.

You can update by going to "Help -> Check for updates."

Let me know if it fixes the issue or not!

HABIJ.1
Associate III

Hello,

I had the same problem. Is there any way to recover the deleted files?

Regards,

Please provide more details first of your context to get some help.

Which target device are you relying on ? Which STM32CubeIDE release & OS you're relying on ?

Is your project based on some STM32Cube example basis ? Is your project created within STM32CubeIDE context or imported a way or another ?

Thanks for the reply. I am using a STM32L476RG. I am on Windows 10 and when my src files were deleted, I was using STM32CubeIDE 1.4.0 but now I upgrated to 1.4.2.

I am creating the project within STM32CubeIDE and my project is not based on an STM32Cube example

Any chance to share project or at minimum .ioc file if some ?

And / or please share an example of added path (build setings includes snapshot ?).

More than one projects lost their source files. Will any project or .ioc file be good for you?

Yes please share what is possible to share on a project facing trouble. Add description of handmade addon you have done

@Cartu38 OpenDev​ 

Attached is the .ioc file of one of the projects whose sources files were deleted. Please tell me if you need something more.

Usually I don't add paths of the source files I add in my projects, I simply copy and paste source files in the src folder of the project explorer window. I suspect that is not a good procedure.

Could you please help me with a link or explain to me what is the good practice when adding external source files (from libraries, APIs, ...) to a project?

Thanks for your help

Thanks for sharing.

Based on your .ioc I've created a project relying on File > New > SM32 project from existing .ioc file.

I've added then myDelay.h / myDelay.c files plus related function call as part of main.c.

Then whatever I'm doing (adding / removing a middleware or IP) from Device Configuration Tool editor view code generation is hopefully preserving my addons.

Adding files this way is a way. Plenty others are possible and supported. High level depends how complex your project is, how you are expecting to organize it, ...

0693W000005B5ocQAC.png 

I would say so no issue but feel free to share more about your working model. I may have missed something.