Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tools:mspflasher [2023/11/09 23:22]
darron [Usage]
tools:mspflasher [2023/11/10 13:49]
darron [Patch]
Line 21: Line 21:
 ===Build=== ===Build===
  
-Extract files and apply makefile fix.+Extract files.
  
 <code> <code>
Line 29: 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===
  
-This patch is required to stop the app entering an infinite loop.+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>
  
-Whether this patch is actually required was not tested. 
- 
-<code> 
-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> 
  
 ===Install=== ===Install===
Line 87: Line 49:
 cp ../MSP430Flasher /usr/local/bin/ cp ../MSP430Flasher /usr/local/bin/
 </code> </code>
-===Usage=== 
- 
-When you run this app unpatched with args it will enter an infinite loop, 
-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 upgraded via 
-libmsp430.so using mspdebug. 
  
 ===Resources=== ===Resources===
Line 100: 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]] 
 +*/