2026-03-12 12:27 AM - edited 2026-03-12 12:42 AM
Hello everybody.
I try to convert an STM32CubeIDE project into a CMake project to be used on VSCode using the procedure included in "STM32CubeIDE for Visual Studio Code" extension.
The procedure aborts with this error message:
Solved! Go to Solution.
2026-03-12 2:15 AM
Hi @MGO,
Indeed, this issue has been spotted in some firmware example projects as well. We are currently working on it and hope to deliver a fix soon.
In the meantime, if you want to try the project conversion, you can do it from the CLI after duplicating your JSON file somewhere else on your disk and fixing it by escaping the backslashes (\) with double backslashes (\\).
Then run:
cube ide-project-convert --bypass-converter <path_to_stm32cubeide-export.json> --source-format stm32cubeide --destination <cmake_project_location> --format cmakeHope this helps.
2026-03-12 2:15 AM
Hi @MGO,
Indeed, this issue has been spotted in some firmware example projects as well. We are currently working on it and hope to deliver a fix soon.
In the meantime, if you want to try the project conversion, you can do it from the CLI after duplicating your JSON file somewhere else on your disk and fixing it by escaping the backslashes (\) with double backslashes (\\).
Then run:
cube ide-project-convert --bypass-converter <path_to_stm32cubeide-export.json> --source-format stm32cubeide --destination <cmake_project_location> --format cmakeHope this helps.
2026-03-13 3:46 PM
Thank you @Julien D for the fix!
I had a similar issue with this line in my export json:
"option.directories": "["${workspace_loc:/${ProjName}/Middlewares/ST/STM32_Audio/Addons/SRC441/Lib}"]"where the inner quotation marks weren't being escaped. I fixed it by putting a backslash infront of the inner quotation marks. Hope this helps someone at some point!
2026-03-14 2:25 AM - edited 2026-03-14 2:26 AM
Thank you @ShadowOnWiiU for your valuable feedback.
You are right; some parts of the JSON may not respect the format depending on the input project. This lack of quote escaping has been tracked on our side, and a fix is on its way.
The variable resolution issue is being addressed as well.
2026-03-15 8:23 PM
cube ide-project-convert --bypass-converter ../123/stm32cubeide-export.json --source-format stm32cubeide --destination ../123 --format cmake
2026-03-16 11:19:01.530 [Info] Generating project...
2026-03-16 11:19:02.358 [Error] Inconsistent source files found across project configurations is not supported.修改好后,出现错误,还需要什么配置吗?
2026-03-16 12:49 AM
Hi @Oliver_yydd,
The current version of the tools requires having the same sources across all configurations defined in the exported JSON file. This was a deliberate choice made for the first version.
2026-03-16 2:10 AM
Other warnings and errors on folders:
[Warn] Issue copying headers: Error: ENOENT: no such file or directory, lstat 'c:\Repo_mgo\STM32Workspace\NGDrive\Appl\dDrive_Fwk2\Repo_mgo\STM32Workspace\NGDrive\Library\STM32H7xx\Drivers\CMSIS\Device\ST\STM32H7xx\Include"'
The RED part of the path above is wrong, appended erroneously.
There are many of these warnings.
[Error] EPERM: operation not permitted, copyfile 'c:\Repo_mgo\STM32Workspace\NGDrive\Library\STM32H7xx\Drivers' -> 'C:\Repo_mgo\STM32Workspace\NGDrive\VSCode\dDrive_Fwk2\Library\STM32H7xx\Drivers'
In this case paths are correct, but I get an "operation not permitted" error.
After this error the procedure aborts.
2026-04-09 5:47 AM
Hi @MGO,
Apologize for late replying. What you describe has been reproduced and analyzed. This is tracked by an internal ticket.
It happens when your include paths are defined with absolute path in your STM32CubeIDE (Eclipse based) project definition, you can workaround it by using relative paths within it instead.
2026-04-14 6:22 AM
Hi Julien D.
Thank you for the reply, I am going to apply your workaround.