Skip to main content
Vvine
Associate II
September 10, 2020
Question

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

  • September 10, 2020
  • 3 replies
  • 3246 views

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.

This topic has been closed for replies.

3 replies

Markus GIRDLAND
ST Employee
September 11, 2020

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
November 9, 2020

Hello,

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

Regards,

Cartu38 OpenDev
Graduate II
November 9, 2020

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 ?

HABIJ.1
Associate III
November 9, 2020

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

HABIJ.1
Associate III
November 12, 2020

Thanks for your time and reply,

Well, my concern was more about the adding files procedure and how to add paths to the compiler and the linker.

Since my previous message, I found out how to add files by importing them rather than copying them from their directory and pasting them in the project.

And for adding paths, I am doing it in Project>Properties>C/C++ build>Settings>Tool settings>MCU GCC Compiler>Include Paths

I think that might be the good way to include source files and their paths to avoid losing them as it happened to me lately.

I still have to understand the benefit of adding files or libraries to the linker and what kind of files/libraries must be added.