parezj / BSL430.NET

TI MSP430 Bootloader (BSL) .NET Cross-Platform Toolchain & Firmware Tools. The cheapest way to flash MSP430, with FTDI/Serial/UART converters. Intel-HEX, TI-TXT, ELF and SREC firmware format support, can also convert, combine, hex-edit..
MIT License
42 stars 10 forks source link
bootloader bsl bsl430 com csharp elf firmware flash ft232 ftdi intel-hex mcu memory msp430 serial srec texas-instruments ti-txt toolchain uart
BSL430.NET

BSL430.NET - The cheapest way to flash MSP430

Github tag (BSL430.NET) NuGet version (BSL430.NET) fuget version (BSL430.NET) License: MIT

DOWNLOAD HERE - TI MSP430 Bootloader (BSL) .NET Cross-Platform Toolchain

Release OS Architecture Framework Last Stable
BSL430.NET WinNT, Linux x86, amd64 net461, netstandard2.0 v1.3.4
BSL430.NET.FirmwareTools any any net40, net45, net461, netstandard2.0 v1.3.4
BSL430.NET.Console WinNT, Linux x86, amd64 netcoreapp3.0 v1.3.2
BSL430.NET.WPF (GUI) WinNT x86, amd64 net461, (netcoreapp3.0) v1.3.2, Store


  1. Wiki
  2. Main Features
  3. GUI App (Windows)
  4. Console App (Windows, Linux)
  5. Wiring diagrams
  6. Library
  7. References
  8. Firmware Tools

1. Main Features

2. GUI App (Windows)

Wiki docs - First start quick go-through for ease of use

3. Console App (Windows, Linux)

Wiki docs - Tutorials how to use console app

4. Wiring Diagrams

FTDI / libftdi

FTDI

Serial (COM)

Serial

USB

USB

5. BSL430.NET Library

Wiki docs - Documentation and code samples for easy start and copy & paste

public interface IBsl430Net
{
    ScanAllResult ScanAllEx(ScanOptions ScanOpt);
    ScanResult<Bsl430NetDevice> ScanAll(ScanOptions ScanOpt);
    ScanResult<Tdev> Scan<Tdev>(ScanOptions ScanOpt) where Tdev : Bsl430NetDevice;

    StatusEx Erase(Bsl430NetDevice Device);
    StatusEx Erase(string DeviceName);

    StatusEx Upload(string FirmwarePath, Bsl430NetDevice Device, byte[] Password);
    StatusEx Upload(string FirmwarePath, string DeviceName, byte[] Password);

    StatusEx Download(byte[] Password, int AddrStart, int DataSize, out List<byte> Data, Bsl430NetDevice Device);
    StatusEx Download(byte[] Password, int AddrStart, int DataSize, out List<byte> Data, string DeviceName);

    Status SetBaudRate(BaudRate BaudRate);
    Status SetInvokeMechanism(InvokeMechanism InvokeMechanism);
    Status SetMCU(MCU Mcu);

    BaudRate GetBaudRate();
    InvokeMechanism GetInvokeMechanism();
    MCU GetMCU();
    Mode GetMode();
}


6. References

I would like to say thank you to each of these developers (or companies), because this project use all of them in some kind of way and without them, there will be no BSL430.NET:

BSL430.NET.FirmwareTools
BSL430.NET.FirmwareTools - FW manipulation made easy

Github tag (BSL430.NET) NuGet version (BSL430.NET.FirmwareTools) fuget version (BSL430.NET.FirmwareTools) License: MIT

DOWNLOAD HERE - Firmware Tools as BSL430.NET sub package

  1. Main Features
  2. GUI & Console App
  3. Library

7. Main Features

BSL430.NET.FirmwareTools is Cross-Platform library created as a part of BSL430.NET and then, after growing a little bit, made standalone sub package. First motivation to create Firmware Tools was when I needed to unify parsing methods which precede Erase, Download and Upload blocks in BSL430.NET. Intel-HEX and TI-TXT was supported from the begining, SREC and ELF was added a while after. Today this library offers basic firmare manipulation with few, but powerful, static methods.


8. GUI & Console App

Wiki docs - BSL430.NET GUI App docs and tutorials

Note: BSL430.NET and Firmware Tools are integrated into single GUI and Console Apps!

9. FirmwareTools Library

Wiki docs - Ready to use code samples and tutorials

public static Firmware Parse(string FirmwarePath, FwFormat Format, bool FillFF,StringWriter Log);

public static string Create(Firmware Firmware, FwFormat Format, int LineLength);
public static string Create(IEnumerable<byte> Data, int AddrStart, FwFormat Format, int LineLength);
public static string Create(ICollection<FwNode> Data, FwFormat Format, int LineLength);

public static (string Fw, FwFormat Format) Convert(string FirmwarePath, FwFormat Format, bool FillFF, int LineLength);
public static (string Fw, FwFormat Format1, FwFormat Format2) Combine(string FirmwarePath1, string FirmwarePath2, FwFormat Format, bool FillFF, int LineLength);

public static BslPasswords GetPassword(string FirmwarePath);
public static FwInfo Validate(string FirmwarePath, StringWriter Log);

public static (bool Equal, double Match, int BytesDiff) Compare(string FirmwarePath1, string FirmwarePath2);
public static (bool Equal, double Match, int BytesDiff) Compare(Firmware Firmware1, Firmware Firmware2);
Note: Author is not responsible for any kind of damage, that could arise 
      from wrong use or misuse of this library or apps!