cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with TouchGFX compilation on No-RTOS applications

FElec.1
Associate

Hello everyone!

I'm a fairly new STM32 user (and developer in general) and my main goal is to be able to design applications using TouchGFX, configure the periphericals and such and generate the code if needed with CubeMX and modify it in CubeIde.

I'm currently using a STM32F429I-DISCO board and I've come across with several issues involving the compilation of the TouchGFX part of the project and thus, I'm unable to flash the target and interact with the screen.

Since I'm just getting started, I would prefer to not use a RTOS for the time being if I can, even if it reduces the application's efficiency, but when I have configured the CubeMX that way, I camre across some errors.

I will explain my procedure in case the problem is there. First, I have created a .ioc, configured it with a disabled FREERTOS and an activated Graphic Device (TouchGFX Designer) and generated the code. Then I modified the application in TouchGFX, have generated the code, imported it and programmed it in CubeIde and when I tried to build the project I found these errors.

I'm aware that, since there's no FREERTOS configured, it cannot find those files but commenting the code lines ends up in namespace and class reference errors. It's confusing because I configured the MX and therefore, TouchGFX application that way. Shouldn't it generate the files with no RTOS then?

Would you mind giving me some pointers or possible solutions to these problems? I would really appreciate it.

I will attach some photos to this post so you can see the issues first hand.

0693W000005AQmkQAG.png0693W000005AQmQQAW.png0693W000005AQmGQAW.png0693W000005AQm6QAG.png 

Thank you in advance and I hope you have a nice day.

Elena.

6 REPLIES 6
Martin KJELDSEN
Chief III

Hi, sorry for the delay.

Definitely there should be no references in your project to FreeRTOS. Looks like the error is coming from within an embedde TouchGFX middlewares folder which may expect a FreeRTOS installation further out (which is correctly not there).

Let me look into it. F429-DISCO you say?

/Martin

CStir.1
Associate III

Hi, is this problem solved, did you manage to run Touchgfx app without RTOS? I'm trying to do this for month and is not running. I'm also using stm32f429i-disco1 I run many examples and my software but only with freeRTOS. I really want to see an working implementation of a TouchGFX project without RTOS and running on this popular and cheap board.

In my case I can compile and run the code, but the screen remains blank. The endless while loop were the MX_TouchGFX_Process(); does nothing to the display, and the same example but with rtos works perfect. What am I missing?

Claoo

Hi,

Are you able to display something on the screen without using TouchGFX (and without an OS)?

Try to write a color to the framebuffer to make sure the issue comes comes from the TouchGFX loop, like done in this article.

/Romain

Thank You for the reply Romain, I start the tutorial from you link, and I've discovered that in LTDC_IRQHandle(), doesn't trigger. I have the interrupt activated from CubeMX for LTDC. I'm missing something but I don't know what. But If I start a project from TouchGFX Designer for STM32F429I_DISC1 it works, but the example is with RTOS, I don't know how to start a project in Designer without RTOS.

I declared my frame buffer like this:

uint16_t framebuffer[240*160]; //half screen//16 bpp framebuffer

0693W000007DWJEQA4.pngI've modified the Layer Settings to match the frame buffer size

0693W000007DWLeQAO.pngBut the Interrupt doesn't occurs, I'll try tomorrow to force it somehow. Or maybe other suggestions, what to check further?

PS: Also, even thou I use HAL_LTDC_SetAddress(&hltdc, (uint32_t)framebuffer, LTDC_LAYER_1); and the parameter pLayerCfg.FBStartAdress is taking the address of framebuffer, the display doesn't show anything, even if I change the background color from CubeMX.

CStir.1
Associate III

Hi, I made some test running the examples from ST I tried the Example for CubeMX for STM32F429i-disc1 the example is called LTDC_Paint, it works very well but I can't find any use of LTDC in that projects, I see that the example use BSP HAL Drivers and ILI9341 driver from Components folder and the interface is configured to run on SPI5. Same with the example from TouchGFX Designer. Maybe I'm wrong and I'm missing something.

Does anybody has an working example for STM32F429I-disc1 with LTDC driver on RGB Parallel interface? or maybe is somewhere on st.com site and I can't see it.

CStir.1
Associate III

Hi, after some hours I manage to solve the problem I used the generated code from TouchGFX Application Template provided for stm32f429i-disco and I generated the code. After I opened the .ioc file in CubeMX and I made the modification to remove de RTOS and configure some custom pins. After that I delete all the freeRTOS folders from the Middlewares folder. And very important I open the Makefile from gcc folder and delete all "os" related entries. (like include path).

Now I'm able to run my code and test it from TouchGFX designer and also from CubeIDE with full debug capabilities. The problem is that the display for this board configuration need to be initialize from the SPI interface, so it need the Board specific BSP drivers from CubeMX repository. In this way the MTX_LTDC_Init function() has this code at the end:

  /* USER CODE BEGIN LTDC_Init 2 */
    /*Select the device */
  LcdDrv = &ili9341_drv;
  /* LCD Init */
  LcdDrv->Init();
  
 LcdDrv->DisplayOff();
  /* USER CODE END LTDC_Init 2 */

Which is very important, but as can be seen it let the LCD off so I added this line  LcdDrv->DisplayOn(); and works very well.