Other Parts Discussed in Thread: UNIFLASH
I'm adding custom OTA capability from a TFTP server. During the update process, I'm opening the file in flash but getting an error returned (-23) from sl_extlib_FlcWriteFile when I write.
I've created /sys/mcuimg2.bin and /sys/mcuimg3.bin in the file system via uniflash.
Here's the relevant code:
lRetVal = sl_extlib_FlcOpenFile ("\sys\mcuimgA.bin", 200000, 0, pFileHandle, FS_MODE_OPEN_WRITE); if(lRetVal!=0) { Report("Error opening file on flash: %i\r\n",lRetVal); } lRetVal = sl_extlib_FlcWriteFile (pFileHandle, 0, pbuffer, buf_size); if(lRetVal!=0) { Report("Error writing to file in flash: %i\r\n",lRetVal); } lRetVal = sl_extlib_FlcCloseFile (pFileHandle, 0, 0, 0); if(lRetVal!=0) { Report("Error closing file: %i\r\n",lRetVal); }
What is sl_extlib_FlcWriteFile return -23?
Any ideas what could be the problem?
Thanks,
Alex