10 years, 3 months ago.

Is LocalFileSytem working on Nucleo L053R8 ?

Hi,

I cannot succeed building a code using LocalFileSystem on a Nucleo L053R8 ? Same code compiles on a original mbed platform. "mbed.h" is included, and "LocalFileSystem" is recognized by the helping popup system as well.

Is that not implemented yet ? Or is there another reason that prevent code to build ?

Error is : Error: Identifier "LocalFileSystem" is undefined in "main.cpp", Line: 6, Col: 2

Thanks. Matt

1 Answer

10 years, 3 months ago.

LocalFileSystem only works on the original couple of mbed devices, they had an extra flash chip that could be used for storage. This isn't very well documented and catches a lot of people out.

For other platforms you need to add something extra to get a file system, the simplest options are normally either to use an SD card or a serial flash/EEPROM part connected to a couple of the pins, libraries exist for either option. Or you could use a USB drive connected to the CPU USB host interface but that is probably a little more work.

Accepted Answer

I was actually confused by the board description saying : "Mass storage (USB Disk drive) for drag'n'drop programming" Thus I deducted that there should be some mass storage memory that I can use. Am I wrong ? Or the mass storage is emulated and the binary is actually directly written on the µC Flash memory ?

posted by Matthieu R. 13 Aug 2014

Exatly what happens depends on the platform used, I don't know yours well enough to give specifics.

On the original mbed the code was copied to an external flash device and then when next reset the new code was copied to the main CPU and run. The code being used and any old versions remained visible on the USB drive until you deleted them. The LocalFileSystem made use of the same flash storage, this had the down side that when the mbed had a file open the USB drive would vanish from the PC since only one device could access the flash at a time.

Some of the other mbed platforms program the new code immediately while others have just enough space to hold the new version (possibly in RAM rather then flash) until you hit reset at which point they reprogram the main CPU.

The description is correct but a little misleading, it has drag and drop programming, Mass storage is simply the name of the USB profile used, it doesn't require any user usable storage space.

posted by Andy A 13 Aug 2014