11 years, 7 months ago.

LocalFileSystem: mbed USB drive not disappearing

I'm trying to write to the LocalFileSystem on the LPC1768. The mbed USB drive does not disappear and no new file appears on it. The file does not appear even after hitting the reset button. But when I disconnect and reconnect the USB cable, the file shows up.

1) Is this a bug or a new feature?

2) If it is a feature, is there a way to change this?

3) If it is a bug, then any suggestions on how to fix it?

I am assuming this isn't a hardware thing. This is my second LPC1768 which I got recently and updated to the latest firmware a couple of hours ago. I have been successfully writing files on my other LPC1768 which I got in January. That one works as expected; the mbed USB drive disappears, and reappears with the new file when file handles are closed. I have not updated the firmware on that unit ever since I received it. My OS is Windows 7 Professional Service Pack 1. I'm using the example program below:

Import program

00001 #include "mbed.h"
00002  
00003 LocalFileSystem local("local");               // Create the local filesystem under the name "local"
00004  
00005 int main() {
00006     FILE *fp = fopen("/local/out.txt", "w");  // Open "out.txt" on the local file system for writing
00007     fprintf(fp, "Hello World!");
00008     fclose(fp);
00009 }

3 Answers

11 years, 5 months ago.

Having the same problem. Any updates on your situation?

Thaaat shoulda been a comment. My bad.

posted by Daniel Millard 30 May 2013

Sorry about the late response. No, I did not get a response or find a solution. Still using the old mbed for now, keeping the new one as backup. Were you able to figure something out?

Thanks

posted by Maverick Student 02 Jul 2013
11 years, 1 month ago.

try to press reset button on mbed and hold it down. Then try to access you mbed-Drive. I had the problem, that mbed drive appears, but there was no access, like as drive is not formatted. After pressing reset, drive was ready to be accessed from host pc. Then i deleted my last program. It was accessing the local file system too often.

10 years, 11 months ago.

Hello all, I have the same issue here. Tried with your program with latest firmware (rev 141212) and got the same result: device does not dissapear and file is not present. Any update?

  • Edit: If I "Eject" the device in Windows Explorer (Windows 7 Enterprise 64-bit SP1), and reset, the program works. I suspect on the Kaspersky Antivirus application.
  • Edit2: I see the same behavior in Linux, Windows and OSX: only writes when not mounted.

I *downgraded* to Firmware Rev 21164 (http://mbed.org/media/downloads/firmware/mbedMicrocontroller_21164.if) and it works fine now.

posted by Sebastián Pastor 11 Dec 2013