You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I add NAND simulation under sim/nsh configuration, when 'nand' is executed, the ‘/dev/nand‘ device will be generated, but when using "mkfatfs /dev/nand" or "echo hello > /dev/nand", some errors will be generated and the program will be killed. I don't know how to use this device, actually I want to try to port the YAFFS2 filesystem based on this emulated NAND, and it has been successfully ported in bare metal, I need some help.
In addition, there are some problems with this NAND driver:
And in ftl.c, it crashes in between this area. 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!
I add NAND simulation under sim/nsh configuration, when 'nand' is executed, the ‘/dev/nand‘ device will be generated, but when using "mkfatfs /dev/nand" or "echo hello > /dev/nand", some errors will be generated and the program will be killed. I don't know how to use this device, actually I want to try to port the YAFFS2 filesystem based on this emulated NAND, and it has been successfully ported in bare metal, I need some help.
In addition, there are some problems with this NAND driver:
And this is my .config
config.txt
Error logs:
NuttShell (NSH) NuttX-12.5.1-RC0
MOTD: username=admin password=Administrator
nsh> nand
nand_ram: [LOWER | initialize]
Driver running!
nand_wrapper: [UPPER 1 | ioctl] Command: 1537, Arg : 139985771286160
nand_wrapper: [UPPER 1 | ioctl] Done
Page size: 512
nsh> echo hello > /dev/nand
nand_wrapper: [UPPER 2 | ioctl] Command: 1537, Arg : 139985771083416
nand_wrapper: [UPPER 2 | ioctl] Done
nand_wrapper: [UPPER 3 | isbad] Blocks: 0
nand_ram: [LOWER 1 | rawread] Page 0
nand_ram: [LOWER 1 | rawread] Done
nand_ram: [LOWER 2 | rawread] Page 1
nand_ram: [LOWER 2 | rawread] Done
*** stack smashing detected ***: terminated
已放弃 (核心已转储)
The text was updated successfully, but these errors were encountered: