Hi,
I have added a file in flash from Uniflash and when trying to open it sl_FsOpen crashes. I couldn't find the documentation related to sl_FsOpen and tried to follow prototype in fs.h
void main() { long ret; unsigned long token=0; long fh; BoardInit(); ret = sl_FsOpen("/tmp/app.bin", FS_MODE_OPEN_READ, &token, &fh); }
GDB Logs
Breakpoint 1, main () at ../main.c:161 161 unsigned long token=0; (gdb) n 164 BoardInit(); (gdb) 166 ret = sl_FsOpen("/tmp/app.bin", FS_MODE_OPEN_READ, &token, &fh); (gdb) cc3200.cpu -- clearing lockup after double fault Program received signal SIGINT, Interrupt. 0x200081b8 in memcpy () (gdb) bt #0 0x200081b8 in memcpy () #1 0x20007852 in prvCopyDataFromQueue (pxQueue=0x90fd, pvBuffer=0x0) at ../../third_party/FreeRTOS/source/queue.c:1347 #2 0x20007614 in xQueueGenericReceive (xQueue=0x90fd, pvBuffer=0x0, xTicksToWait=4294967295, xJustPeeking=0) at ../../third_party/FreeRTOS/source/queue.c:1042 #3 0x2000734a in osi_LockObjLock (pLockObj=0x4, Timeout=4294967295) at ../osi_freertos.c:352 #4 0x200045f8 in _SlDrvCmdOp (pCmdCtrl=0x20008380 <_SlFsOpenCmdCtrl>, pTxRxDescBuff=0x20009454 <pui32Stack+4036>, pCmdExt=0x20009444 <pui32Stack+4020>) at ../source/driver.c:201 #5 0x200045aa in sl_FsOpen (pFileName=0x20008370 "/tmp/app.bin", AccessModeAndMaxSize=0, pToken=0x20009470 <pui32Stack+4064>, pFileHandle=0x2000946c <pui32Stack+4060>) at ../source/fs.c:122 #6 0x20004498 in main () at ../main.c:166 (gdb)
Uniflash Logs for /tmp/app.bin
[14:28:09] INFO: connection succeeded [14:28:09] INFO: getting storage list [14:28:09] INFO: > Executing Operation: Init [14:28:09] INFO: reading version info [14:28:09] INFO: DEVICE CC3200 ES1.32 [14:28:09] INFO: reading version info [14:28:11] INFO: reading version info [14:28:13] INFO: > Executing Operation: Program [14:28:13] INFO: > File name: /sys/mcuimg.bin, Update: false, Erase: false [14:28:13] INFO: > File name: /cert/ca.pem, Update: false, Erase: false [14:28:13] INFO: > File name: /cert/client.pem, Update: false, Erase: false [14:28:13] INFO: > File name: /cert/private.key, Update: false, Erase: false [14:28:13] INFO: > File name: /tmp/pac.bin, Update: false, Erase: false [14:28:13] INFO: > File name: /sys/macadd.bin, Update: false, Erase: false [14:28:13] INFO: > File name: /tmp/app.bin, Update: true, Erase: false [14:28:13] INFO: > Size of file = 54384 [14:28:13] INFO: > Update File: /tmp/app.bin [14:28:13] INFO: Downloading file "/tmp/app.bin" with size 54384 [14:28:15] INFO: New Token is 0x0 [14:28:15] INFO: Download complete [14:28:15] INFO: Verifying Data... [14:28:15] INFO: get file [14:28:16] INFO: Done. Reading 54384 bytes [14:28:16] INFO: Verification OK [14:28:17] INFO: > Updated Token value: 0x0 [14:28:17] INFO: > Executing Operation: Disconnect [14:28:17] Operation Program returned.