Using the User Applications you can access the drivers, file systems and
peripherals available on the board. This chapter describes the following user
applications.
5.1 Flash and JFFS2 Application
To access Flash and JFFS2 application, include its driver and file system as
described in the section Flash Memory (MTD) Driver and JFFS2 File System
Configuration.
5.1.1 Flash Tools
Select Customize Application/Library Settings>Flash tools. Select the options
as shown below.
Build the kernel as explained in the section Development Target.
5.1.2 Accessing Flash and JFFS2 Applications
To access the Flash and JFFS2 in your application use the required commands as
described in the table below:
Table below lists Flash and JFFS2 commands along with the description.
Command Description
cat /proc/mtd Displays flash partitions.
cat /proc/mounts Displays already mounted files.
ls -l /dev/mtd* Lists mtdblocks and other details.
unlock /dev/mtdx
Unlocks all the sectors of mtd device. e.g.:
unlock /dev/mtd0, this will unlock all sectors
in mtd device0.
Flash Tools --->
--- MTD utils
[*] mtd-utils
[*] erase
[*] eraseall
[*] unlock
[*] lock
[
*
]
mkfs.
j
ff2
System Level Solutions 26