cancel
Showing results for 
Search instead for 
Did you mean: 

Basic ThreadX / FileX example

potatobandit
Associate II

I have created a very minimal prototype project with ThreadX on the NUCLEO-H563ZI board. I have a single task that blinks a LED on and off. 

I would like to prove out an example with FileX using SRAM. I have enabled FileX via CubeMX with the default settings. I am having issues with the project hard faulting. 
I was running into the same issue reported here: Re: FileX help - STMicroelectronics Community
After creating my own array and base address, I was able to succeed in initalization, but then hard fault trying to create a file. 

Is there any basic example showing ThreadX with FileX, using SRAM, that has the basic settings needed in the ioc?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
potatobandit
Associate II

Thank you for the reference material. Using Filex "standalone" seems to be the popular choice. 

I was able to get FileX working by increasing the 'FileX Applicaiton Thread Stack Size' to 2048. The default, when enabling FileX is 512, which isn't enough to build the base generated code. To run fx_media_open(), the stack had to be increased to 1024. To call any of the additional functions to read/write, I had to increase the size to 2048. 

ST should at least have the stack size large enough to build the default functions they generate through cube. 
If anyone runs into a similar issue trying to setup a basic example with SRAM, here are my settings.

potatobandit_0-1733940750051.png

 

View solution in original post

2 REPLIES 2
Saket_Om
ST Employee

Hello @potatobandit 

Please refer to the examples Projects/NUCLEO-WL55JC/Applications on x-cube-azrtos-wl firmware as starting point for your application. 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
potatobandit
Associate II

Thank you for the reference material. Using Filex "standalone" seems to be the popular choice. 

I was able to get FileX working by increasing the 'FileX Applicaiton Thread Stack Size' to 2048. The default, when enabling FileX is 512, which isn't enough to build the base generated code. To run fx_media_open(), the stack had to be increased to 1024. To call any of the additional functions to read/write, I had to increase the size to 2048. 

ST should at least have the stack size large enough to build the default functions they generate through cube. 
If anyone runs into a similar issue trying to setup a basic example with SRAM, here are my settings.

potatobandit_0-1733940750051.png