4 years ago.

OS5 K64F and SDFileSystem gets online compiler errors

It's been a wile since SDFileSystem has worked with os5 and the K64F. Last working version of os5 I'm aware of is way back in 2440:0993ae5. Any plans on fixing it? Or perhaps there is a replacement for SDFileSystem?

os5 example here:



Kevin, how did you made the SDFilesystem work again? I have been work on it for a month but find no solution yet. Please help!

posted by Banchao Shu 03 Jan 2019

Hi Banchao,

I gave up on SDFileSystem a long time ago. I now use FATFileSystem together with SDBlockDevice. These are now embedded into mbed-os. The calls are a little different, but it’s works very well.


posted by Kevin Braun 04 Jan 2019

1 Answer

4 years ago.

Hi Kevin -

to use the filesystem with mbed OS 5 give this a try as the starting point. https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-fat-filesystem/ and make sure to see the readme about adding the sd backed driver. The example uses a RAM backed storage.

Here are the current docs for storage systems in general https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/storage/storage_index/

Accepted Answer

I am going down the CLI path for the first time. With program mbed-os-examply-blinky, I get build errors with the GCC_ARM compiler. It complains (many times) that there is multiple instances of "main".

Memory map breakdown for built projects (values in Bytes):
| name | target | toolchain | static_ram | stack | heap | total_ram | total_flash |

Build successes:

Build skips:

Build failures:
        Building project connectivity (K64F, GCC_ARM)
        Scan: GCC_ARM
        Scan: FEATURE_LWIP
        Scan: connectivity
        Compile [100.0%]: main.cpp
        Link: connectivity
        C:/Users/kevinb/mbed/mbed-os-example-blinky/BUILD/tests/K64F/GCC_ARM/main.o: In function `main':
        main.cpp:(.text.startup.main+0x0): multiple definition of `main'
        C:/Users/kevinb/mbed/mbed-os-example-blinky/BUILD/tests/K64F/GCC_ARM/./mbed-os/features/FEATURE_LWIP/TESTS/mbedmicro-net/connectivity/./main.o:main.cpp:(.text.startup.main+0x0): first defined here
        collect2.exe: error: ld returned 1 exit status

Update 24-Apr-2017:

I was able to get the FatFileSystem up over the weekend. Now searching how get the SD working again

Update 26-Apr-2017

SD up and running again

posted by Kevin Braun 21 Apr 2017