cancel
Showing results for 
Search instead for 
Did you mean: 

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

RRuoc.1
Associate II

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!

8 REPLIES 8
RRuoc.1
Associate II

Does anyone have an example for TouchGFX and Azure RTOS?

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.

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

 
 

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

Hello @dradoicic​ 

We didn't yet tested with AZRTOSH7-2.1.0 and yes there are a lot of changes included with the 2.1.0 version. Now the recommendation is to select Static Memory Allocation instead of the dynamic. That will align packs with the Native ThreadX support for STM32U5xx devices inside STM32CubeMX.

Please give a try with Static Memory Allocation and you shouldn't need any extra USER CODE to add (cross-fingers)

Then let's see together what will taht give you as result.

And we will let you know the status once we tested that on H7B3I-DK (the default project inside the X-CUBE pack)

Best Regards,

Karim

@Karim BEN BELGACEM​ Thank you!

The last 3 days and nights were productive I must say! 🙂 I managed to make it works and get an image. A lot of things are involved and have to be taken care of... The display is 800x480 which means bigger buffer(s) which means external HyperBus ram... the complexity of the project requires external OSPI flash too... frequency (as far as I can see) of these both are a bit limiting factor (200MHz and Prescaler /2) so LTDC can not go to 33.3MHz (animations are messed up on that speed) but on 25MHz. Interesting that no difference if MDMA is active or not... I must say that I'm working with it for the first time so most probably I'm missing something to squeeze out its full potential. It's also interesting that, if I set TouchGFX in CubeMX to use memory by allocation I'm getting hard fault no matter what, and if I put exact memory locations (dual buffer in both cases) inside HyperRam everything works fine. Addresses reservations are the same in both cases and note, here, I placed everything needed inside the ICF mapping file so TouchGFX works with it when I'm using FreeRTOS but ThreadX doesn't. All in all, one good fresh example with the latest dev tools and all available technologies (MDMA, HyperBus, ...) is missing to help us all. 🙂

Best Regards,

Dragoslav