8. CLI implementation

8.1. Introduction

SmartSnippets™ Toolbox also provides a command line implementation of its functionality. In order to run the command-line version of SmartSnippets™ Toolbox, the user has to open the command prompt, change folder to SmartSnippets™ Toolbox installation folder under SmartSnippetsStudio/Toolbox and execute one of the available commands listed below. The commands are slightly different depending on the chip family.

In what follows, by Executable we refer to the SmartSnippets™ Toolbox executable. On windows use the full path to the SmartSnippetsToolbox.exe (e.g. C:\DiaSemi\SmartSnippetsStudio<version>\Toolbox\SmartSnippetsToolbox.exe. On Linux use java -jar <path_to_SmartSnippetsToolbox.jar> . You may find a bundled java under SmartSnippetsStudio\jre folder

Options enclosed in square bracket are optional. For commands with type power COM port is mandatory and is used for data capturing. If also jtag serial number is specified, jtag interface will be used for firmware download. A special note on -firmware option. If no present, it is assumed that the appropriate firmware has been downloaded and running previously e.g. with booter command. If no firmware has been downloaded then use the -firmware option. This option will first download the firmware and then execute the command. Usually the firmware for all commands except power is uartboot.bin for DA1468x, DA1469x, DA1470x and DA1459x family devices or flash_programmer.bin (UART communication) and jtag_programmer.bin (JTAG communication) for the rest families.

8.2. Common CLI commands for all chip families

  1. Executable -help -chip chip_version

    Displays the available commands and examples.

  2. Executable -bundle commands_file

    Executes bundle of commands from input txt file. This would save time when executing multiple commands. For example the following bundle commands burn a bootable image on SPI for DA14531.
    Example:
    SmartSnippetsToolbox.exe -bundle input.txt
    Where the contents of input.txt are shown on Code 3
    Code 3 CLI bundle example. Burn a bootable image on DA14531 SPI
    -type booter -chip DA14531 -com_port 13 -file "C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin" -uart P0_5
    -type spi -chip DA14531 -com_port 13 -cmd erase -uart P0_5
    -type spi -chip DA14531 -com_port 13 -cmd write -file "C:\DA145xx_SDK\6.0.14.1114\projects\target_apps\peripheral_examples\blinky\Keil_5\out_DA14531\Objects\blinky_531.bin" -uart P0_5 -bootable
    

8.3. CLI for DA14580/581/583, DA14585/6 and DA1453x family chips

  1. Executable [-sdk sdk_path] -type booter -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-sys_ctrl_reg b1] [-gp_ctrl_reg b2] [-close] [-gpio pinId] [-uart TxId] -file filename [-y] [-nomessages messageFilter]

    Downloads file to the chip using UART Booter tool. If a CRC does not match shows up, please run the command again and then press the hardware reset button on the board to restart the download process.
    Example:
    SmartSnippetsToolbox.exe -type booter -chip DA14531 -com_port 13 -uart P0_5 -file "C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin"
    Note: Option “-uart P0_5” is used to define 1-wire communication over P0_5, P0_5.
  2. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_header -file filename [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP Header. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). In order to disable validations that stop the header writing process waiting for user confirmation, the following line should be added to the “<user home directory>\properties.txt” file: DISABLEVALIDATIONS = true.
    Example 1:
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -com_port 13 -uart P0_5 -cmd write_header -file 531_header.hex

    Example 2 (configuration script):
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -com_port 13 -uart P0_5 -cmd write_header -file 531_header_with_updated_conf_script.bin
    User can edit the configuration script from GUI OTP Header tab, export contents (button export) to “531_header_with_updated_conf_script.bin” and burn the updated header file with the above command.
  3. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_nvds -file filename [-offset ofst] [-y] [-nomessages messageFilter]

    Burns file to OTP NVDS. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). Not applicable for DA14585/6 and DA1453x

  4. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_custom_code -file filename [-offset ofst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP memory. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). On DA14583-01 chip asks for confirmation even with option ‘-y’
    Example 1
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -com_port 13 -uart P0_5 -cmd write_custom_code -file  files\code.bin -offset 0x200 -firmware C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin

    Example 2 (configuration script):
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -com_port 13 -uart P0_5 -cmd write_custom_code -file  files\configuration_script.bin -offset 0x7ED0 -firmware "C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin"
    Offset 0x7ED0 indicates the start of configuration script. configuration_script.bin contains the data of the configuration script (240 bytes for DA14531).
  5. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_header -file filename [-y] [-nomessages messageFilter]

    Reads OTP Header and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above).
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA14585-00 -com_port 43 -cmd read_header -file header_out.hex
  6. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_nvds -file filename [-offset ofst] [-y] [-nomessages messageFilter]

    Reads OTP NVDS and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). Not applicable for DA14585-00, DA14586-00 and DA1453x
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA14583-01 -com_port 45 -cmd read_nvds -file otp_out.hex
  7. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read_custom_code -file filename [-offset ofst] [-length byteLength] [-y] [-nomessages messageFilter]

    Reads OTP memory contents and writes its contents to a file. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). If length not specified it takes the value of OTP size.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -com_port 45 -cmd read_custom_code -uart P0_5 -file otp_out.hex -offset 0x10 -length 0x100
  8. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-nvds_address_offset nvdsAddrOfst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns dataInHex to OTP starting from address 0x40000 + ofst.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA14531 -jtag 480071025 -cmd  write_field  -data 12345678 -offset 0x100 -firmware "C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\jtag_programmer.bin"
  9. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-gpio pinId] [-uart TxId] [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd capture_data -duration durationInmSecs [-time_offset time_offset] [-calibration_offset offset] [-threshold threshold] [-zero_samples_for_sw_cursor samples] [-sw_cursor_tolerance tolerance] [-sw_cursors_to_stop cursors_to_stop] -data_file data_file -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures Current data measured by Power Profiler for Power Measurement Module v1 (PMM1) devices, writes them to a file and exports final statistics. This command applies only to devices with SPI interface.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA14531 -com_port 13 -uart P0_5 -cmd capture_data -duration 6000 -data_file data_file.csv -stat_file stat_file.csv -firmware "C:\DA145xx_SDK\6.0.14.1114\projects\target_apps\ble_examples\ble_app_barebone\Keil_5\out_DA14531\Objects\ble_app_barebone_531.hex"
  10. Executable [-sdk sdk_path] -type power -pmm2 -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd capture_data -duration durationInmSecs [-time_offset time_offset] [-threshold threshold] [-ch3_input in] [-ch4_input in] [-digital] [-hibernation_mode] [-low_pass_filter] -data_folder data_folder -stat_file stat_file [-ch1_calibration_offset ch1_offset] [-ch2_calibration_offset ch2_offset] [-y] [-nomessages messageFilter]

    Note: Only for DA14535-00 and DA14533-00 chips. Captures data from one or more inputs for Power Measurement Module v2 (PMM2) devices, writes them to csv files in the path specified by -data_folder and exports statistics.
    If none of -ch3_input, -ch4_input or -digital is specified, only the CH1/CH2 current is measured.
    This command applies only to devices with SPI interface. The default sample rate for PMM2 is 128k.
    Example:
    SmartSnippetsToolbox.exe -type power -pmm2 -com_port 20 -chip DA14535-00 -cmd capture_data -duration 1000 -ch3_input C_5x -ch4_input C_5x -digital -ch1_calibration_offset 0.0000175 -ch2_calibration_offset -0.0002622 -data_folder "C:\Users\user\data" -stat_file "C:\Users\user\stats.csv"
  11. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-gpio pinId] [-uart TxId] [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd export_stats -duration durationInSecs -sampling_interval sampling_interval [-calibration_offset offset] -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures statistics for a period of time and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above). This command applies only to devices with SPI interface.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA14531 -com_port 13 -uart P0_5 -cmd export_stats -duration 6 -stat_file stats.csv -sampling_interval 1
    Assumes that firmware has been already downloaded.
  12. Executable [-sdk sdk_path] -type power -pmm2 -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd export_stats -duration durationInSecs -sampling_interval sampling_interval -stat_file stat_file [-ch1_calibration_offset ch1_offset] [-ch2_calibration_offset ch2_offset] [-y] [-nomessages messageFilter]

    Note: Only for DA14535-00 and DA14533-00 chips. Captures statistics for a period of time for Power Measurement Module v2 (PMM2) devices and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above).
    Alternatively use the optional arguments -jtag and -firmware to download the firmware. The default sample rate for PMM2 is 128k. Statistics for CH1/CH2 only are captured.
    Example:
    SmartSnippetsToolbox.exe -type power -pmm2 -chip DA14535-00 -com_port 13 -cmd export_stats -duration 6 -ch1_calibration_offset 0.0000175 -ch2_calibration_offset -0.0002622 -sampling_interval 1 -stat_file stats.csv
  13. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber -cmd calibrate [-y] [-nomessages messageFilter]

    Calibrates the chip and outputs the offset value.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA14531 -com_port 3 -cmd calibrate
  14. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads SPI FLASH memory contents and writes them to a file.
    Example:
    SmartSnippetsToolbox.exe -type spi -chip DA14531-01 -jtag 480072295 -cmd read -file spi_out.bin
  15. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write -file filename [-offset ofst] [-max size] [-verify] [-bootable] [-y] [-nomessages messageFilter]

    Burns file to SPI FLASH memory.
    Example:
    SmartSnippetsToolbox.exe -type spi -chip DA14531 -com_port 13 -uart P0_5 -cmd write -offset 0x0100 -file files\prox_reporter.bin -max 0x400000 -firmware "C:\\DA145xx_SDK\\6.0.14.1114\\config\\toolbox_resources\\DA1453x\\common\\flash_programmer.bin"
  16. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd erase [-verify] [-offset ofst] [-max size] [-sectors num] [-end address] [-y] [-nomessages messageFilter]

    Erases all the SPI FLASH memory when -offset, -sectors and -end have not been specified. User can erase specific sectors by either using -sectors or -end. In the first case the specified number of sectors is erased. In the second case the sectors included between offset and end address are erased. If offset is specified without -end or -sectors, only the sector that includes the offset is erased. Sector size is 4KB.
    Example:
    SmartSnippetsToolbox.exe -type spi -chip DA14531-01 -jtag 480072295 -cmd erase -verify
  17. Executable [-sdk sdk_path] -type spi -chip chip_version [-clk clk] [-cs cs] [-miso miso] [-mosi mosi] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to SPI FLASH starting from address ofst.
    Example:
    SmartSnippetsToolbox.exe -type spi -chip DA14531 -com_port 13 -cmd write_field -offset 0x1000 -data 01234567890123456789 "C:\DA145xx_SDK\6.0.14.1114\config\toolbox_resources\DA1453x\common\flash_programmer.bin"
  18. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads EEPROM memory contents and writes them to a file.

  19. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write -file filename [-offset ofst] [-max size] [-verify] [-bootable] [-y] [-nomessages messageFilter]

    Burns file to EEPROM memory.

  20. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd erase [-bit_value val] [-verify] [-max size] [-y] [-nomessages messageFilter]

    Erases EEPROM memory by writing the bit value to every bit of memory. Default value is 0.

  21. Executable [-sdk sdk_path] -type eeprom -chip chip_version [-scl scl] [-sda sda] [-jtag jtag_serialNumber | -com_port portNumber] [-baudrate rate] [-gpio pinId] [-uart TxId] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to EEPROM starting from address ofst.

  22. Executable [-sdk sdk_path] -type suota -chip chip_version -initiator portNumber -receiver ble_addr -file img_file [-memtype memoryType] [-bank bank_num] [-i2c_addr addr] [-block_size b_size] [-scl scl] [-sda sda] [-miso miso] [-mosi mosi] [-cs cs] [-sck sck] [-y] [-nomessages messageFilter]

    SUOTA (Software Update Over the Air). Applicable only for DA14580-01.

  23. Executable [-sdk sdk_path] -type spota -chip chip_version -initiator portNumber -receiver ble_addr -file img_file [-memtype memoryType] [-base_addr addr ] [-i2c_addr addr] [-scl scl] [-sda sda] [-miso miso] [-mosi mosi] [-cs cs] [-sck sck] [-y] [-nomessages messageFilter]

    SPOTA (Software Patch Over the Air). Applicable only for DA14580-01.

  24. Executable [-sdk sdk_path] -type battery_life -chip chip_version -input input_file [-params params_file]

    Battery Lifetime Estimation. input_file contains the input values to be used for the calculations. Optionally, params_file can be used to override the default values per chip family that are used in the calculations.
    Example:
    SmartSnippetsToolbox.exe -type battery_life -chip DA14531 -input "C:\DiaSemi\SmartSnippetsStudio2.0.14\Toolbox\common_resources\SupportPackages\DA1453x\toolbox_resources\common\lifetimeEstimator_defaults_Boost.txt"

Table 6 provides a description for above options.

8.4. CLI for DA1468x, DA1469x, DA1470x and DA1459x family chips

Note

Communication with JTAG on Linux requires netstat utility for DA1468x, DA1469x, DA1470x and DA1459x family devices.

Before run java -jar <path_to_SmartSnippetsToolbox.jar> check that utility exists in PATH. If not, either install with system’s package manager e.g. sudo apt-get install net-tools or use the net-tools included on SmartSnippets Toolbox installation: export PATH=$PATH:<toolbox_installation_folder>/net-tools-1.60/bin

  1. Executable [-sdk sdk_path] -type booter -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] -file filename [-close] [-y] [-nomessages messageFilter]

    Downloads file to the chip using UART Booter tool.
    Example:
    SmartSnippetsToolbox.exe -type booter -chip DA1469x-00 -jtag 483060192 -file "C:\SDK_10.0.8.105\binaries\uartboot.bin"
  2. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_header -file filename [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP Header.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA1469x-00 -com_port 13 -cmd write_header -file 690_header.bin
    Note: No -firmware option present, presumes firmware already download before.
  3. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_custom_code -file filename [-offset ofst] [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns file to OTP memory.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA1469x-00 -com_port 13 -cmd  write_custom_code -file custom.bin -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
    Note: -firmware option instructs to download firmware before run the command.
  4. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_header -file filename [-y] [-nomessages messageFilter]

    Reads OTP Header and writes its contents to a file.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA1469x-00 -com_port 13 -cmd read_header -file 690_header.bin -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
  5. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_custom_code -file filename [-offset ofst] [-length byteLength] [-y] [-nomessages messageFilter]

    Reads OTP memory contents and writes its contents to a file. If length not specified it takes the value of OTP size.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA1469x-00 -com_port 13 -cmd  read_custom_code -file custom_code.hex -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
  6. Executable [-sdk sdk_path] -type otp -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-writeReadOnlyOTPHeaderFields] [-y] [-nomessages messageFilter]

    Burns dataInHex to OTP starting from address 0x7F80000 + ofst.
    Example:
    SmartSnippetsToolbox.exe -type otp -chip DA1469x-00 -jtag 483060192 -cmd write_field -data 0123456789ABCDEF -offset 0x108
  7. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd capture_data -duration durationInmSecs [-time_offset time_offset] [-threshold threshold] [-calibration_offset offset] [-zero_samples_for_sw_cursor samples] [-sw_cursor_tolerance tolerance] [-sw_cursors_to_stop cursors_to_stop] -data_file data_file -stat_file stat_file [-y] [-nomessages messageFilter]

    Captures Current data measured by Power Profiler for Power Measurement Module v1 (PMM1) devices, writes them to a file and exports final statistics. This command applies only to devices with SPI interface.
    The default sample rate for PMM1 is 105k.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA1469x-00 -com_port 13 -cmd capture_data -duration 1000 -calibration_offset -0.01724 -data_file data.csv -stat_file stat.csv
  8. Executable [-sdk sdk_path] -type power -pmm2 -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd capture_data -duration durationInmSecs [-time_offset time_offset] [-threshold threshold] [-ch3_input in] [-ch4_input in] [-digital] [-hibernation_mode] [-low_pass_filter] -data_folder data_folder -stat_file stat_file [-ch1_calibration_offset ch1_offset] [-ch2_calibration_offset ch2_offset] [-y] [-nomessages messageFilter]

    Captures data from one or more inputs for Power Measurement Module v2 (PMM2) devices, writes them to csv files in the path specified by -data_folder and exports statistics.
    If none of -ch3_input, -ch4_input or -digital is specified, only the CH1/CH2 current is measured.
    This command applies only to devices with SPI interface. The default sample rate for PMM2 is 128k.
    Example:
    SmartSnippetsToolbox.exe -type power -pmm2 -com_port 20 -chip DA14701 -cmd capture_data -duration 1000 -ch3_input VBUS_CC -ch4_input V30 -digital -ch1_calibration_offset 0.0000175 -ch2_calibration_offset -0.0002622 -data_folder "C:\Users\user\data" -stat_file "C:\Users\user\stats.csv"
  9. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd export_stats -duration durationInSecs -sampling_interval sampling_interval -stat_file stat_file [-calibration_offset offset] [-y] [-nomessages messageFilter]

    Captures statistics for a period of time for Power Measurement Module v1 (PMM1) devices and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above).
    Alternatively use the optional arguments -jtag and -firmware to download the firmware. The default sample rate for PMM1 is 105k.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA1469x-00 -com_port 13 -cmd export_stats -duration 6 -calibration_offset -0.01724 -sampling_interval 1 -stat_file stats.csv
  10. Executable [-sdk sdk_path] -type power -pmm2 -chip chip_version -com_port portNumber [-jtag jtag_serialNumber] [-firmware firmware_file] -cmd export_stats -duration durationInSecs -sampling_interval sampling_interval -stat_file stat_file [-ch1_calibration_offset ch1_offset] [-ch2_calibration_offset ch2_offset] [-y] [-nomessages messageFilter]

    Captures statistics for a period of time for Power Measurement Module v2 (PMM2) devices and exports to a file statistic samples every sampling interval. Makes the assumption that a valid firmware file has already been downloaded (e.g. through use of the booter command above).
    Alternatively use the optional arguments -jtag and -firmware to download the firmware. The default sample rate for PMM2 is 128k. Statistics for CH1/CH2 only are captured.
    Example:
    SmartSnippetsToolbox.exe -type power -pmm2 -chip DA14701 -com_port 13 -cmd export_stats -duration 6 -ch1_calibration_offset 0.0000175 -ch2_calibration_offset -0.0002622 -sampling_interval 1 -stat_file stats.csv
  11. Executable [-sdk sdk_path] -type power -chip chip_version -com_port portNumber -cmd calibrate [-y] [-nomessages messageFilter]

    Calibrates the chip and outputs the offset value for PMM1 or CH1 and CH2 offset values for PMM2.
    Example:
    SmartSnippetsToolbox.exe -type power -chip DA14701 -com_port 3 -cmd calibrate
  12. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read -file filename [-offset ofst] [-length byteLength] [-max size] [-y] [-nomessages messageFilter]

    Reads QSPI FLASH memory contents and writes them to a file. For DA1470x offset should contain the base address of flash memory to read (OQSPI, QSPIC, QSPIC2).
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd read -file qspi_data.bin -offset 0x0 -length 0x1000 -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
    SmartSnippetsToolbox.exe -type qspi -chip DA14706 -com_port 13 -cmd read -file qspi_data.bin -offset 0x18000000 -length 0x1000 -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
  13. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write [-mode cached] -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Burns file to QSPI FLASH memory. If -mode is specified, a header is added to make QSPI bootable. Option -mode is applicable for DA1468x only.
    For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x).
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd write -file "C:\SDK_10.0.8.105\projects\dk_apps\demos\pxp_reporter\DA1469x-00-Release_QSPI\pxp_reporter.bin" -offset 0x0 -firmware "C:\SDK_10.0.8.105\binaries\uartboot.bin"
  14. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd erase [-offset ofst] [-sectors num] [-max size] [-verify] [-y] [-nomessages messageFilter]

    Erases all the QSPI FLASH memory or part of it. Sector size is 4KB. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -jtag 483060192 -cmd erase -sectors 85
  15. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_field [-offset ofst] -data dataInHex [-max size] [-y] [-nomessages messageFilter]

    Burns dataInHex to QSPI FLASH starting from address ofst. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd write_field -offset 0x0010 -data 01234567890123456789
  16. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_nv -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Burns nv params file to QSPI at offset. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x). -offset is mandatory for DA1459x to specify NVPARAMS start address.
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd write_nv -file nv_data.hex -offset 0x80000
  17. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_nv -file filename [-offset ofst] [-max size] [-y] [-nomessages messageFilter]

    Reads nv params from QSPI and writes its contents to a file. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x). -offset is mandatory for DA1459x to specify NVPARAMS start address.
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd read_nv -file nv_params.bin
  18. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_part_table -file filename [-y] [-nomessages messageFilter]

    Reads Partition table from QSPI memory and saves it to a file. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd read_part_table -file part.txt
  19. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd read_partition -index partition_index [-offset ofst] [-length byteLength] -file filename [-y] [-nomessages messageFilter]

    Reads partition specified by the index of partition table and saves it to a file. Offset, if specified, should be relative to the partition start address. Length, if specified, can be used to read byteLength bytes instead of the whole partition.
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd read_partition -index 6 -offset 0x200 -length 0x100 -file partition_data.bin
    Note: index refers to partition index. For example if partition table is as shown on Code 4 index=6 refers to NVMS_BIN_PART
    To see the partition table run read_part_table command . For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)
    Code 4 CLI partition index example.
    Name                            Start Address   Sector Count    Type
    NVMS_PRODUCT_HEADER_PART        0x00000000      2               19
    NVMS_FIRMWARE_PART              0x00002000      126             1
    NVMS_GENERIC_PART               0x000E0000      32              5
    NVMS_PLATFORM_PARAMS_PART       0x00100000      255             15
    NVMS_PARAM_PART                 0x001FF000      1               2
    NVMS_LOG_PART                   0x00200000      256             4
    NVMS_BIN_PART                   0x00300000      255             3
    NVMS_PARTITION_TABLE            0x003FF000      1               16
    
  20. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd write_partition -index partition_index [-verify] [-offset ofst] -file filename [-y] [-nomessages messageFilter]

    Writes file to the partition specified by the index of partition table. Offset, if specified, should be relative to the partition start address. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)
    Example:
    SmartSnippetsToolbox.exe -type qspi -chip DA1469x-00 -com_port 13 -cmd write_partition -file file.bin -index 6
  21. Executable [-sdk sdk_path] -type qspi -chip chip_version [-jtag jtag_serialNumber | -com_port portNumber] [-firmware firmware_file] -cmd erase_partition -index partition_index [-verify] [-y] [-nomessages messageFilter]

    Erases the contents of the partition specified by the index of partition table. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)

  22. Executable [-sdk sdk_path] -chip chip_version -make_image -in_file inputFile [-out_file outputImg] [-priv_key priv_key | -generate_priv_key] [-pub_key_index pub_key_index] [-sym_key sym_key | -generate_sym_key] [-sym_key_index sym_key_index] [-nonce nonce_hex] [-rev rev_cmd]

    Prepares DA1469x family image. If any of the security related options is used (-priv_key, -generate_priv_key, -pub_key_index, -sym_key, -generate_sym_key, -sym_key_index, -nonce) a secure image will be created. The keys and nonce will be generated by default if the respective options are missing. If -rev option is also used, a secure image with device administration section will be created.
    Image produced is the same as the image when user press the “Prepare image” button in “Prepare QSPI Image” window.
    Example:
    SmartSnippetsToolbox.exe -chip DA1469x-00 -make_image -in_file files\prox_reporter.bin -out_file files\prox_reporter.out.bin  -generate_priv_key -generate_sym_key
  23. Executable [-sdk sdk_path] -chip chip_version -make_image -in_file inputFile -fw_version fw_version [-out_file outputImg] [-priv_key priv_key | -generate_priv_key] [-pub_key_index pub_key_index] [-sym_key sym_key | -generate_sym_key] [-sym_key_index sym_key_index] [-min_fw_version min_fw_version] [-nonce nonce_hex] [-rev rev_cmd]

    Prepares DA1470x family image. If any of the security related options is used (-priv_key, -generate_priv_key, -pub_key_index, -sym_key, -generate_sym_key, -sym_key_index, -nonce) a secure image will be created. The keys and nonce will be generated by default if the respective options are missing. If -rev option is also used, a secure image with device administration section will be created. If -min_fw_version is provided, the minimum firmware version will be set in device administration section. The image firmware version, set with -fw_version, should be greater or equal than the minimum firmware version in that case.
    Image produced is the same as the image when user press the “Prepare image” button in “Prepare QSPI Image” window.
    Example:
    SmartSnippetsToolbox.exe -chip DA14706 -make_image -in_file files\prox_reporter.bin -fw_version 2 -out_file files\prox_reporter.out.bin  -generate_priv_key -generate_sym_key -min_fw_version 1 -rev "1 2 s1 d2"

Table 6 provides a description for above options.

8.5. CLI options table

Table 6 CLI option description

Option

Description

-chip chip_version

The version of the chip. Acceptable values are DA14580-01, DA14581-00, DA14583-01, DA14585-00, DA14586-00, DA14530, DA14531, DA14680-01, DA14681-01, DA14682-00, DA14683-00, DA1469x-00, DA14701, DA14705, DA14706, DA14708. Available values differ depending on the selected SDK.

-bundle commands_file

File that contains the bundle of commands to execute.

-sdk sdk_path

Path to an SDK. Only devices and resources from the specified SDK are used. If the configuration xml of the SDK is invalid, the bundled support package matching the SDK’s family is used. When option is omitted, the bundled support package for the specified family is used.

-type cli_type

Specifies the memory or tool to be used. Available options are:

  • booter - Download an application to the chip RAM,

  • spi - Access SPI memory

  • eeprom - Access EEPROM

  • otp - Access OTP memory

  • qspi - Access QSPI memory

  • power - Power profile tool

  • suota - SUOTA tool

  • spota - SPOTA tool

  • battery_life - Battery Lifetime Estimator

-jtag jtag_serialNumber

Use the jtag interface for communication with the chip. This option is mutually exclusive with the -com_port option.

-com_port portNumber

Windows: an integer number indicating the UART COM Port. For example -com_port 3 for port COM3. Linux: the port as String, For example -com_port /dev/ttyS0

-sys_ctrl_reg b1

Used only on JTAG communication. Byte value to write at System Control Register, e.g. A4 or 0xA4. Default values per family are:

  • DA14580/581/583: 0xA4

  • DA14585/6: 0xA6

  • DA1453x: 0x02

-gp_ctrl_reg b2

Used only on JTAG communication. Byte value to write at General Purpose Control Register, e.g. E2 or 0xe2. Default value are 0x2E for DA14580/581/583. Not applicable for DA14585/6 and DA1453x

-close

Close J-Link GDB Server after firmware download.

-gpio pinId

Only for DA14580/581/583. The GPIO pin which controls the transistor enabling high voltage. Format: Pi_j, where P is character ‘P’, i is an integer between 0 and 3 and j is an integer between 0 and 7. E.g.: P1_2. Default value is P1_2

-uart TxId

Only for COM port communication. The Tx part of the UART port Tx-Rx Pair connecting FTDI chip with the Bluetooth chip.

Available values per family are:

  • DA14580/581/583: P0_0, P0_2, P0_4, P0_6

  • DA14585/6: P0_0, P0_2, P0_4, P0_6

  • DA1453x: P0_0, P0_3, P0_5

  • Available values differ depending on the selected SDK.

  • Default values per family are:

  • DA14580/581/583: P0_4

  • DA14585/6: P0_4

  • DA1453x: P0_0

-file filename

Input or output filename. For write commands it is an input bin or hex file, containing the data to be burned to the chip. For read commands it is an output text, hex or bin file, where data should be stored.

-y

Accept default values. Do not ask user.

-nomessages messageFilter

Disables a message category. messageFilter is a string combined of ‘1’ and ‘0’. The message categories are INFO, WARNING, ERROR, ACTION and ARGUMENT_PARSING. 00111 disables INFO and WARNING messages. 00111 is equal to 00, since by default all message categories are enabled.

-baudrate rate

Specifies the data transfer rate through UART in bps. Available baudrates are: 57600, 9600, 115200. Default baudrates per family are:

  • DA14580/581/583: 57600

  • DA14585/6: 57600

  • DA1453x: 115200

-firmware firmware_file

Firmware file that should be download to the chip before executing the command. Common values for DA14580/581/583, DA14585/6 and DA1453x is flash_programmer.bin or jtag_programmer.bin, depending on communication interface. Common values for DA1468x, DA1469x, DA1470x and DA1459x family chips is uartboot.bin. Except the power measurement commands (-type power) where a custom firmware should be loaded.

-cmd command

Available commands and types are:

  • read_custom_code- Read OTP. Use with -type otp

  • read_header - Read OTP Header. Use with -type otp

  • read_nvds - Read NVDS. Use with -type otp

  • write_custom_code - Write OTP. Use with -type otp

  • write_header - Write OTP header. Use with -type otp

  • write_nvds - Write NVDS. Use with -type otp

  • write_field - Write Address. Use with -type otp or spi or eeprom or qspi

  • capture_data - Power Profiler tool. Use with -type power

  • export_stats - Power Profiler tool. Use with -type power

  • calibrate - Power Profiler tool. Use with -type power

  • read - Read memory. Use with -type spi or eeprom or qspi

  • write - Write memory. Use with -type spi or eeprom or qspi

  • erase - Erase memory. Use with -type spi or eeprom or qspi

  • write_nv - Write NVPARAMS block. Use with -type qspi

  • read_nv - Read NVPARAMS block. Use with -type qspi

  • read_part_table - Read partition table. Use with -type qspi

  • read_partition - Read specific partition. Use with -type qspi

  • write_partition - Write specific partition. Use with -type qspi

  • erase_partition - Erase specific partition. Use with -type qspi

-writeReadOnlyOTPHeaderFields

This applies to DA14585/6, DA1469x, DA1468x, DA1470x and DA1459x family devices OTP Header and OTP NVDS for addresses denoted as Read Only (icon yellow-mark-header). By default RO addresses are replaced with empty value and only the rest of the space is written. When this option is present these addresses can be written, if not already written

-offset ofst

The offset in memory, from which read or write operation should start. If ‘ofst’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. Default value is 0x0. For DA1470x and DA1459x offset should contain the base address of flash memory (OQSPI/QSPIC/QSPIC2 for DA1470x and eFlash/QSPI for DA1459x)

-length byteLength

The length in bytes to read from OTP, SPI, QSPI, QSPI partition or EEPROM memory. If not set by the user default values are:

  • Read from OTP: OTP size

  • Read from SPI/EEPROM/QSPI: 0x8000

  • QSPI Partition (used with -cmd read_partition): Partition size

-data dataInHex

Data in hex with no spaces to write in OTP, SPI Flash, EEPROM or QSPI E.g. 011234DE.

-nvds_address_offset nvdsAddrOfs

The starting offset of NVDS inside OTP memory, with respect to 0x40000. If ‘nvdsAddrOfst’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. If -nvds_address_offset option has been specified, write_field command will write the input data at OTP NVDS.

-duration durationInmSecs

Duration of data capturing (integer number of milliseconds). Used in ‘capture_data’ Power Profiler command.

-duration durationInSecs

Duration of data capturing (integer number of seconds). Used in ‘export_stats’ Power Profiler command.

-time_offset time_offset

Pre-trigger sampling period (double number of milliseconds). Optional, default 0

-calibration_offset offset

Offset for current of PMM1, obtained after running calibration command (-cmd calibrate). Default value for DA1468x, DA1469x and DA1470x family chips is -0.01724. Default value for DA14580/581/583, DA14585/6 and DA1453x family chips is 0.

-threshold threshold

Threshold for considering active (in mA). If set, measured values are collected, exported and aggregated as statistics only if their value is >= threshold.

-zero_samples_for_sw_cursor samples

Integer value representing the number of zero samples that mark a SW cursor. Applies to PMM1 devices only.

-sw_cursor_tolerance tolerance

Decimal value (in uA) representing the upper threshold under which samples are considered to be equal to zero. Related to S/W cursors. Applies to PMM1 devices only.

-sw_cursors_to_stop cursors_to_stop

Integer value representing the number of SW cursors to trigger a stop event for data capturing. Applies to PMM1 devices only.

-data_file data_filename

Filename of .csv file with collected measurements. Applies to PMM1 only.

-data_folder data_folder

Path to folder where .csv files with collected measurements will be saved. Applies to PMM2 devices only.

-stat_file stat_filename

Filename of .csv file with collected statistics (e.g. peak current, avg current, charge)

-sampling_interval interval

An integer number > 0 indicating the number of seconds between the statistic samples

-pmm2

Used in capture_data and export_stats commands to specify that we are catpuring data and calculating statistics for PMM2 devices.

-ch3_input in

Enables data capturing for CH3 of PMM2 devices and specifies ADC CH3 input.

Default values per family are:

  • DA1470x: VBUS_CC, V14, VSYS, V30, V18P, V18, V12, VBAT_CC.
    First 2 inputs result in Current measurements while the rest in Voltage.
  • DA14535-00, DA14533-00: C_5x, RESET, VLOW, VF, C_3x.
    First input result in Current measurements while the rest in Voltage.
  • DA1459x: C_5x, C_3x, VDDIO, Vdcdc, VDD.
    First input result in Current measurements while the rest in Voltage.

-ch4_input in

Enables data capturing for CH4 of PMM2 devices and specifies ADC CH4 input.

Default values per family are:

  • DA1470x: VBUS_CC, V14, VSYS, V30, V18F, VBATn, V12, AIN
  • DA14535-00, DA14533-00: C_5x, RESET, V_FL, V3x, AIN
  • DA1459x: C_5x, VDDIO, RSTn, V3x, AIN

First input results in Current measurements while the rest in Voltage.

-digital

Enables data capturing for digital signals of PMM2 devices.

-hibernation_mode

Enables the hibernation mode for Ch1/Ch2: only CH1 (low) current is measured.

-low_pass_filter

Applies a low pass filter when hibernation mode has been activated.

-ch1_calibration_offset ch1_offset

Offset for CH1 current of PMM2, obtained after running calibration command (-cmd calibrate). A default value of 0.0000189 mA is used if this argument is missing.

-ch2_calibration_offset ch2_offset

Offset for current of PMM1, obtained after running calibration command (-cmd calibrate). A default value of -0.0005 is used if this argument is missing.

-clk clk

Specifies the CLK pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

Default values are:

  • DA14580/581/583: P2_0 for DA14583-01, P0_0 other

  • DA14585/6: P2_0 for DA14586-00, P0_0 for DA14585-00

  • DA1453x: P0_4

-cs cs

