Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 6 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
1 Answer
7 years, 6 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.
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 14 Jun 2017