MFS create not working.

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

MFS create not working.

Jump to solution
830 Views
echris
Contributor III

Hi,

I just installed MFS on an SD card following an example in the SDK.  I am now experimenting with my new FS.  I can mkdir, cd, dir, etc... However, I can not seem to create a new file.

I type 'create test.txt' and the shell just hangs.  Am I doing something wrong?  Or is there something I should check? Do I need to enable 'user mode' somehow?

When I debug, it seems to hang in the lwsem.c code.  I am using a TWRK65F180M.

Thanks for any tips.

Tags (3)
0 Kudos
1 Solution
529 Views
isaacavila
NXP Employee
NXP Employee

Hello Erick!

It is rare that you could download the project without compiling MQX, SHELL and MFS libraries that are requiered for that example. But anyway, here are the steps to run this example:

  • Open KDS and select import, then select Existing Projects into Workspace located under General folder and look for KSDK library for MQX in C:\Freescale\KSDK_1.3.0\lib\ksdk_mqx_lib\kds and import the project for K65F18

Import KSDK_MQX_LIB for TWRK65.jpg

  • Compile ksdk_mqx_lib_K65F18 project.
  • Select import in next window, go to MQX folder and select Import Working Sets, then press Next >:

Import Working Set for MQX.jpg

  • Locate MQX working set for TWR-K65F180M in C:\Freescale\KSDK_1.3.0\rtos\mqx\build\kds\workspace_twrk65f180m and select build_libs.wsd:

Import MQX, STDLIB and NSHELL libraries.jpg

  • Compile these libraries and no error should be shown.
  • Import the MFS project located at: C:\Freescale\KSDK_1.3.0\middleware\filesystem\mfs\build\kds\mfs_twrk65f180m and compile it.
  • In total, you should have imported 5 libraries (ksdk_mqx_lib_K65F18, mfs_twrk65f180m, mqx_stdlib_twrk65f180m, mqx_twrk65f180m, nshell_twrk65f180m).
  • Now, import the sdcard example located at: C:\Freescale\KSDK_1.3.0\middleware\filesystem\mfs\examples\sdcard\build\kds\sdcard_twrk65f180m. Compile this project and download into your TWR board.
  • Run the project and open a terminal at 115200bps and test the shell commands.

Test MFS functionality.jpg

I hope this can help you. If there is other doubt please do not hesitate on contact me.

Best Regards,

Isaac

----------------------------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
529 Views
isaacavila
NXP Employee
NXP Employee

Hello Eric,

are using MFS or FATFS? Also, I have tested sdcard_twrk65f180m example located at: <KSDK_1_3_PATH>\middleware\filesystem\mfs\examples\sdcard and it worked well, this example uses MFS. Are you adding some modifications on this example?

Have a nice day!

Best Regards,

Isaac

0 Kudos
529 Views
echris
Contributor III

Thank you for your response.  After further investigation, I suspect that my problem is related to not having built the MFS library.  Can you provide a little bit of information on how I can build the MFS.a library?

Thanks for your help.

0 Kudos
530 Views
isaacavila
NXP Employee
NXP Employee

Hello Erick!

It is rare that you could download the project without compiling MQX, SHELL and MFS libraries that are requiered for that example. But anyway, here are the steps to run this example:

  • Open KDS and select import, then select Existing Projects into Workspace located under General folder and look for KSDK library for MQX in C:\Freescale\KSDK_1.3.0\lib\ksdk_mqx_lib\kds and import the project for K65F18

Import KSDK_MQX_LIB for TWRK65.jpg

  • Compile ksdk_mqx_lib_K65F18 project.
  • Select import in next window, go to MQX folder and select Import Working Sets, then press Next >:

Import Working Set for MQX.jpg

  • Locate MQX working set for TWR-K65F180M in C:\Freescale\KSDK_1.3.0\rtos\mqx\build\kds\workspace_twrk65f180m and select build_libs.wsd:

Import MQX, STDLIB and NSHELL libraries.jpg

  • Compile these libraries and no error should be shown.
  • Import the MFS project located at: C:\Freescale\KSDK_1.3.0\middleware\filesystem\mfs\build\kds\mfs_twrk65f180m and compile it.
  • In total, you should have imported 5 libraries (ksdk_mqx_lib_K65F18, mfs_twrk65f180m, mqx_stdlib_twrk65f180m, mqx_twrk65f180m, nshell_twrk65f180m).
  • Now, import the sdcard example located at: C:\Freescale\KSDK_1.3.0\middleware\filesystem\mfs\examples\sdcard\build\kds\sdcard_twrk65f180m. Compile this project and download into your TWR board.
  • Run the project and open a terminal at 115200bps and test the shell commands.

Test MFS functionality.jpg

I hope this can help you. If there is other doubt please do not hesitate on contact me.

Best Regards,

Isaac

----------------------------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------------------------

0 Kudos