2024-12-07 08:08 AM
Hello. I follow your instruction to generate a touchGFX project.
„How to TouchGFX: Creating my first GUI with TouchGFX Designer for STM GUI aplications“
I‘m using the latest version of all Program for the STM32Cube family. The project compile in TouchGFX with no error. It so possible to download it to the board. All work fine. But after import to CubeIDE there is no xxx.ioc file include. I‘m not able to change hardware setting to onboard LED turn on and off.
Solved! Go to Solution.
2024-12-09 02:37 PM
See these instructions that shows you how to link the IOC file to the STM32CubeIDE project tree. It also shows how to link the TouchGFX file as well. This is for the STM32F429I-DISCO as it is the most programmatic due to revision naming issue. Depending on what board you are using, YMMV.
https://github.com/karlyamashita/STM32F429I-DISCO_Link_IOC
2024-12-09 02:50 AM - edited 2024-12-09 03:32 AM
Hello,
Already explained in this thread, you can use the independent STM32CubeMx tool downloadable from this link and open your STM32F429I_DISCO_REV_E01.ioc file from your project folder:
Double click on it.
There you can change the hardware setting to toggle the onboard LEDs and generate the code using this "GENERATE CODE" button:
OK we can consider it's a minor enhancement as it's not a blocking issue and you can open the ioc file from your local folder. Internal ticket number for follow-up for this minor enhancement: 198069.
2024-12-09 03:58 AM
Hello @Peter57 ,
Let's clarify the issue here.
When you open STM32CubeIDE, you do not have access to the STM32CubeMX tab directly from within the STM32CubeIDE software?
When I want to change hardware on a TouchGFX project, I simply open the ioc file from the file explorer, it should also be available in your project's folder :
I invite you to open the ioc file from the file explorer, do your changes, then generate code from STM32CubeMX and then generate code from TouchGFX Designer to be safe.
Regards,
2024-12-09 08:15 AM
Hello, Thank you for your reply. Yes i follow the way to told me. I creatae TouchGFX projekt, open it with CubeMX and Try to modify the LED_green. At first CubeMK bring this message:
I use Continue and go ahaed and change the xxx.ioc file.
Then ii generate the GFX Code again. It works propper and generate the Code new with no error.
You see, the STMCubeIDE folder is generate now, German Time.
The STM32F429I_DISCO_REV_E01.ioc file is form same time Stamp.
The backup_STM32F429I_DISCO_REV_E01 is form different time stamp ( Yesterday.)
Now i open the STM32CubeIDE folder and double Klick on .project
The CubeIDE say: Import is ready, no error. BUT the STM32F429I_DISCO_REV_E01.ioc file is not in the Projekt Explorer......
I uplaod the file to the Board. But the LED_green do nothing.....
My code is very simple
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
HAL_GPIO_TogglePin(LED_green_GPIO_Port, LED_green_Pin);
HAL_Delay(500);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
If i try to debug the code, I see that the main.c show me this:
and in fact, I place a break point to the HAL_GPIO_Toggle.....and i never reach it. The LED is continius off.
By debug and Yusin >step Over> I can go up to osKernelStart and finish.
Hope you understand my problem.
2024-12-09 08:41 AM - edited 2024-12-09 08:42 AM
Yes, it is normal and as the comment says, we should never get to that line of code.
This is because we are using a RTOS to handle the CPU resources and allow resources to both the graphic application and the main application.
If you want to create a blinky example, you should look at a freeRTOS (because we use freeRTOS as the RTOS) blinky example.
Here is the first freeRTOS blinky tuto I found on YouTube, it looks fine, just skip to 2:50 because you do not need to set up the RTOS itself as it is already setup by the TouchGFX TBS, all you need to do is to add a task.
Note that this tutorial uses STM32CubeMX to setup the task, but you can set it up "manually".
Alternatively (but it is not recommended), you could use the model.cpp file from TouchGFX and the handleTickEvent() function to run code every tick (60 times per second), this is kind of similar to the while loop you are used to.
I hope this helps! :smiling_face_with_smiling_eyes:
If this comment or a previous one answers your question, I invite you to select it as "best answer".
Regards,
2024-12-09 09:35 AM
Hello, Gaetan Godart, thank you for your reply. I realy don't notice that all nust be set up as a RTOS task. This explain excactly what happend. :)
Only my question about the missing xxx.iox file is still open, but i have a workaround, this will help.
THank you again, Peter
2024-12-09 02:37 PM
See these instructions that shows you how to link the IOC file to the STM32CubeIDE project tree. It also shows how to link the TouchGFX file as well. This is for the STM32F429I-DISCO as it is the most programmatic due to revision naming issue. Depending on what board you are using, YMMV.
https://github.com/karlyamashita/STM32F429I-DISCO_Link_IOC