Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


.project file links duplicted during STM32CubeMX code regeneration

I have observed that when code is regenerated from STM32cubeMX (4.8.0) the .project link entries become duplicated at the end of the file instead of replaced. This does not yet cause a problem since eclipse appears to handle it by giving priority to the latter entries but if files have been removed in later configurations, the links in the project will still exists and be compiled.

I have tried this on 2 different processors including the default configuration for the STM32F429I-DISCO board.

For a particular project, the duplicated links have the correct file but the for the duplicated entries all had the same locationURI entry, causing in all files linking to a single file. This results in compilation failure. Additionally the order of the file entries was randomized preventing comparison with the committed .project file. The only solution was to remove the .project and .cproject files before code generation. This causes other problems such as total loss of project configuations and path setup to non-generated files.

Is there any way to prevent this?
My workflow is ensure eclipse is closed,
Open the .ioc file, make changes, in CubeMX,
Genenerate Code
Re-Open preovious workspace.

The project higherarchy follows the guide:
http://www.openstm32.org/Importing+a+STCubeMX+generated+project?structure=DocumentationQuestion
I do not rename the project or generated files.

No improvement with 4.9.0
Also posted on STM32 Software Tools and Firmware forum. I’ll update if resolved.


Poland

I have similar issue. I believe this is bug on STM32CubeMX side.

After manual adding new project files, Eclipse changes tag with in “.project” file.

These tags make STM32CubeMX unhappy with project regeneration and ends with error: “...SW4STM32 project generation have a problem.”. After this error project wont compile anymore...

Do you found any solution to avoid this problem? Manual replacing back to is a bit annoying.


I have this problem as well and it is very frustrating. To understand the origin of the issue, is seems that when I add other files to the project this error occurs on the next CubeMX code generation.

What I need clarification is, if there is a way to manually correct this, how?

I was contractor on this project for several months, and have since moved on. I’m working from memory here so your results may vary and this may not be completely how I did it but hopefully you’ll get the idea.

Source control is essential, be sure you have a committed version before you perform the changes in CubeMX.
AFter changes in CubeMX, compare in the .project file against the committed version, and look at the file link difference. (we were using subversion, diff with winmerge or meld). Some manual comparing and editing is required. Forunately the order of the files is normally kept in tact so the compare is not terrible.
In your difference viewer, in the new file, delete the section of old file paths that match committed version and refresh. The new diff will show the old file paths nearly matching the file paths with the bad locationURI, plus and additons and deletions, from here you should be able to update the old paths from the committed version (keep in mind additions and deletions).

You may also try to re-arrange the order of the files before editing in CubeMX.. I also did find in some cases re-creating the project resulted in a different file order in the .project file, and the edits from CubeMX worked correctly.

Good luck.


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs