OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [doc/] [html/] [software_development_tools.html] - Rev 64

Go to most recent revision | Compare with Previous | Blame | View Log

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>openMSP430 Software Development Tools</title>
</head>
<body>
<h3>Table of content</h3>
<ul>
	<li><a href="#1. Introduction">                        1. Introduction</a></li>
	<li><a href="#2. openmsp430-loader">                   2. openmsp430-loader</a></li>
	<li><a href="#3. openmsp430-minidebug">                3. openmsp430-minidebug</a></li>
	<li><a href="#4. openmsp430-gdbproxy">                 4. openmsp430-gdbproxy</a></li>
	<li><a href="#5. MSPGCC Toolchain">                    5. MSPGCC Toolchain</a>
	<ul>
  	   <li><a href="#5.1 Some notes regarding msp430-gdb"> 5.1 Some notes regarding msp430-gdb</a></li>
  	   <li><a href="#5.2 CPU selection for msp430-gcc">    5.2 CPU selection for msp430-gcc</a></li>
	</ul>
   </li>	
</ul>
 
<a name="1. Introduction"></a>
<h1>1. Introduction</h1>
 
Building on the serial debug interface capabilities provided by the openMSP430, three small utility programs are provided:
<ul>
	<li><b>openmsp430-loader:</b> a simple command line boot loader.</li>
	<li><b>openmsp430-minidebug:</b> a minimalistic debugger with simple GUI.</li>
	<li><b>openmsp430-gdbproxy:</b> GDB Proxy server to be used together with MSP430-GDB and the Eclipse, DDD, or Insight graphical front-ends.</li>
</ul> 
 
All these software development tools have been developed in TCL/TK and were successfully tested on both Linux and Windows XP.
<br /><br />
<b>Note:</b> in order to be able to directly execute the scripts, <a href="http://www.tcl.tk/software/tcltk/">TCL/TK</a> needs to be installed on your system. Optionally for Windows users, the scripts have been turned into single-file binary executable programs using <a href="http://freewrap.sourceforge.net/">freeWrap</a>.
 
 
<a name="2. openmsp430-loader"></a>
<h1>2. openmsp430-loader</h1>
 
This simple program allows the user to load the openMSP430 program memory with an executable file (ELF format) provided as argument.<br />
It is typically used in conjunction with '<b><i>make</i></b>' in order to automatically load the program after the compile step (see '<b><i>Makefile</i></b>' from software examples provided with the project's FPGA implementation).<br />
The program can be called with the following syntax:
<br /><br />
<table border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="35"></td>
<td bgcolor="#d0d0d0" width="3"></td>
<td width="15"></td>
<td>
	<code>openmsp430-loader.tcl [-device &#60;communication device&#62;] [-baudrate &#60;communication speed&#62;] &#60;elf-file&#62;
<br /><br />
Examples: openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate  9600  leds.elf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;openmsp430-loader.tcl -device COM2:        -baudrate 38400  ta_uart.elf
   </code>
</td>
</tr>
</table>
<br />
These screenshots show the script in action under Linux and Windows:
<br /><br />
<img src="getimg.php?1248897300" width="75%" alt="openmsp430-loader Linux" title="openmsp430-loader Linux" />
<br /><br />
<img src="getimg.php?1249244501" width="75%" alt="openmsp430-loader Windows" title="openmsp430-loader Windows" />
<br />
<a name="3. openmsp430-minidebug"></a>
<h1>3. openmsp430-minidebug</h1>
This small program provides a minimalistic graphical interface enabling simple interaction with the openMSP430:
<br /><br />
<img src="getimg.php?1248897416" width="65%" alt="openmsp430-minidebug" title="openmsp430-minidebug" />
<br /><br />
As you can see from the screenshot, it allows the following actions:
<ul>
	<li><b><font  color="#FF0000">(1)</font></b>&nbsp;&nbsp;Load the program memory with an ELF file</li>
	<li><b><font  color="#FF0000">(2)</font></b>&nbsp;&nbsp;Reset the CPU</li>
	<li><b><font  color="#FF0000">(3)</font></b>&nbsp;&nbsp;Stop/Start the program execution</li>
	<li><b><font  color="#FF0000">(4)</font></b>&nbsp;&nbsp;Read/Write access of the CPU registers</li>
	<li><b><font  color="#FF0000">(5)</font></b>&nbsp;&nbsp;Read/Write access of the whole memory range (program, data, peripherals)</li>
</ul>
 
<a name="4. openmsp430-gdbproxy"></a>
<h1>4. openmsp430-gdbproxy</h1>
The purpose of this program is to replace the '<b><i>msp430-gdbproxy</i></b>' utility provided by the mspgcc toolchain.<br />
Typically, a GDB proxy creates a local port for gdb to connect to, and handles the communication with the target hardware. In our case, it is basically a bridge between the RSP communication protocol from GDB and the serial debug interface from the openMSP430.<br />
Schematically the communication flow looks as following:
<br /><br />
<img src="getimg.php?1248897690" width="40%" alt="GDB Proxy flow" title="GDB Proxy flow" />
<br /><br />
Like the original '<b><i>msp430-gdbproxy</i></b>' program, '<b><i>openmsp430-gdbproxy</i></b>' can be controlled from the command line. However, it also provides a small graphical interface:
<br /><br />
<img src="getimg.php?1248897753" width="60%" alt="openmsp430-gdbproxy" title="openmsp430-gdbproxy" />
<br /><br />
These two additional screenshots show the script in action together with the Eclipse and DDD graphical frontends:  
<br /><br />
<img src="getimg.php?1248897844" width="100%" alt="openmsp430-gdbproxy and Eclipse" title="openmsp430-gdbproxy and Eclipse" />
<br /><br />
<img src="getimg.php?1248897887" width="100%" alt="openmsp430-gdbproxy and DDD" title="openmsp430-gdbproxy and DDD" />
<br /><br />
<b>Tip:</b> There are several tutorials on Internet explaining how to configure Eclipse for the MSP430. As an Eclipse newbie, I found the followings quite helpful:
<ul>
	<li><a href="http://matthias-hartmann.blogspot.com/2009/02/use-eclipse-and-mspgcc-easy-way.html">Use Eclipse and mspgcc - The easy way</a> (English)</li>
	<li><a href="http://msp430.ms.funpic.de/doku.php?id=msp430:entwicklungumgebung">MSP430 - Entwicklungumgebung</a> (German)</li>
</ul>
 
<a name="5. MSPGCC Toolchain"></a>
<h1>5. MSPGCC Toolchain</h1>
 
<a name="5.1 Some notes regarding msp430-gdb"></a>
<h2>5.1 Some notes regarding msp430-gdb</h2>
 
As of today (July 2009), the GDB port for the MSP430 has some problems (<a href="http://www.nabble.com/Help-with-gdb-commands-td21942613.html">here</a>).<br />
The stepping over function is not available and the backtrace and finish commands don't work properly.<br />
There is fortunately a <a href="http://www.nabble.com/Useful-new-GDB-fixes-td19554922.html">patch</a> existing, and until it is included into GDB, I can only recommend to recompile GDB with it (I didn't try it for Windows but it is quite straight forward to do for Linux). 
 
<a name="5.2 CPU selection for msp430-gcc"></a>
<h2>5.2 CPU selection for msp430-gcc</h2>
 
The following table aims to help selecting the proper <b>-mmcu</b> option for the <b>msp430-gcc</b> call.<br />
Note that the program memory size should imperatively match the openMSP430 configuration. 
<br /><br /> 
<table align="center" border="1">
<tr align="center"><td><b>-mmcu option</b></td><td><b>&nbsp;&nbsp;Program&nbsp;&nbsp;<br />Memory</b></td><td><b>Data<br />&nbsp;&nbsp;&nbsp;Memory&nbsp;&nbsp;&nbsp;</b></td></tr>
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 1 kB</i></b></td></tr>             
<tr align="center"><td>msp430x110  </td><td> 1 kB</td><td>  128 B</td></tr>
<tr align="center"><td>msp430x1101 </td><td> 1 kB</td><td>  128 B</td></tr> 
<tr align="center"><td>msp430x2001 </td><td> 1 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2002 </td><td> 1 kB</td><td>  128 B</td></tr>  
<tr align="center"><td>msp430x2003 </td><td> 1 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2101 </td><td> 1 kB</td><td>  128 B</td></tr>             
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 2 kB</i></b></td></tr>             
<tr align="center"><td>msp430x1111 </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2011 </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2012 </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2013 </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x2111 </td><td> 2 kB</td><td>  128 B</td></tr>
<tr align="center"><td>msp430x2112 </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td>msp430x311  </td><td> 2 kB</td><td>  128 B</td></tr>             
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 4 kB</i></b></td></tr>             
<tr align="center"><td>msp430x112  </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1121 </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1122 </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x122  </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1222 </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x2122 </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x2121 </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x312  </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x412  </td><td> 4 kB</td><td>  256 B</td></tr>             
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 8 kB</i></b></td></tr>             
<tr align="center"><td>msp430x123  </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x133  </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x313  </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x323  </td><td> 8 kB</td><td>  256 B</td></tr>
<tr align="center"><td>msp430x413  </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x423  </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430xE423 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430xE4232</td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430xW423 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1132 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1232 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x1331 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x2131 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x2132 </td><td> 8 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430x2232 </td><td> 8 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x2234 </td><td> 8 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x233  </td><td> 8 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x2330 </td><td> 8 kB</td><td> 1024 B</td></tr>             
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 16 kB</i></b></td></tr>             
<tr align="center"><td>msp430x4250 </td><td>16 kB</td><td>  256 B</td></tr>             
<tr align="center"><td>msp430xG4250</td><td>16 kB</td><td>  256 B</td></tr>
<tr align="center"><td>msp430x135  </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x1351 </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x155  </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x2252 </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x2254 </td><td>16 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x315  </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x325  </td><td>16 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x415  </td><td>16 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x425  </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430xE425 </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430xW425 </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430xE4252</td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x435  </td><td>16 kB</td><td>  512 B</td></tr>             
<tr align="center"><td>msp430x4351 </td><td>16 kB</td><td>  512 B</td></tr>
<tr align="center"><td>msp430x235  </td><td>16 kB</td><td> 2048 B</td></tr>
<tr align="center"><td>msp430x2350 </td><td>16 kB</td><td> 2048 B</td></tr>
<tr align="center"><td colspan="3"><b><i>Program Memory Size: 32 kB</i></b></td></tr>             
<tr align="center"><td>msp430x4270 </td><td>32 kB</td><td>  256 B</td></tr>
<tr align="center"><td>msp430xG4270</td><td>32 kB</td><td>  256 B</td></tr>
<tr align="center"><td>msp430x147  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x1471 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x157  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x167  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x2272 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x2274 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x337  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x417  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x427  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430xE427 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430xE4272</td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430xW427 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x437  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430xG437 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x4371 </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x447  </td><td>32 kB</td><td> 1024 B</td></tr>
<tr align="center"><td>msp430x2370 </td><td>32 kB</td><td> 2048 B</td></tr>
<tr align="center"><td>msp430x247  </td><td>32 kB</td><td> 4096 B</td></tr>
<tr align="center"><td>msp430x2471 </td><td>32 kB</td><td> 4096 B</td></tr>
</table>
<br />
 
</body>
</html>
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.