This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529: C# wrapper for BSL430 DLL Problem

Part Number: MSP430F5529


Tool/software:

Hi,

As I want to write a C# GUI to release BSL programming, but when I want to use BSL430 DLL, problems occurred. I failed to use the functions whose input or output is structure.

The following code is about C# wrapper for BSL430 DLL:

The structure definition is like following: 

The error information is “System.Runtime.InteropServices.MarshalDirectiveException”: The type signature of a method is not compatible with PInvoke.

Is there any problem with my dll import process? How can I resole this problem?

Best Regards,

ZJY

  • I have not hear of BSL430 DLL, where do you download it? Normally, we usually used is BSL scripter 

    https://www.ti.com/lit/ug/slau655g/slau655g.pdf

    MSPBSL_Scripter 3_04_00_02 - TI.com 

    It is totally open source and write by C++ , you can install and look it.

  • Hi Gary,

    Sorry, I did not remember where did I download it. But the DLL is obtained with the following GUI. Do you have any idea about this tool? As the copyright is belonged to TI and the publisher information about this tool is TI.

  • Oh, I got it , but it seems this the GUI is write by python and open source not used with DLL. 

    The MSP430 USB Firmware Updater is an example application that may be used as-is or as a starting point for building your own firmware updater.  It is written in Python and consists of a graphical user interface and an existing command line interface called python-msp430-tools written by Chris Liechti.    Care has been taken to keep python-msp430-tools and the GUI independent.  As long as no drastic changes are made to the python-msp430-tools command line interface the GUI should work with updated python-msp430-tools.  This Firmware updater should work with all 5xx/6xx devices with a USB connection.

    I am not familar of the low level implementation of this tool you can refer to the read files in the source file to know how to use or modify it...\USB\MSP430USBDevelopersPackage_5_20_07_01\MSP430USBDevelopersPackage_5_20_06_03\Host_USB_Software\Python_Firmware_Upgrader\python-msp430-tools

**Attention** This is a public forum