NAND Flash test tool set

Source: Internet
Author: User

<1> download MTD-utils (v1.4.1)

Http://git.infradead.org/mtd-utils.git

Git clone git: // git.infradead.org/mtd-utils.git

<2> compile
Mtd_debug:
Arm-None-Linux-gnueabi-gcc-static mtd_debug.c-O mtd_debug-I./include

Nanddump:
Arm-None-Linux-gnueabi-gcc-C lib/libmtd. C-I./include
Arm-None-Linux-gnueabi-gcc-C lib/libmtd_legacy.c-I./include
Arm-None-Linux-gnueabi-gcc-static nanddump. c libmtd. O libmtd_legacy.o-O nanddump-I./include

<3> How to Use mtd_debug
# Cat/proc/MTD
Dev: Size erasesize name
Mtd0: 000c0000 00020000 "bootloader"
Mtd1: 00040000 00020000 "Misc"
Mtd2: 01080000 00020000 "recovery"
Mtd3: 00600000 00020000 "kernel"
Mtd4: 06000000 00020000 "system"
Mtd5: 03c000000 00020000 "cache"
Mtd6: 031c00000 00020000 "userdata"
Mtd7: 00060000 00020000 "NVM"

A). Read some information from MTD layer.
#./Mtd_debug info/dev/MTD/mtd0
MTD. type = mtd_nandflash
MTD. Flags = mtd_cap_rom
MTD. size = 786432 (768 K)
MTD. erasesize = 131072 (128 K)
MTD. writesize = 2048 (2 k)
MTD. oobsize = 64
Regions = 0

B). Erase the NAND Flash partitions.
#./Mtd_debug Erase/dev/MTD/mtd7 0 0x00060000
Erased 393216 bytes from address 0x00000000 in Flash

<4> How to Use the nanddump
#./Nanddump
Usage: nanddump [Options] MTD-Device
Dumps the contents of a nand mtd partition.

-- Help display this help and exit
-- Version output version information and exit
-F file -- file = file dump to file
-I -- ignoreerrors ignore errors
-L length -- length = length Length
-N -- noecc read without error correction
-O -- omitoob omit OOB data
-B -- omitbad omit Bad blocks from the dump
-P -- prettyprint print nice (hexdump)
-S ADDR -- startaddress = ADDR start address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.