resyfer commented on issue #12331:
URL: https://github.com/apache/nuttx/issues/12331#issuecomment-2114104800

   Hi @acassis, the execution weirdly stops in-between execution it seems. I am 
not too knowledgeable about the memory limits in the simulator.
   
   For me the stack trace for mkfatfs on `/dev/nand` sort of went like this:
   
[mkfatfs.c:mkfatfs():L326](https://github.com/apache/nuttx-apps/blob/bc68ce993b1ec385cb7d8f11b5e8fca96d53f3be/fsutils/mkfatfs/mkfatfs.c#L326)
   
[fs_open.c:open():L453](https://github.com/apache/nuttx/blob/master/fs/vfs/fs_open.c#L453)
   
[fs_open.c:nx_vopen():L300](https://github.com/apache/nuttx/blob/master/fs/vfs/fs_open.c#L300)
   
[fs_open.c:file_vopen():L199](https://github.com/apache/nuttx/blob/master/fs/vfs/fs_open.c#L199)
   
[fs_blockproxy.c:block_proxy():L167](https://github.com/apache/nuttx/blob/master/fs/driver/fs_blockproxy.c#L167)
   
[bchdev_register.c:bchdev_register():L61](https://github.com/apache/nuttx/blob/master/drivers/bch/bchdev_register.c#L61)
   
[bchlib_setup.c:bchlib_setup():L75](https://github.com/apache/nuttx/blob/master/drivers/bch/bchlib_setup.c#L75)
   
[fs_openblockdriver.c:open_blockdriver():L86](https://github.com/apache/nuttx/blob/master/fs/driver/fs_openblockdriver.c#L86)
   
[fs_mtdproxy.c:mtd_proxy():L164](https://github.com/apache/nuttx/blob/master/fs/driver/fs_mtdproxy.c#L164)
   
   
   And in ftl.c, it crashes in between [this 
area](https://github.com/apache/nuttx/blob/master/drivers/mtd/ftl.c#L839-L864). 
My config:
   
   - Disabled:
     - `CONFIG_FTL_READAHEAD`
     - `CONFIG_FTL_WRITEBUFFER`
   
   Thus `FTL_HAVE_RWBUFFER` is also disabled. So the entire area has nothing to 
crash on, and I think, like @acassis  said, it might be due to a memory limit. 
I am not sure what can prevent this, and I need help on this.
   
   Both `mkfatfs` and `echo` commands provided by @laoniaokkk stop at this 
point.
   
   `nand` (the device simulator) relies heavily on memory. Currently, the 
entire memory is allocated in an entire contiguous chunk, which _might_ be a 
cause. Of course this can be changed to be more lazy in nature.
   
   The sim device is still experimental so a lot of features are missing or 
might not work in certain circumstances. It has been tested mostly by using 
littlefs. Thank you for pointing this out!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to