2023-09-13 02:25 AM - edited 2023-09-13 02:52 AM
How to start with FileX using CubeMX?
In CubeMX I enabled ThreadX and FileX with the default configuration, increased ThreadX "memory pool size" to 2k and enabled "Generate Init Code" for both.
In app_azure_rtos.c, tx_application_define() function MX_FileX_Init() fails - tx_byte_allocate() returns error code 16. According to docs that means TX_NO_MEMORY "Service was unable to allocate a block of memory within the specified time to wait.".
I get this error even when I substantially increase ThreadX "memory pool size" to 64k.
Without FileX enabled ThreadX works - I created a timer which nicely blinks the onboard LED.
I know FileX does not really require ThreadX, but I need it for other purposes.
This is probably something simple, but I admit I am new to ThreadX.
Tested with the latest CubeMX, STM32U5A9 MCU as well as NUCLEO-U575ZI-Q boards.
Please advise.
Solved! Go to Solution.
2023-09-13 07:41 AM
Hi @TDJ,
Thank you for you feedback. I confirm the issue, I reproduced on myside reported the issue internally.
Internal ticket number 161368 for tracking.
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.
2023-09-13 03:31 AM
Hello @TDJ,
I am not sure if this wiki would help you Introduction to FILEX - stm32mcu
You can try using this example (without ThreadX) STM32CubeU5/Projects/STM32U5G9J-DK2/Applications/FileX/Fx_File_Edit_Standalone at 7942fc4ea05026e4e9ce72d680f704e9433bce42 · STMicroelectronics/STM32CubeU5 (github.com)
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.
2023-09-13 04:44 AM - edited 2023-09-13 05:12 AM
@FBL Thank you, but my goal is to get FileX working with ThreadX while it seems that current CubeMX version is unable to get even the most basic configuration right. This likely is an issue which should be raised internally. Otherwise, what is the point of having it supported in CubeMX?
Anyway, this example may be more relevant.
2023-09-13 07:41 AM
Hi @TDJ,
Thank you for you feedback. I confirm the issue, I reproduced on myside reported the issue internally.
Internal ticket number 161368 for tracking.
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.
2024-03-07 01:19 AM
Hi,
any news on this topic?
Has the issue been resolved by ST ?
I am insterested too in building applications on STM32U5 that will need to include ThreadX as well as FileX and UsbX.
2024-03-07 01:49 AM - edited 2024-03-07 01:55 AM
@jacopokunak See my working example here. However, because of this issue on STM32U5xx you better reconfigure it the way so PLL1 and, consequently, USB-C (OTG_HS) are clocked by HSE.
2024-03-07 04:11 AM
Hi,
i use FileX on sd-card (because forced by STM to use it, no more fatFS ... grrr )
and have exfat enabled, which is used on most >32GB cards.
Here my (working :) ) setting:
btw
also ThreadX delay-tick is set to 1ms , to have same delays as in HAL without much thinking or conversion.
2024-03-25 01:53 AM
Hello All
The fix is implemented in the CubeMX 6.11.0 published on st.com
Don't hesitate to come back and report issues.
Thanks
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.
2024-06-17 03:58 PM
Hi, FBL,
I installed CubeMX 6.11.1. Still fails MX_FileX_Init() fails - tx_byte_allocate(). Have you verified the latest CubeMX and check if FileX and ThreadX can be working together? Thanks in advance.
2024-06-18 04:27 AM - edited 2024-06-18 04:28 AM
Do you mean you still have an issue of memory pool size? Same error TX_NO_MEMORY ? or section placement failed ? If so, MX team suggests implementing a warning message as workaround to prevent surpassing the available total memory size AzureRTOS (+threadX ..). Nonetheless, should you encounter any problems with the thread stack size exceeding the memory pool size, please feel free to report back.
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.