5 years, 6 months ago.

Clearing flash memory after writing data to local file system

I'm using an LPC1768 to take data from several sensors, including a 9-axis accelerometer and GPS. For now, I've been saving the data in text files in the local file system of the Mbed. During testing, I've run into the issue on two separate mbeds that flash memory appears to fill up over time, even if I clear the .trash file and overwrite the data text files.

Is there something I'm missing about the local file system? Does deleting a file in the local file system just move it to the trash and not actually free up the memory?

Which OS are you using? Or do you mean deleting the file by the mbed itself? Manually deleting a file on a USB drive from a Windows PC permanently deletes it. Mac OS for example makes indeed a thrash folder afaik.

posted by Erik - 09 Nov 2015

I'm using Linux. I delete the text files on the mbed while it is connected to my computer via usb. I have a function in my code that overwrites the files on the mbed when commanded to, which I would think would free up the memory on the device.

posted by Jack Nelson 09 Nov 2015

Then I think your issue is that Linux might just as OSX move them to a thrash folder instead of deleting it. Overwriting the file by your mbed won't help, since that file is gone (and moved).

posted by Erik - 09 Nov 2015
Be the first to answer this question.