Hi, I adopted FlashFS to use my NANDFlash (9F2G08U0A). finit() and fformat ("F:") are working fine and the flash gets erased. But if I call fopen, to create files, I get linker error:
.\at91sam9260-sdram\at91sam9260-sdram.axf: Error: L6915E: Library reports error: __use_no_semihosting_swi was requested, but _sys_open was referenced
I got a retarget.c which implements _sys_open and many other _sys-functions:
FILEHANDLE _sys_open (const char *name, int openmode) { /* Register standard Input Output devices. */ if (strcmp(name, "STDIN") == 0) { return (STDIN); } if (strcmp(name, "STDOUT") == 0) { return (STDOUT); } if (strcmp(name, "STDERR") == 0) { return (STDERR); } return (__fopen (name, openmode)); }
How can I compile my code without errors?
Another possibility is: to adapt FlashFS to support USB FLASH Memories (fs: FAT16/32), but you need an USB Host port in your MCU (i.e. LPC2388). I've done it and works at pretty good speeds: ~400KBytes/sec (write).