Skip to main content
Visitor II
November 5, 2021
Question

Why does exist two functions named tx_application_define when I'm using TouchGFX with Azure RTOS?

  • November 5, 2021
  • 2 replies
  • 4507 views

Hello,

I'm using the STM32H750B-DK Board and the Software Packages AzureRTOS H7 and the TouchGFX. When the cubeMX generate code, there is the function tx_application_define at the app_touchgfx.c and app_azure_rtos.c files. Do I forgot to enable or disable some configurations?

The same application with FreeRTOS works fine.

Thank s for your help!

    This topic has been closed for replies.

    2 replies

    RRuoc.1Author
    Visitor II
    November 8, 2021

    Does anyone have an example for TouchGFX and Azure RTOS?

    ST Employee
    January 13, 2022

    Hello,

    You have the STM32H7B3I-DK example available from the X-CUBE-TOUCHGFX pack

    You will find it inside the Projects folder located in the installation folder for STM32CubeMX packs(inside your C:\<USER>\STM32Cube\Packs\STMicroelectronics/X-CUBE-TOUCHGFX\<Version_id>\Projects\...)

    Please note that that project was build based on AZRTOS-H7-V1.0.0 which will require you to do few steps in order to make it running again with AZRTOS-H7-2.0.0.

    Please note also that we (TouchGFX) only support 'Dynamic Memory Allocation' startegy as per today and we will move to the 'Static Memory Allocation' for the next TouchGFX release 4.19.0.

    If you're still interessted to run TouchGFX with ThreadX and so you agree on using Dynamic Memory Allocation, the the steps to make the STM32H7B3I-DK project again running are :

    • Comment out or delete the implementation of tx_application_define from the app_touchgfx.c file (that code is already under USER_DEFFINE section, we already expected today's situation ;-))
      • the #include <assert.h> is then no more needed (you can remove it also)
    • From the main.c file remove the code

    /* USER CODE BEGIN 2 */

    /* Initialize ThreadX */

    tx_kernel_enter();

    /* USER CODE END 2 */

    • Add the below code into the app_azure_rtos.c file

     /* Private function prototypes -----------------------------------------------*/

     /* USER CODE BEGIN PFP */

    extern UINT TouchGFX_ThreadX_Init(VOID *memory_ptr);

     /* USER CODE END PFP */

    ....

    /* USER CODE BEGIN DYNAMIC_MEM_ALLOC */

    if(TouchGFX_ThreadX_Init(first_unused_memory) != TX_SUCCESS)

    {

    while(1);

    }

    /* USER CODE END DYNAMIC_MEM_ALLOC */

    Hope that will work for you.

    Best Regards,

    Karim

    Visitor II
    October 25, 2022

    Hello @Karim BEN BELGACEM​​,

    Many months later with the latest STM32CubeMX 6.6.1, TouchGFX 4.20, and AZRTOS-H7 2.1.0, how all of this should look for STM32H735? Any updated\working example for the start?

    I generated the project for STM32H735G-DK but noticed that many things have changed meanwhile. Still, no image on the external 7" 800x480 RGB24 display which is working fine on the same HW with FreeRTOS.

    Many thanks in advance!

    Best regards,

    Dragoslav

    Visitor II
    November 10, 2021

    Hello @RRuoc.1​ ,

    First let me thank you for having reported.

    Normally tx_application_define function should only be generated in app_azure_rtos.c file. This issue will be reported internally to reviewed by our development team.

    I'll keep you posted with the updates.

    Internal ticket number: 117333  (This is an internal tracking number and is not accessible or usable by customers).

    Sorry for any inconvenience that this may cause.

    Otherwise, X-CUBE-TOUCHGFX pack come with a an example using STM32CubeMX as well as Azure RTOS. The AnimatedImages project is based on STM32H7B3I-DK board, but you can mimic it in order to use it with your STM32H750B-DK Board.

    0693W00000GX6FDQA1.pngThis project is using an old version of X-CUBE-AZRTOS-H7 (1.0.0) which is compatible with the old STM32CubeMX version (6.2.1).

    0693W00000GX6S2QAL.png 

    I hope I've answered your question. Please do not hesitate to raise any other question/feedback.

    Khouloud.