Skip to content

BSL430.NET.Console App

Jakub Parez edited this page Sep 19, 2019 · 25 revisions

BSL430.NET.Console App

BSL430.NET.Console is simple .NET console app wrapping BSL430.NET main public methods. It was created because lack of support on Linux platform, WPF GUI app is Windows only, therefore console app was also needed, for making BSL430.NET available also for Linux developers and open-source world. For more details please read docs here at wiki BSL430.NET Library or BSL430.NET.FirmwareTools Library. With few commands (and params) all main public methods of the main and aux package are exposed. Upload, Download, Erase and FwTools commands, described in table below.

Note: This app uses unmanaged libraries for communication, so bitness matters.

Compatibility

BSL430.NET.Console is built using .NET Core 3. Each architecture (x86, amd64) has its own build for Framework Dependent deployment (standard build, correct unmanaged libraries need to be put in correct place) and for Self Contained deployment (.NET Core is packed with app - /p:PublishSingleFile=true and /p:PublishTrimmed=true flags are set for trimming not needed assemblies and packing into single executable). These optimizations makes both apps having similar size, which is interesting.

  • Framework
    • .NET Core 3.0
      • Framework Dependent
      • Self Contained
  • OS
    • Windows 7, 8, 8.1, 10
      • x86
      • amd64
    • Linux
      • amd64

Commands

Cmd Long Name Main Param Required Params Optional Params Description
-s scan [all/ftdi/libftdi/usb/serial] t, w, x
-u upload device name eg.: FTDI1 f, m, i b, p, x
-d download device name eg.: USB2 f, m, i, p, a, z b, x, o, y, x
-e erase device name eg.: COM3 f, m, i x
-c convert firmware file path f, o l, y
-n combine first firmware file path f, j, o l, y
-k compare first firmware file path j
-v validate firmware file path
-r get-password firmware file path m
-g force-ascii

Params

Param Long Name Type Description
-f --file string (path) Full or relative path to firmware file. (TI-TXT, Intel-HEX, SREC or ELF).
-j --second-file string (path) Full or relative path to another firmware file, usually for Combine or Compare. (TI-TXT, Intel-HEX, SREC or ELF).
-p --password hex string (16/20/32) BSL password is 16/20/32 bytes long. Enter 32 chars long hex string. For upload and erase this is optional.
-a --addrstart int (Download only) start download from 16bit address specified. eg. '0F00'
-z --datasize int (Download only) download specified amount of bytes in hex. eg. 'FFFF'
-b --baudrate enum (BaudRate) Sets baud rate. Default is 9600 bps (9600).
-i --invoke enum (InvokeMechanism) Sets invoke mechanism mode. Default is SHARED_JTAG (0).
-m --mcu enum (MCU) Sets MCU family. Default is MSP430_F5xx (4).
-l --fill-ff bool Optional. Force output fw monolithic structure as missing addr nodes are filled with 0xFF.
-x --xml string (path) Optional. XML Log output file. Can be only filename or absolute path.
-t --usb-ignore-ti-vid bool Optional. When scanning USB HID, ignore TI VID(0x2047) and get all USB HID devices present in system.
-w --ftdi-ignore-unknow bool Optional. When scanning FTDI, ignore UNKNOWN type devices, that are most likely already connected.
-o --output-format enum (FwFormat) Optional. Download or convert firmware format output mode: TI-TXT, Intel-HEX or SREC (TI-TXT is default. ELF is not supported yet as output).
-y --fw-line-length int Optional. Defines amount of data bytes present at final firmware text file at single row. When = 0, default values are set (TI-TXT = 16, Intel-HEX = 32, SREC = 32).

Examples

BSL430.NET

Scan Devices

Upload to MCU

Download from MCU

Erase MCU

BSL430.NET.FirmwareTools

Convert

Combine

Validate

Get BSL Password

Compare

Clone this wiki locally