Support for exFAT in FileX for i.MX RT1024

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Support for exFAT in FileX for i.MX RT1024

Jump to solution
371 Views
bubblegumcoder
Contributor II

We are currently designing a product using iMX RT1024 and Azure RTOS. FileX claims that it supports exFAT file system but we can't manage to make it work. When we activate the definition FX_ENABLE_EXFAT, FileX no longer works even with FAT32. I've also seen that it needs licensing, but in theory NXP have licensed the whole iMX RT lineup for use with Azure RTOS.

Could it be that NXP has to provide an alternative version of FileX when an user requests support for exFAT?

0 Kudos
1 Solution
232 Views
bubblegumcoder
Contributor II

We finally managed to get it working, what we did was:

  • Compile the FileX library example with FX_ENABLE_EXFAT enabled in fx_user.h
  • Compile the UsbX library example with FX_ENABLE_EXFAT enabled in fx_user.h. It seems this step is also needed.
  • Import the compiled libraries in our project
  • Compile our project with FX_ENABLE_EXFAT enabled in fx_user.h

This way, we could read and write both from FAT32 and exFAT

I'm leaving this here in case anyone else has the same problem regarding exFAT support

View solution in original post

Tags (4)
4 Replies
233 Views
bubblegumcoder
Contributor II

We finally managed to get it working, what we did was:

  • Compile the FileX library example with FX_ENABLE_EXFAT enabled in fx_user.h
  • Compile the UsbX library example with FX_ENABLE_EXFAT enabled in fx_user.h. It seems this step is also needed.
  • Import the compiled libraries in our project
  • Compile our project with FX_ENABLE_EXFAT enabled in fx_user.h

This way, we could read and write both from FAT32 and exFAT

I'm leaving this here in case anyone else has the same problem regarding exFAT support

Tags (4)
220 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @bubblegumcoder 

Thanks for sharing !

Diego

0 Kudos
335 Views
bubblegumcoder
Contributor II

Hi @diego_charles,

I have been checking the post you linked but can't manage to make it work.

Before creating this thread, I had tested the following combinations:

  1. Import example usbx_host_mass_storage_device for MIMXRT1024-EVK, compile it with the default configuration and test with a flash drive. It works OK when with FAT32 format and does not work with exFAT (as expected).
  2. Modify the previous project and activate the definition FX_ENABLE_EXFAT located under "azure-rtos/config/fx_user.h". Now, the microcontroller does not detect neither FAT32 nor exFAT (could be expected without recompiling the FileX library)
  3. Remove the library located in "azure-rtos/binary/filex/cortex_m7/mcux/libfilex.a" and the folder "azure-rtos/filex", and instead download FileX source code from its repository, v6.2.0, and integrate it in the project. Then test with the FX_ENABLE_EXFAT definition both commented out and active. The result was the same as with tests 1. and 2.

 

Then, after reading the post you linked, I have tested:

  • Import example usbx_host_mass_storage_device again to start the process again
  • Import the filex_lib example, compile it, and copy the file libevkmimxrt1024_filex_lib.a to replace "azure-rtos/binary/filex/cortex_m7/mcux/libfilex.a" (renaming the new file to the same name as the old one). This was done without the definition FX_ENABLE_EXFAT in the library project. The result is now that it can read FAT32 but can't exFAT, no matter the FX_ENABLE_EXFAT state (defined/not defined) in the mass storage device example. This result is different from the previous situations (1-3) but I guess it could be expected if the library behaviour has been established whe compiling it
  • Same as the previous test but following the steps from the TraceX post regarding using "liblinks.xml" and replacing the library in the mass_storage_device project properties

 

This should work, right? Do you have any ideas that I could try? Or could you test it with a EVK?

I'm using MCUXpresso IDE v11.8.0

 

0 Kudos
352 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @bubblegumcoder 

I hope that you are doing well!

Have you tried to build again the FileX library with that macro enabled? Maybe, the macro you enabled is not working because of the demo comes with a static library, this is my first suggestion to check. The FileX and all the ThreadX demos come with static libraries.

Our colleague Erich Styger wrote  this article RTOS Trace: TraceX with Microsoft Azure RTOS (aka ThreadX) where he shows how to import  and build  the TraceX library, you may follow his concepts, to link the Filex library to your application.

We do not supply more than the demos and the source libraries. See below an example where you could import the FileX library. 

diego_charles_0-1709143555584.png

I hope this could help you! Let me know any further comments or questions you may have.

Diego

 

 

 

 

0 Kudos