Commands:
--  query-rte <id> [<param>]
        id = 0, ROM features, param is not required
        id = 4, Memory properties
            - param: 0 - ILM / 1 - DLM
                     0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR / 0x20000 - OTP
                     0x30000 - SDXC0 / 0x30001 - SDXC1
        id = 5, Supported command list
--  config-memory <memory_id> <config address>
        memory_id: 0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
                   0x30000 - SDXC0 / 0x30001 - SDXC1
--  write-memory <memory_id> <address/sector-index for eMMC> [[four-byte hexadecimal array]]/<file path>
           - memory_id: 0 - ILM / 1 - DLM
                        0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
                        0x20000 - OTP
                        0x30000 - SDXC0 / 0x30001 - SDXC1
--  read-memory <memory_id> <address/sector-index for eMMC> <byte length> [file path]
           - memory_id: 0 - ILM / 1 - DLM
                        0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
                        0x20000 - OTP
                        0x30000 - SDXC0 / 0x30001 - SDXC1
--  verify-checksum <memory_id> <address/sector-index for eMMC> [[four-byte hexadecimal array]]/<file path>
           - memory_id: 0 - ILM / 1 - DLM
                        0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
                        0x30000 - SDXC0 / 0x30001 - SDXC1                        
--  erase-region <memory_id> <address/sector-index for eMMC> <byte length>
           - memory_id: 0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
--  erase-chip <memory_id>
           - memory_id: 0x10000 - XPI0 NOR / 0x10001 - XPI1 NOR
--  load-image <image path>
--  load-blfw <soc_type> <isSigned>
           - soc_type: SoC Serial Name such as HPM6700/HPM6400, HPM6300, HPM6200, HPM5300, HPM6800
           - isSigned: 0 - unsigned / 1 - signed.
           - note: load-blfw is a wrapper for load-image boot loader firmware. So using these two commands at the same time could cause an error.
           - note: The device will be reset automatically if firmware loads success.
--  reset [<reset_type>], default reset_type is 0
        0 - Default reset / 1 - Hot reset / 2 - Cold reset;

--  create-image <path>
           - path: the configuration file of hpm_image_helper in the root directory such as imageutil.json.     
Examples: 
"Windows Platform: please replace ${hpm_manufacturing_cmd} with the path of  'hpm_manufacturing_cmd.exe'. For USB device, double quote is necessary in PowerShell while it is not in CMD"
"Linux Platform: please replace ${hpm_manufacturing_cmd} with 'sudo ./hpm_manufacturing_cmd', 'sudo' is required to connect usb and port device."

${hpm_manufacturing_cmd} -p COM11 -r "load-image boot_image.bin"  (Windows)
${hpm_manufacturing_cmd} -p /dev/ttyUSB0 -r "load-image boot-image.bin" (Linux/MacOSX)
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "load-image boot_image.bin"
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "query-rte 0"
${hpm_manufacturing_cmd} -u "\\?\HID#VID_34B7&PID_0001#6&289dd98c&2&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}" -r "query-rte 0"

If only one device is connecting, the device name parameters can be ignored:
${hpm_manufacturing_cmd} -p -r "load-image boot_image.bin"  (Windows)
${hpm_manufacturing_cmd} -u -r "query-rte 0"

Typical single FLASH programming sequences:
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "write-memory 0x0 0x200 [[0xfcf90001,0x05,0x0,0x0]]"
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "config-memory 0x10000 0x200"
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "write-memory 0x10000 0x80000400 flash_xip.bin"

Typical continuous FLASH programming sequences:
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "write-memory 0x0 0x200 [[0xfcf90001,0x05,0x0,0x0]]" -r "config-memory 0x10000 0x200" -r "write-memory 0x10000 0x80000400 flash_xip.bin"

Typical continuous FLASH programming and verify checksum sequences:
${hpm_manufacturing_cmd} -u "0x34b7,0x0001" -r "write-memory 0x0 0x200 [[0xfcf90001,0x05,0x0,0x0]]" -r "config-memory 0x10000 0x200" -r "write-memory 0x10000 0x80000400 flash_xip.bin" -r "verify-checksum 0x10000 0x80000400 flash_xip.bin"


Typical load bootloader firmware programming sequences:
${hpm_manufacturing_cmd} -p -r "load-blfw HPM6200 0"
${hpm_manufacturing_cmd} -p -f "HPM6200,0" -r "query-rte 0"

Typical image edit sequences:(imageUtil.json is an image configuration generated by hpm_image_helper)
${hpm_manufacturing_cmd} -i -r "create-image imageUtil.json"