cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure FileX using CubeMX?

TDJ
Lead

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.ctx_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.

STM32-ThreadX-1.png

STM32-ThreadX-2.png

10 REPLIES 10

@FBL 

Hi FBL,

     I am using STM Cube 1.14.0 to develop my project. I found that the FileX and ThreadX can not work together. my hardware is U575 eval board.

  • Just use FileX, SDCARD is working and can create file;
  • Enable ThreadX, SDCARD failed in initialisation;
  • Disable ThreadX, FileX works as usual.

 

Could you confirm this problem and tell me if there is any solutions.

I checked ST’s community, it seems that many people complain about this problem and there is no solution so far.

I can send you my project source code if you would like to verify. Thanks in advance.