2024-03-15 12:56 AM
I'm working with TouchGFX, in my project I include n files that are needed for the hardware I use, a custom hardware with STM32F429II...
They are variable interchange files between the TouchGFX engine and my hardware.
The entire project works when it is compiled and programmed on the target, while it doesn't work when I start the simulator: gcc, during compilation, does not find the files I include.
Can anyone help me resolve the problem?
Solved! Go to Solution.
2024-03-19 04:46 AM
2024-03-18 06:46 AM
Hello @davide_mp ,
That seems to be an issue with the make file that is different, where did you place your custom files ?
Regards,
2024-03-18 11:38 PM - last edited on 2024-03-21 01:01 AM by LouisB
HI,
Thank you for your suggestion.
Yes, I imagined it, unfortunately I don't know the make file directives...
My custom files have been inserted in the "USER CODE BEGIN Header" section of main.c, and the system works, when I press the "F6 Program and Run Target" button of the TouchGFX framework, the project is compiled and loaded onto the target correctly, while when I just start the simulator, the framework doesn't find my files.
So I solved it by inserting in the "MainView.cpp" file (working screen of my project):
#ifndef SIMULATOR
external "C"
{
#include "my_define.h"
}
#endif
#ifdef SIMULATOR
#include "../../../Core/Inc/my_define.h"
#endif
So I'll ask you something else instead:
in one screen I can present the prototypes of some functions that I am going to create and use... can I create functions at a global level, in the sense that they can be seen and used by n screens?
Thank you,
David
2024-03-19 03:57 AM - edited 2024-03-19 03:57 AM
Hello @davide_mp ,
For better readability please use Insert/Edit code sample when you write code on the forum.
You can also try to add this folder in "ADDITIONAL_INCLUDE_PATHS" in the makefile ("<yourProject>\TouchGFX\simulator\gcc\Makefile") and the corresponding source folder in "ADDITIONAL_SOURCES" :
For your other question, you can put your functions in FrontendApplication, this class is included in all screens.
I hope it helps,
Regards,
2024-03-19 04:46 AM
Thanks for your help !
Davide
2024-03-21 04:14 AM
Hello @davide_mp,
Happy to hear that it helped you, for additional help don't hesitate.
Regards,