6 years, 5 months ago.

How can I write a file to heap block device?

I'm using Heap Block Device with FAT File System in my design. I want to write a file to the block for one of the tests of the software. I open a file like I do in C and try to write a string in it using fprintf or fputs. But the execution doesn't go further than the fprintf/fputs statement. It works fine without the above statements. I'm stuck as I'm new to embedded systems. I really have to create the file to perform the test. Is there a way to implement this or do it in another way?

1 Answer

6 years, 5 months ago.

Hi,

Here is the reference docs for storage and how to use both the FAT file system and bock devices : https://os.mbed.com/docs/v5.6/reference/storage-overview.html

All the best,

-Austin