Difference between revisions of "Creating an eMMC image using Storage Image Creator"

From SEGGER Wiki
Jump to: navigation, search
Line 10: Line 10:
   
 
[[File:SIC_InitialFolder.png|thumb|center|upright=2.0|alt=Screenshot of the work folder containing the Storage Image Creator executable.|Initial work folder contents]]
 
[[File:SIC_InitialFolder.png|thumb|center|upright=2.0|alt=Screenshot of the work folder containing the Storage Image Creator executable.|Initial work folder contents]]
  +
  +
Next, we create the file and directory structure that has to be present on the eMMC device mounted on the target hardware. For this purpose we create a folder called "RootDir" that contains all the files and directories that will be present in the root directory of the FAT file system stored on the eMMC device. The root directory contains a folder named "SubDir" and a file named "File1.txt". The "SubDir" folder contains a file named "File2.txt".

Revision as of 16:56, 22 November 2023

The Storage Image Creator is a command line utility that can be used to build a single file containing a complete FAT file system including directory structure and files ready to be stored and used without preparation apart from mounting the file system.

The utility operates by executing text commands that perform different operations related to the data stored on the image file such as formatting the storage and copying of files from the file system of the host PC to the file system stored in the image file. The utility can execute the commands either interactively by typing them in the same way as in a command line (interactive mode) or by reading them from a text file (batch mode). A description of all the supported commands can be found in the emFile user manual.

The interactive mode is entered if the utility is started without arguments. The utility enters batch mode if it is started with the file containing the commands to be executed as argument.

The following example shows how to create a FAT file system image for an eMMC device with the capacity of about 8 GB that contains two files an one directory. The example uses the interactive mode for the creation of the file system image. However, the same file system image can be created by saving the commands in a separate text file and by executing them in the batch mode.

We start by creating a folder on the host PC that will serve as work area. For convenience, we make a copy of the Storage Image Creator utility to this folder. This is possible because the Storage Image Creator is a standalone application that does not require any installation and that depends only on the standard system libraries.

Screenshot of the work folder containing the Storage Image Creator executable.
Initial work folder contents

Next, we create the file and directory structure that has to be present on the eMMC device mounted on the target hardware. For this purpose we create a folder called "RootDir" that contains all the files and directories that will be present in the root directory of the FAT file system stored on the eMMC device. The root directory contains a folder named "SubDir" and a file named "File1.txt". The "SubDir" folder contains a file named "File2.txt".