2023-10-18 01:59 AM
Hi,
I have written 2 cmd files. The first renames the main.cpp to main.c before the code generation runs. and the second renames main.c back to main.cpp afterwards. The files are in the project path. The plan was to access them with ${project_loc}\CppToC.cmd.
But this does not work.
Is there a solution?
Padawan
2023-10-19 07:43 AM - edited 2023-10-19 07:47 AM
Me.... joining other boomers ;)
As for integration - CubeIDE could detect installed CubeMX on the machine (even multiple instances) and expose them in menu or toolbar?
2023-10-20 01:29 AM
Hi Pavel,
I guess we could do that... Trouble is normally to provide such feature across all OS we want to support.
As an alternative to that approach the use can manually do this play with the file associations instead to force ioc-files to be opened with MX stand-alone:
Word of caution: If you set the "STM32CubeMX" editor as "Default" the project wizard will break :(
Internal ticket reference: 139637
My recommendation would be to just add this "editor" but not set it as Default. Means double-click on ioc-file will still open it inside the IDE. But, use this flow to open the ioc-file with MX stand-alone. A little bit less convenient than a double-click. But the project wizard remains functional.
I don't know if that is useful or not? In theory, you can now use whichever external MX tool you want to configure and generate the project. Keep in mind that this is not a validated use case. But I still think it can be helpful in many cases.
2023-10-20 11:02 AM
> As an alternative to that approach the use can manually do this play with the file associations instead to force ioc-files to be opened with MX stand-alone
The hitch is that "power users" often have multiple CubeMX versions side by side. Microsoft earlier solved a similar problem with multiple versions of Visual Studio by special open handler for VS solution files that peeks into the file and finds a matching VS instance for its version. (I dunno how they did it, that was Windows specific).
So I thought it could be easier to do on Linux and Mac in the CubeIDE app, maybe I'm wrong and there is a native way. It's very frustrating if you assign a random CubeMX instance to open all .ioc files and the Cube hails you with "wrong version" error.
2023-10-20 12:00 PM
> The hitch is that "power users" often have multiple CubeMX versions side by side.
Yes indeed!
TurboTax solves this by changing the tax file extension to include the year (XXX.tax2022, XXX.tax2023, or something like that). Ugly, but works. And makes it plainly obvious which version that file belongs with.
2024-06-03 01:48 AM
To ensure the CMD files run correctly from your project path, you can use relative paths or double-check the syntax of your commands. If `${project_loc}\CppToC.cmd` is not working, try using the relative path directly if the CMD files are in the same directory as your project. For example, simply use `./CppToC.cmd` or `.\CppToC.cmd` within your build scripts or IDE configurations. Additionally, ensure that the CMD files have the correct permissions to execute. If the problem persists, verify the environment variable `${project_loc}` is correctly set and accessible in your context.