PackCli Tool

PackCli is the command-line version of MP Pack Tool, including versions that support Windows, Linux, and MacOS systems. This article provides an introduction to command formats and common functions. There are two ways to package using PackCli, which are described below.

  • Packaging via JSON File : Packaging via JSON File refers to using a JSON file to config packaging parameters including packaging format, file paths to be packaged, output paths, etc. PackCli will read these parameters and perform packaging according to the configuration.

  • Packaging All Files in the Specified Folder : Packaging All Files in the Specified Folder indicates that PackCli parses input commands to obtain packaging parameters including packaging format, input path, output path, etc. PackCli will reads all files in the specified directory, and performs packaging.

Packaging via JSON File

Packaging Command:

  • Windows: PackCli.exe [JSON file path] or PackCli.exe -j [JSON file path]

  • Linux/MacOS: ./PackCli [JSON file path] or ./PackCli -j [JSON file path]

The JSON file and description are shown as follows:

../../_images/Json_Sample.png

JSON File

Parameter Name

Description

Flash Map

flash map.ini path

Pack Mode

Packaging mode, refer to Pack Mode Introduction

IC Type

Chip name, such as 8762C, 8762D, 8762E, 8752H, 8762G, 8762G_VB, etc.

Output.Path

Package generation path

Output.Name

Package name, default is ImgPacketFile-MD5 if not filled

Files

Paths and default addresses of files to be packaged

Pack Mode Introduction

Name

Description

MP

Mass production package

MP Raw

Mass production package, generates two files: mass production package and raw data package.

OTA

Over-the-Air update package

OTA Raw

Over-the-Air update package, generates files as follows:

  • In single bank, two files are generated:

    • the file packaged in normal OTA mode

    • the OTA Raw Data file

  • In dual bank, four files are generated

    • the file packaged in normal OTA mode

    • Bank0 OTA Raw Data file

    • Bank1 OTA Raw Data file

    • Full Bank OTA Raw Data file.

OTA Compress

Over-the-Air update package, compresses files larger than OTA_TMP_SIZE configured in flash map.ini.

CFU

Component firmware update package, packaged by default according to version v1.

CFU V2

Component firmware update package, packaged according to version v2.

Note

The Pack Mode should be enclosed in double quotes.

Packaging with a JSON file is shown below:

../../_images/Pack_Sample_Json.png

Packaging with JSON File

Packaging All Files in the Specified Folder

Packaging Command:

  • Windows: PackCli.exe -n [IC Name] -m [pack mode] -s [source folder] -d [destination folder]

  • Linux/MacOS: ./PackCli -n [IC Name] -m [pack mode] -s [source folder] -d [destination folder]

Command Option Introduction

Option

Function

-n

Chip name, can be 8762C, 8762D, 8762E, 8752H, 8762G, 8762G_VB, etc.

-m

Packaging mode, refer to Pack Mode Introduction

-s

source folder, the folder to be packaged

-d

destination folder, the package will be generated under destination folderpack mode

Note

The source folder must contain flash map.ini, and all images with SIZE not equal to 0 as specified in flash map.ini should be included.

Packaging all files in the specified folder is shown below:

../../_images/Pack_Sample_Folder.png

Package All Files In the Specified Folder