MCF52223 Demo Question (USB file systems)

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

MCF52223 Demo Question (USB file systems)

1,384 Views
BobJohnson
Contributor I

Hello,

 

I am using a MCF5223 Demo Board and the the USB demo projects supplied by Freescale and CMX - particularly the USB Mass Storage Application.

 

I am using the supplied functions (via the thin-lib.a library) f_open, f_write, and f_close to open, write to, and close files on the USB drive

 

However, what I would really like to do is to be able to first create a file that doesn't already exist on the drive, and then subsequently write to it. Does anyone know of a way to do this with the CMX library? f_open returns zero if I supply a file name that doesn't exist already, and f_write needs a file pointer supplied by f_open, so I'm sort of at a loss. I've reviewed the available documentation, and I could not find a function that appeared to be suitable for creating files. I've contacted CMX, and they assured me that I could indeed create files, but inofmred me that I should contact Freescale.

 

Thank you very much for any help.

Labels (1)
0 Kudos
2 Replies

597 Views
fish_yu
Contributor III

IN fact,You may request a technical support service for your problem.

I think that the lib file will not be told you. It is a IP for CMX inc.

If you want to know what codes in it, You may refer a sample project for SD card by using MC9S08JM60. IN it, There is a Fat system code. Although, It is very simple, It runned on JM60 for SD card Reader.You may migrate the codes to your projrect. I consider that it will run successfully too.

0 Kudos

597 Views
BobJohnson
Contributor I

Thanks for the reply. I don't really care overly what the actual code inside the library supplied by CMX looks like as long as it works. There's some decent documentation on it, but nothing really on creating new files to be stored on a USB drive (as far as I can tell). So basically I am wondering if anyone has used this library to create new files, or if there is a different library (or sample code) which I can use to do this.

 

Thanks.

0 Kudos