2024-05-18 11:58 PM - edited 2024-05-19 12:05 AM
I'm using STM32CubeMX and Visual Studio Code.
After generating a CMake project with X-CUBE-TOUCHGFX selected using STM32CubeMX, I then go to the .part file to create a UI, but when I click Generate Code it shows this error:
Generate Code
Generate
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
Reading ./application.config
Reading ./target.config
Done
Post Generate
touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
Done
Post Generate Target
touchgfx update_project
unsupported toolchain: CMake
ProjectManager.ToolChainLocation
Failed
Failed
Solved! Go to Solution.
2024-05-23 04:48 AM
Hello @Aquamarine ,
As MM said, TouchGFX is not meant to use CMake directly.
We support GCC, IAR and Keil but you are free to try something else.
If you want to use something else, you might want to have a look at your build settings:
I see that you are using VSCode.
I assume you use the STM32 extension.
At TouchGFX, we have not yet made TouchGFX and Designer compatible with VSCode but you can look at this ST employee who managed to use the Designer's simulator with VSCode using CMake : touchgfx-simulator-development-in-visual-studio-code-with-cmake (2 years old but updated in 2023).
If this comment (or MM's comment) solves your issue, I invite you to select it as "best answer".
Regards,
2024-05-19 01:18 AM
TouchGFX dont support this , but i mean you can disable post target cmd in touchgfx config and simply manage cmake config files manualy. This is for add files to compilation ...
2024-05-19 03:40 AM
OK, thank you for your help, now I disabled post cmd and it generates without problem, and indeed, when I try to build it complains a lot about "No such file or directory", so how should I modify the cmake config files?
2024-05-23 04:48 AM
Hello @Aquamarine ,
As MM said, TouchGFX is not meant to use CMake directly.
We support GCC, IAR and Keil but you are free to try something else.
If you want to use something else, you might want to have a look at your build settings:
I see that you are using VSCode.
I assume you use the STM32 extension.
At TouchGFX, we have not yet made TouchGFX and Designer compatible with VSCode but you can look at this ST employee who managed to use the Designer's simulator with VSCode using CMake : touchgfx-simulator-development-in-visual-studio-code-with-cmake (2 years old but updated in 2023).
If this comment (or MM's comment) solves your issue, I invite you to select it as "best answer".
Regards,
2024-05-23 11:49 PM
Thank you, I actually found that tutorial, but my ultimate goal is to build with an stm32 project and flash it to a costume board, so it's not quiet fit and needs investigating.
Now my question is becoming more like "How to Set up TouchGFX With STM32CubeMX Generated CMake Project Using Visual Studio Code and STM32 Extension", shall I change this post or mark it as resolved and open a new one instead?
2024-05-24 12:59 AM
Hello @Aquamarine ,
Yes, your project is definitely different that the one shared but it probably is a good guidance.
Creating a new thread would be better.
Just a heads up, what you are asking is basically to support a new IDE from scratch while it is not even an IDE but just a text editor.
I personally think we (TouchGFX) should support it but it is not the priority right now so we won't have much time supporting you, especially since this task should probably be estimated in days rather than in hours. :upside_down_face:
Your best bet is probably to get help from the community, find people who just like you want to run their TouchGFX application over VSCode and maybe making a git together.
We can't really close (lock / block) a thread but you can select a comment as "best answer".
Regards,