2025-01-13 11:09 PM
The problem I'm facing is that the Touchgfx doesn't know anything about additional link paths that I've setting up through IDE. Steps:
1. Create the project with touchgfx designer;
2. In the root of the project create a folder, then add .h and .c files there. Let's say myfile.h and myfile.c. In myfile.h file you defines one function, in myfile.c just an empty implementation;
3. Add path to included files in linker;
4. Include myfile.h in main.c and use somewhere empty function;
5. Build the project.
The project will build without errors. But if you go to the designer and press button "Program and Run Target", it will cause an error: Core/Src/main.c:28:10: fatal error: myfile.h: No such file or directory #include "myfile.h".
Solved! Go to Solution.
2025-01-14 08:49 AM
I did this $(foreach comp, $(user_paths), $(comp)/Inc) for include_paths and I did this $(foreach comp, $(user_paths), $(comp)/Src) for source_paths. And it worked.
2025-01-14 02:44 AM
Hello @Wiser1201 ,
TouchGFX Designer and STM32CubeIDE do not share the include paths.
So if you want to flash through TouchGFX Designer, you need to include your extra files to the include and source paths.
To do so, go to your gcc folder and open the Makefile.
Now you have to add your files to the include_paths and the source_paths variable.
Regards,
2025-01-14 06:52 AM
Thanks for the answer. My Inc and Src files are located at: $(application_path)/User/Inc and $(application_path)/User/Src.
After I added this to the makefile I get an error:
Compile
make -f ../gcc/Makefile -j8
../gcc/Makefile:293: *** multiple target patterns. Stop.
Failed
I have attached my makefile, please take a look.
2025-01-14 07:08 AM
2025-01-14 08:49 AM
I did this $(foreach comp, $(user_paths), $(comp)/Inc) for include_paths and I did this $(foreach comp, $(user_paths), $(comp)/Src) for source_paths. And it worked.