Welcome to use the BurnToolCmd command line tool!
The main functions of this tool are: burn and write the image onto the Flash, erase the Flash, and read the data from the board and write the file.

1. Description About the Function of Burning Images
The procedures are as follows:
(1) Configure burn.config in the config folder before burning images (# in this configuration file indicates the comments). The configuration items include:
chipName               Chip name, such as suqin
filePath               Partition table file path, supported file format: .bin\.fwpkg\.xml
xmlPathDefault         Indicates whether the image path is the path where the XML file is stored.
comport                Number of the serial port
mode                   Tranmission mode

(3) Enter the directory where burntoolcli is located at the command line.
(4) Enter the (burntoolcli --burn) command to burn images according to the partitioning file.The JRE used by the Linux OS is recommended.
              BurnToolCmd --burn（linux） 
              BurnToolCmd.exe --burn（windows）
   If you do not want to configure the config file, run the following command to burn the file:
                      <chipName>         <mode>       <serial port>  -speed  [speed]  -stopBit  [stop bits] -parity  [parity]    <serverIp>       <ipaddr>       <netMask>    <gatewayIp>    -tftpPort [tftpPort]  <debugBoard> -frequency  [frequency]   -address [address]      <filePath>         [programmer]            -re [reboot] -c [burnCheck]
BurnToolCmd --burn  -n WUDANGSTICK  -m   serial         COM0                  115200                1                   0                                                                                                                                                            -f  filePath       -p  programmerPath   -re     0    -c    0
mode:
serial
speed: Baud rate options are：1200、2400、4800、9600、19200、38400、57600、115200、230400、460800、921600
stop bit: Stop bit options are：0(1 stop bit)、1(1.5 stop bit)、2(2 stop bit)
parity: Parity check options are：0(no parity)、1(Odd parity)、(even parity)
debugBoard: Hispark-Trace(0)、 Hispark-Link(1)
reboot: Indicates whether to restart the system after the programming is complete. The options are as follows: 0 (not restart) 1 (restart)
burnCheck：Indicates whether to check the readback after programming. The options are as follows: 0 (no check) and 1 (check).

Note: If you need to specify the partition table xmlPath path, add -f filePath, such as BurnToolCmd --burn -f filePath, File format support: .xml/.bin/.fwpkg
(1) The following information is displayed: SerialPort has been connected. Please power off, then power on the device. If it doesn't work, please try to power on again. Then manually power on the tool and start burning.


2.Erasing Function Description
BurnToolCmd --erase     <chipName>      <mode>     <port>  -speed   [speed]  -stopBit  [stop bits] -parity  [parity]   -debugBoard <debugBoard>  -frequency [frequency]  -address [address]  -f  <filePath>          [programmer]       [configPath]           -e [eraseSize]
BurnToolCmd --erase  -n WUDANGSTICK  -m serial      COM0             115200                 1                  0                                                                                       -f   filePath     -p   programmerPath  -c   configPath  -e    1000

3.Read file function description
BurnToolCmd --read     <chipName>      <mode>     <port>  -speed   [speed]  -stopBit  [stop bits] -parity  [parity]   -debugBoard <debugBoard>  -frequency [frequency]  -address [address]  -f  <filePath>          [programmer]       [configPath]            -r [readSize]
BurnToolCmd --read  -n WUDANGSTICK  -m serial      COM0             115200                 1                  0                                                                                       -f   filePath     -p   programmerPath  -c   configPath   -r   1000

[setting]
eraseBeforeBurn        Whether to perform the erase operation before burning. The default value is false.
resetBeforeBurn        Whether to perform soft reset before programming, the default is false.
openDebug              Whether to enable debug printing, the default is false.

4.ws63 chip burn、erase command description：
Common parameters：
-n                     chipName: ws63
-m                     mode: serial COM10
--baudRate             serial baudRate：115200

Example of Burning Commands：
-f                     burn file
BurnToolCmd.exe --burn -n ws63 -m serial COM10 --baudRate 115200  -f E:/ws63-liteos-app_all.fwpkg

Example of Eraseing Commands：
-l                     loader file
BurnToolCmd.exe --erase -n ws63 -m serial COM10 --baudRate 115200  -l E:/ws63-liteos-app_all.fwpkg

Example of upload Commands
-l                     loader file
-f                     upload file
BurnToolCmd.exe --read -n ws63 -m serial COM10 -a 0x200000 -r 0x780  -l E:/ws63-liteos-app_all.fwpkg  -f upload.bin


