Hello all,
I’m trying to make some device with SD card, I2C LCD to work as SPI slave.
Found some SD card write example, tested it about 5 days ago, it worked fine, modified a little bit to append text file, all was OK.
Today the same project from online compiler does not work. My board (LPC1768) blinks some os fault, terminal show “Could not open file for write”.
Code:
#include “mbed.h”
#include “SDFileSystem.h”
int main() {
printf("Hello World!\n");
int i;
mkdir("/sd/log", 0777);
FILE *fp = fopen("/sd/log/log.txt", "a");
if(fp == NULL) {
error("Could not open file for write\n");
}
fprintf(fp," Begin\r\n");
for(i=0;i<100;i++)
{
fprintf(fp,"%d\r\n",i);
wait (0.1);
}
fprintf(fp," End\r\n");
fclose(fp);
printf("Goodbye World!\n");
DigitalOut myled(LED3);
while(1) {
// ThisThread::sleep_for(500);
wait(0.3);
myled = !myled;
}
}
BTW now bin file created is only 18KB size vs 40KB 5 days ago. As I understand there is something wrong due to not existing mbed-os folder (library) in the project. 5 days ago there was no problem.
When I’m try to add library I getting fault “internal server error 500…” and after this “library already exist”.
Library appearing and program does not compiling anymore. Error: No member named ‘fsize’ in ‘FIL’ in “SDFileSystem/FATFileSystem/FATFileHandle.cpp”, Line: 65, Col: 25
There is something changed in mbed-os today, after release of new version?
With I2C LCD there was really similar problems past 6 days, every day new “thing”.
Mbed Studio also not work for me, it does not download project to board, just blink download LED and nothing.
So where to begin?
Romas