MFS create not working.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MFS create not working.

跳至解决方案
2,047 次查看
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.

标记 (3)
0 项奖励
回复
1 解答
1,746 次查看
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 项奖励
回复
3 回复数
1,746 次查看
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 项奖励
回复
1,746 次查看
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 项奖励
回复
1,747 次查看
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 项奖励
回复