cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX don‘t incl the xxx.ioc file in Project manager

Peter57
Associate II

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. 


 

1 ACCEPTED SOLUTION

Accepted Solutions
Karl Yamashita
Lead III

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

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

View solution in original post

6 REPLIES 6
SofLit
ST Employee

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: 

SofLit_0-1733741342365.png

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: 

SofLit_0-1733743926598.png

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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
GaetanGodart
ST Employee

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 :

GaetanGodart_0-1733745443030.png

 

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,

 

Gaetan Godart
Software engineer at ST (TouchGFX)

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:

Screenshot 2024-12-09 163209.png

 I use Continue and go ahaed and change the xxx.ioc file.

Screenshot 2024-12-09 164048.png

 Then ii generate the GFX Code again. It works propper and generate the Code new with no error.

Peter57_0-1733759092896.png

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......

Peter57_2-1733759446353.png

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:

Peter57_3-1733760229399.png

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.

 

GaetanGodart
ST Employee

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

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

Karl Yamashita
Lead III

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

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.