How to use NAND Flash device simulator
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
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:
1. Some debugging and logging must be enabled;
2. Compilation error under HOST_ARM64;
3. SPI NAND cannot be supported
And this is my .config
[config.txt](https://github.com/apache/nuttx/files/15290764/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
已放弃 (核心已转储)
Contributor guide
Assessment
This issue has not been assessed yet.