CubeMX AzRtos Startup code Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-23 2:17 PM - edited ‎2025-02-23 2:37 PM
Hello,
Is it possible for ST to re-order the startup code in ST's implementation of AzRtos (CubeMX)?. I think it would make everyone's life a lot easier if all the AzRtos services (ThreadX, FileX, NetX, USBX) start before the user apps/threads.
Currently, in the file: app_azure_rtos.c, the process is:
- create TX memory pool
- Start User threads (app_threadx.c)
- create FX memory pool
- Start MX_FileX_Init()
- create NetX memory pool
- Start MX_NetXDuo_Init()
- create USBX memory pool
- Start MX_USBX_Host_Init()
- Start MX_USBX_Device Init()
The problem is that user threads are started before the necessary system services are available.
I think it was done this way to simplify how CubeMX generates the code (where the user threads are grouped with ThreadX). In my opinion it makes more sense to move "step 2" after the USB services are up and running. In my opinion it should be as follows:
- create TX memory pool
- create FX memory pool
- Start MX_FileX_Init()
- create NetX memory pool
- Start MX_NetXDuo_Init()
- create USBX memory pool
- Start MX_USBX_Host_Init()
- Start MX_USBX_Device Init()
- Start User threads (app_threadx.c)
Maybe I'm missing something, but how did ST engineers want end-users to start 5-6 user tasks that use all system resources? I can re-order the sequence myself, but then that means I get rid of CubeMX, or is there a better way?
thanks
Matthew
- Labels:
-
AzureRTOS
-
STM32CubeMX
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-30 4:13 PM
Can't answer you question as I am new to theadx. I am just curious what MCU do you use? I don't seem to have option to enable threadx for F4/F7/H7.
https://community.st.com/t5/stm32cubemx-mcus/threadx-support-missing-for-f4-and-f7/td-p/788408
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-30 4:18 PM
H743
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-30 4:28 PM
Interesting, I don't have threadx option for H743...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-30 4:41 PM
you have to install the software pack first by clicking on "Software packs"
the select the options you want under azrtos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-30 5:31 PM
Ah, thanks a lot! You saved me a lot of time. Appreciated!
