This is an old revision of the document!


MSP430 Flasher

The only way to fetch the source for this tool is to install a binary blob for AMD64.

Fetch

wget "https://dr-download.ti.com/software-development/software-programming-tool/MD-szn5bCveqt/1.03.20.00/MSPFlasher-1_03_20_00-linux-x64-installer.zip"
unzip MSPFlasher-1_03_20_00-linux-x64-installer.zip
chmod +x ./MSPFlasher-1.3.20-linux-x64-installer.run
./MSPFlasher-1.3.20-linux-x64-installer.run
cd "$HOME/ti/MSPFlasher_1.3.20/"
tar -zcvf mspflasher.tgz Source/

Dependencies

First install libmsp430.so.

Fetch

sudo -s
mkdir -p /opt/src/MSPFlasher
cd /opt/src/MSPFlasher
tar zxvf ~/mspflasher.tgz
cd Source
sed -i 's/-lmsp430/-lmsp430 -lpthread/' Makefile

Patch

 diff -u Support.cpp.orig Support.cpp
--- Support.cpp.orig    2023-11-09 19:17:11.714300113 +0000
+++ Support.cpp 2023-11-09 19:18:32.873483304 +0000
@@ -304,7 +304,7 @@
        }

     // get parameter
-    while ((cOpt = getopt(argc, ( char**)argv, g_cAllOpts, RTE)) != EOF )
+    while ((cOpt = getopt(argc, ( char**)argv, g_cAllOpts, RTE)) != (char)EOF )
     {
         // choose code for determined parameter
         switch (cOpt)
@@ -761,7 +761,7 @@
     }

     // get additional use case specific parameters
-    while ((cOpt = getopt(argc, ( char**)argv, g_cAllOpts, RTE)) != EOF )
+    while ((cOpt = getopt(argc, ( char**)argv, g_cAllOpts, RTE)) != (char)EOF )
     {
         for(i = 0; i < g_lCountOpt; i++)                        // for every element of struct of additional parameters
         {
diff -u StdUseCase.cpp.orig StdUseCase.cpp
--- StdUseCase.cpp.orig 2019-05-13 10:02:00.000000000 +0100
+++ StdUseCase.cpp      2023-11-09 19:20:18.204412719 +0000
@@ -388,6 +388,10 @@
         StdUseCase_Exit(EXIT_INITIALIZE, 0);
     }

+    // load device database
+    MSP430_LoadDeviceDb(NULL);
+    Print_N_Log(STD_MSG,"* Loaded device database.\n");
+
     // set interface speed
     if(sOpt->pcFETspeed != NULL)
     {

Build

make
cp ../MSP430Flasher /usr/local/bin/

Usage

When you run this with parameters it sits in a infinite loop reading the arguments, hence it's useless without the fixes found on the TI forum.

Whether the target works or not in Linux is also dependant upon the firmware version in the target which can be downgraded using an old libmsp430.so and then upgraded with a newer libmsp430.so with mspdebug.

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies