How to go about adding a file system to an MQX K64 project? KDS

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

How to go about adding a file system to an MQX K64 project? KDS

2,018 次查看
georgejoseph
Contributor III

I'm interested in adding a file system (for flash) to my application using mqx on a k64 platform. What libraries to include, how to configure etc. I'm using Kenetis Design Studio with processor expert, and am new to embedded file systems.

4 回复数

1,636 次查看
DavidS
NXP Employee
NXP Employee

Hi George,

In general the internal flash is not meant for a file system like you would have on a PC or mounted to a USB MSD Stick or SD card.

The internal flash or NOR based and has restrictions on how you erase and program.  But you can implement a Trivial File System (TFS) that our MQX4.2 RTOS and KSDK_1.3 and KSDK_v2.0 have inherent to them.

But if you want a DOS like mkdir/rmdir/dir/copy/move/etc...like commands then you want USB stick or SD Card interface of which K64 supports both.

In MQX4.2 the following have TFS example:

C:\Freescale\Freescale_MQX_4_2\demo\web_hvac_v2\build\kds\web_hvac_v2_frdmk64f

C:\Freescale\Freescale_MQX_4_2\rtcs\examples\httpsrv\build\kds\httpsrv_frdmk64f

Please let me know if you have further questions.

Regards,

David

0 项奖励
回复

1,636 次查看
georgejoseph
Contributor III

Thanks David,  We actually have an external memory that I want to install the FS on. It's actually MRAM which is persistent like flash. I also want to eventually involve a usb flash drive and/or an sd card, but I first want to install the file system on our external memory. 

0 项奖励
回复

1,636 次查看
DavidS
NXP Employee
NXP Employee

Hi George,

C:\Freescale\Freescale_MQX_4_2\mfs\examples\ramdisk can be setup to mount MFS on MRAM (external memory).

This is cool and convenient but not necessarily the most efficient method as FAT file system has to hog up space for the FAT table.

Rule of Thumb is MFS ok for large memory devices (USB Stick and SD Cards) but not great for smaller memories.

But if it does what you want then that is all that matters.

Regards,

David

1,636 次查看
acampbell
Contributor II

If MFS doesn't meet your needs, check out Datalight's reliable IoT filesystem, Reliance Edge: https://www.datalight.com/reliance-edge. It is pre-ported to MQX and is highly configurable, which might make it preferable in tight or odd disk situations. And it doesn't ever corrupt on power failure, unlike FAT.

0 项奖励
回复