Specifies the CS pin configuration for SPI Flash memory. Available values:[P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

Default values are:

  • DA14580/581/583: P2_3 for DA14583-01, P0_3 other

  • DA14585/6: P2_3 for DA14586-00, P0_3 for DA14585-00

  • DA1453x: P0_1

-miso miso

Specifies the MISO pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

Default values are:

  • DA14580/581/583: P2_4 for DA14583-01, P0_5 other

  • DA14585/6: P2_4 for DA14586-00, P0_5 for DA14585-00

  • DA1453x: P0_3

-mosi mosi:

Specifies the MOSI pin configuration for SPI Flash memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

Default values are:

  • DA14580/581/583: P2_9 for DA14583-01, P0_6 other

  • DA14585/6: P2_9 for DA14586-00, P0_6 for DA14585-00

  • DA1453x: P0_0

-max size

Specifies the size of SPI, EEPROM or QSPI memory. If ‘size’ starts with 0x, it will be parsed as hex number, otherwise as decimal. Default values are 0x200000 for DA1468x, 0x2000000 for DA1469x, 0x20000 for DA14580/581/583 and 0x40000 for DA14585/6 and 0x8000000 for DA1470x.

-verify

If enabled, SPI Flash or EEPROM memory contents will be verified, after write or erase action. Also verify QSPI contents after erase and partition contents after write and erase.

-bootable

If specified, appropriate header is added to image file in order to make SPI Flash or EEPROM memory bootable. By default image is not bootable.

-sectors num

Specifies the number of sectors to be erased from SPI/QSPI Flash memory. If ‘num’ starts with ‘0x’ it is parsed as hex, otherwise as decimal. Sector size is 4KB. This option is mutually exclusive with the -end option. Default value is 1.

-end address

Specifies where the region to be erased ends.The sector containing end address is the last sector to be erased.

-scl scl

Specifies the SCL pin configuration for I2C EEPROM memory.

Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

Default values are:

  • DA14580/581/583: P0_2

  • DA14585/6: P0_2

  • DA1453x: P0_3

-sda sda

Specifies the SDA pin configuration for I2C EEPROM memory. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7]

  • Default values are:

  • DA14580/581/583: P0_3

  • DA14585/6: P0_3

  • DA1453x: P0_4

-bit_value val

Value to write to every bit of EEPROM memory during erase. Acceptable values are 0 or 0x00 and 1 or 0x01.

-initiator portNumber

The COM port number, in decimal, where the suota/spota initiator is connected. E.g. -initiator 28

-receiver ble_addr

The Bluetooth address of the SUOTA/SPOTA receiver. E.g. -receiver 78:56:34:12:CD:AB

-memtype memoryType

Acceptable values: I2C (or i2c), SPI (or spi) for SUOTA. For SPOTA two extra values are accepted: SYSRAM (or sysram) and RETRAM (or retram). Default value is SPI

-bank bank_num

Specifies where and which image file will be loaded. It accepts only 3 values: 0, 1 or 2. Default value is 0

-i2c_addr addr

Specifies the I2C device address used on SPOTA and SUOTA tools. Default value is 0x50

-block_size b_size

Specifies the size of each block that will be transmitted, in bytes. Cannot be less than 20. Default value is 240

-sck sck

Specifies the SCK pin configuration for SPI Flash memory in SUOTA/SPOTA. Available values: [P0_0:P0_7], [P1_0:P1_3], [P2_0:P2_9], [P3_0:P3_7] Default value: DA14580/581: P0_0. Not available for other families.

-base_addr addr

Specifies the base memory address used in SPOTA tool. Default value is 0x0

-input input_file

Text file containing input values to be used in the battery lifetime calculations. Each input value is related with a specific id. A sample input file can be found at Appendix.

-params params_file

Text file containing values for parameters that are used in the battery lifetime calculations. Each parameter value is related with a specific id. If omitted, parameters are initialized with default values. A sample parameters’ file can be found at Appendix.

-mode cached

Adds a suitable header to the file before burn in order to make qspi bootable in cached mode. By default no header added. This option is applicable for DA1468x only.

-index partition_index

Index of a specific partition in partition table. Starts from 0.

-make_image

Generates DA1469x, DA1470x and DA1459x family device image from input file.

-in_file inputFile

Input file for the image creation with make_image cmd. Hex and bin files are accepted.

-out_file outputImg

File where the image created with make_image cmd will be saved. Bin file is expected. If omitted a new file with the _image.bin suffix is created in the same folder as the input file.

-priv_key

Private key which will be used in Ed25519 to create the image signature. It must have 32 bytes in length. The key is expected in hex format, e.g. -priv_key 8E05FA7509F4D3B8F96B08DEFAA204A9BCEFF67AD28306B6D4A2DBAB3C238DCA

-generate_priv_key

Instead of providing the private key with the -priv_key option, the key can be automatically generated. Its length will be 32 bytes.

-pub_key_index

Index of the key which should be used for signature validation. A number in decimal or hex format (starting with 0x) is expected. If omitted index=0 is assumed.

-sym_key

Symmetric key which will be used in executable encryption (AES CTR mode). It must have 32 bytes in length. The key is expected in hex format, e.g. -sym_key 7CAE0D855049BF06FCBCE2F274CAB39EAFF53AF9F818F171311EBD764FE95ACB.

-generate_sym_key

Instead of providing the symmetric key with the -sym_key option, the key can be automatically generated. Its length will be 32 bytes.

-sym_key_index

Index of the key which should be used for executable decryption by bootloader. A number in decimal or hex format (starting with 0x) is expected. If omitted index = 0 is assumed.

-nonce

String in hex format with length of 8 bytes which will be used as ‘NONCE’ in AES CTR encryption of the executable. If omitted a random nonce will be generated.

-rev

Decryption keys revocation command: Contains type and indices of the keys in AES CTR encryption of the executable which should be revoked. If more than one key is passed, parameter should be given in quotation marks. If index is preceded with ‘s’ then it concerns user data symmetric key. If index is preceded with ‘d’ then it concerns executable decryption symmetric key. Index without prefix concerns public key. Examples: -rev “1 2 s1 d2”, -rev d1

-min_fw_version

Integer number indicating the minimum firmware version that can be accepted in an image. Applies to DA1470x family only.

-fw_version

Integer number indicating the image firmware version. Applies to DA1470x family only.