3 years, 5 months ago.

fopen doesn't work with stm32f429I-DISC1

Hi everyone, I will try to write everything in English I am french sorry if I make any mistake.

so I need your help I tried to make a directory with the example given in the cookbook, it wasn't working because apparently we can't use simply mkdir we need to add sd.mkdir after that it worked perfectly for the directory.

now I am just trying to create a simple file on the SD but it's not working I am using that line:

fp = fopen("/sdtest.txt", "w"); this line doesn't work thats all I know...

is it wrong ? what sould I do because I tried everything and it doesn't seem to work /media/uploads/BilalQasmi/prog.jpg

1 Answer

3 years, 5 months ago.

Could you try an mbed-os example for this - https://github.com/armmbed/mbed-os-example-fat-filesystem? There are instructions at the bottom for switching from RAM block device to SD card.

sorry I don't understand what to do, could you pls explain more ?

posted by QASMI Bilal 14 Jun 2017

Please use the code in the linked example and let me know if it works. There are instructions here - https://github.com/armmbed/mbed-os-example-fat-filesystem#switch-from-ram-backed-block-device-to-an-sd-card for using an SD card instead of a RAM block device. We know that this code works, so it would be useful to know if you can successfully compile and run this code before we debug yours.

posted by Sarah Marsh 14 Jun 2017