Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:mspflasher [2023/11/09 19:47] – [Usage] darrontools:mspflasher [2023/11/10 13:50] (current) – [Build] darron
Line 19: Line 19:
 First install [[https://wiki.kewl.org/dokuwiki/tools:mspds|libmsp430.so]]. First install [[https://wiki.kewl.org/dokuwiki/tools:mspds|libmsp430.so]].
  
-===Fetch===+===Extract=== 
 + 
 +Extract files.
  
 <code> <code>
Line 27: Line 29:
 tar zxvf ~/mspflasher.tgz tar zxvf ~/mspflasher.tgz
 cd Source cd Source
-sed -i 's/-lmsp430/-lmsp430 -lpthread/' Makefile 
 </code> </code>
  
 ===Patch=== ===Patch===
 +
 +Apply fixes.
  
 <code> <code>
- diff -u Support.cpp.orig Support.cpp +sed -i 's/char  cOpt;/int cOpt;/' Support.cpp 
---- Support.cpp.orig    2023-11-09 19:17:11.714300113 +0000 +sed -i 's/-lmsp430/-lmsp430 -lpthread/' Makefile
-+++ 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 +
-         {+
 </code> </code>
  
  
-<code> +===Install===
-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) +
-     { +
-</code>+
  
-===Build===+Make the binary and install it.
  
 <code> <code>
Line 80: Line 49:
 cp ../MSP430Flasher /usr/local/bin/ cp ../MSP430Flasher /usr/local/bin/
 </code> </code>
-===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=== ===Resources===
Line 95: Line 54:
 [[https://www.ti.com/lit/ug/slau654e/slau654e.pdf|User guide]] [[https://www.ti.com/lit/ug/slau654e/slau654e.pdf|User guide]]
  
- +/* 
-[[https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/836999/msp430flasher-compiled-to-run-on-arm-architecture?tisearch=e2e-sitesearch&keymatch=MSP430-FLASHER|Patch notes]]+[[https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/836999/msp430flasher-compiled-to-run-on-arm-architecture?tisearch=e2e-sitesearch&keymatch=MSP430-FLASHER|TI Forum]] 
 +*/