URL
https://opencores.org/ocsvn/openmsp430/openmsp430/trunk
Subversion Repositories openmsp430
[/] [openmsp430/] [trunk/] [doc/] [html/] [software_development_tools.html] - Rev 162
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.%20Introduction"> 1. Introduction</a></li> <li><a href="#2.%20openmsp430-loader"> 2. openmsp430-loader</a></li> <li><a href="#3.%20openmsp430-minidebug"> 3. openmsp430-minidebug</a></li> <li><a href="#4.%20openmsp430-gdbproxy"> 4. openmsp430-gdbproxy</a></li> <li><a href="#5.%20MSPGCC%284%29%20Toolchain"> 5. MSPGCC Toolchain</a> <ul> <li><a href="#5.1%20Compiler%20options"> 5.1 Compiler options</a></li> <li><a href="#5.2%20MCU%20selection"> 5.2 MCU selection</a></li> <li><a href="#5.3%20Custom%20linker%20script"> 5.3 Custom linker script</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 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 GUI 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/Vista/7). <br> <br> <b>Note:</b> to be able to execute the scripts, <a href="http://www.tcl.tk/software/tcltk/">TCL/TK</a> needs to be installed on your system.<br> <br> In order to connect the host PC to the openMSP430 serial debug interface, a serial cable is required.<br> Typically, the following solutions will suit any kind of development board:<br> <ul> <li><a href="http://www.ftdichip.com/Products/Cables/USBRS232.htm">USB to RS232 converter</a></li> <li><a href="http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm">USB to Serial TTL converter</a><br> </li> </ul> <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 or Intel-HEX 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" cellpadding="0" cellspacing="4"> <tbody> <tr> <td width="35"><br> </td> <td bgcolor="#d0d0d0" width="3"><br> </td> <td width="15"><br> </td> <td> <code>openmsp430-loader.tcl [-device <communication device>] [-baudrate <communication speed>] <elf/ihex-file> <br> <br> Examples: openmsp430-loader.tcl -device /dev/ttyUSB0 -baudrate 9600 leds.elf<br> openmsp430-loader.tcl -device COM2: -baudrate 38400 ta_uart.ihex </code> </td> </tr> </tbody> </table> <br> These screenshots show the script in action under Linux and Windows: <br> <br> <img src="usercontent,img,1306525377" alt="openmsp430-loader Linux" title="openmsp430-loader Linux" width="75%"> <br> <br> <img src="usercontent,img,1249244501" alt="openmsp430-loader Windows" title="openmsp430-loader Windows" width="75%"> <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="usercontent,img,1306665243" alt="openmsp430-minidebug" title="openmsp430-minidebug" width="75%"> <br> <br> As you can see from the screenshot, it allows the following actions: <ul> <li><b><font color="#ff0000">(1)</font></b> Connect to the openMSP430 Serial Debug Interface.</li> <li><b><font color="#ff0000">(2)</font></b> Load the program memory with an ELF or Intel-HEX file</li> <li><b><font color="#ff0000">(3)</font></b> Control the CPU: Reset, Stop, Start, Single-Step and Software breakpoints</li> <li><b><font color="#ff0000">(4)</font></b> Read/Write access of the CPU registers</li> <li><b><font color="#ff0000">(5)</font></b> Read/Write access of the whole memory range (program, data, peripherals)</li> <li><b><font color="#ff0000">(6)</font></b> Basic disassembled view of the loaded program (current PC location is highlighted in green, software breakpoints in yellow, pink and violet)</li> <li><b><font color="#ff0000">(7)</font></b> Choose the disassembled view type</li> <li><b><font color="#ff0000">(8)</font></b> Source a custom external TCL script</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="usercontent,img,1248897690" alt="GDB Proxy flow" title="GDB Proxy flow" width="40%"> <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 simple graphical interface: <br> <br> <img src="usercontent,img,1306525816" alt="gdbproxy" title="gdbproxy" width="60%"> <br> <br> These two additional screenshots show the script in action together with the Eclipse and DDD graphical frontends: <br> <br> <img src="usercontent,img,1320787180" alt="gdbproxy-Eclipse" title="gdbproxy-Eclipse" width="100%"> <br> <br> <img src="usercontent,img,1306526049" alt="gdbproxy-DDD" title="gdbproxy-DDD" width="100%"> <br> <br> <b>Tip 1:</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 (the <b><i>msp430-gdbproxy</i></b> sections should of course be ignored as we are using our own <b><i>openmsp430-gdbproxy</i></b> program :-) ): <ul> <li><a href="http://www.43oh.com/2010/11/a-step-by-step-guide-msp430-programming-under-linux/">A Step By Step Guide To MSP430 Programming Under Linux</a> (English)</li> <li><a href="http://www.mikrocontroller.net/articles/MSP430_eclipse_helios_mspgcc4_gdb-proxy">MSP430 eclipse helios mspgcc4</a> (German)</li> </ul> <b>Tip 2: </b>You probably want to install this excellent Eclipse plugin (see screenshot above): <a style="font-weight: bold;" href="https://sourceforge.net/projects/embsysregview/">EmbSysRegView</a><br> <a name="5. MSPGCC(4) Toolchain"></a><br> <h1>5. MSPGCC Toolchain</h1> <a name="5.1 Compiler options"></a> <h2>5.1 Compiler options</h2> The <b>msp430-gcc</b> compiler accepts the following MSP430 specific command line parameters (copied from the MSPGCC <a href="http://mspgcc.sourceforge.net/manual/c745.html">manual page</a>): <br> <br> <table align="center" border="1"> <tbody> <tr> <td>-mmcu= </td> <td>Specify the MCU name </td> </tr> <tr> <td>-mno-volatile-workaround</td> <td>Do not perform a volatile workaround for bitwise operations. </td> </tr> <tr> <td>-mno-stack-init </td> <td>Do not initialize the stack as <i>main()</i>starts. </td> </tr> <tr> <td>-minit-stack= </td> <td>Specify the initial stack address. </td> </tr> <tr> <td>-mendup-at= </td> <td>Jump to the specified routine at the end of <i>main()</i>. </td> </tr> <tr> <td>-mforce-hwmul </td> <td>Force use of a hardware multiplier. </td> </tr> <tr> <td>-mdisable-hwmul </td> <td>Do not use the hardware multiplier. </td> </tr> <tr> <td>-minline-hwmul </td> <td>Issue inline code for 32-bit integer operations for devices with a hardware multiplier. </td> </tr> <tr> <td>-mnoint-hwmul </td> <td>Do not disable and enable interrupts around hardware multiplier operations. This makes multiplication faster when you are certain no hardware multiplier operations will occur at deeper interrupt levels. </td> </tr> <tr> <td>-mcall-shifts </td> <td>Use subroutine calls for shift operations. This may save some space for shift intensive applications. </td> </tr> </tbody> </table> <br> <a name="5.2 MCU selection"></a> <h2>5.2 MCU selection</h2> The following table aims to help selecting the proper MCU name for the <b>-mmcu</b> <a href="http://mspgcc.sourceforge.net/manual/c745.html">option</a> during the <b>msp430-gcc</b> call: <br> <br> <table align="center" border="1"> <tbody> <tr align="center"> <td><b>-mmcu option</b></td> <td><b> Program <br> Memory</b></td> <td><b>Data<br> Memory </b></td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Hardware<br> Multiplier </span><br> </td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No<br> </td> </tr> <tr align="center"> <td>msp430x1101 </td> <td> 1 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2001 </td> <td> 1 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2002 </td> <td> 1 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2003 </td> <td> 1 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2101 </td> <td> 1 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2011 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2012 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2013 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2111 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2112 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x311 </td> <td> 2 kB</td> <td> 128 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1121 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1122 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x122 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1222 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2122 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2121 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x312 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x412 </td> <td> 4 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x133 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x313 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x323 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x413 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x423 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xE423 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xE4232</td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xW423 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1132 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1232 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1331 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2131 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2132 </td> <td> 8 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2232 </td> <td> 8 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2234 </td> <td> 8 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x233 </td> <td> 8 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x2330 </td> <td> 8 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 12 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xE4242<br> </td> <td style="vertical-align: top; text-align: center;">12 kB</td> <td style="vertical-align: top; text-align: center;"> 512 B</td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x314<br> </td> <td style="vertical-align: top; text-align: center;">12 kB</td> <td style="vertical-align: top; text-align: center;"> 512 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430xG4250</td> <td>16 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x135 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x1351 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x155 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2252 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2254 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x315 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x325 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x415 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x425 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xE425 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xW425 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430xE4252</td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x435 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x4351 </td> <td>16 kB</td> <td> 512 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x235 </td> <td>16 kB</td> <td> 2048 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x2350 </td> <td>16 kB</td> <td> 2048 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 24 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4260<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">256 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG4260<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">256 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x156<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">512 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4361<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">1024 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x436<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">1024 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x336<br> </td> <td style="vertical-align: top; text-align: center;">24 kB<br> </td> <td style="vertical-align: top; text-align: center;">1024 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td rowspan="1" colspan="4"><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> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430xG4270</td> <td>32 kB</td> <td> 256 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x147 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x1471 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x157 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x167 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x2272 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x2274 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x337 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x417 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x427 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xE427 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xE4272</td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430xW427 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x437 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430xG437 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x4371 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;">No</td> </tr> <tr align="center"> <td>msp430x447 </td> <td>32 kB</td> <td> 1024 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x2370 </td> <td>32 kB</td> <td> 2048 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x247 </td> <td>32 kB</td> <td> 4096 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td>msp430x2471 </td> <td>32 kB</td> <td> 4096 B</td> <td style="vertical-align: top;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x1610<br> </td> <td style="vertical-align: top; text-align: center;">32 kB</td> <td style="vertical-align: top; text-align: center;">5120 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span><br> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 41 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5438<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5437<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5436<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5435<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5419<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x5418<br> </td> <td style="vertical-align: top; text-align: center;">41 kB<br> </td> <td style="vertical-align: top; text-align: center;">16384 B<br> </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 48 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x1611<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">10240 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x248<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2481<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4783<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG438<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;">No </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4784<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x148<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x168<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x1481<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x448<br> </td> <td style="vertical-align: top; text-align: center;">48 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 51 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG4617<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2418<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2618<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2417<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG4618<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2617<br> </td> <td style="vertical-align: top; text-align: center;">51 kB<br> </td> <td style="vertical-align: top; text-align: center;">8192 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 54 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x1612<br> </td> <td style="vertical-align: top; text-align: center;">54 kB<br> </td> <td style="vertical-align: top; text-align: center;">5120 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 55 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2619<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG4619<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG4616<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2416<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2419<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2616<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2410<br> </td> <td style="vertical-align: top; text-align: center;">55 kB<br> </td> <td style="vertical-align: top; text-align: center;">4096 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr align="center"> <td colspan="4" rowspan="1" style="vertical-align: top;"><b><i>Program Memory Size: 59 kB</i></b></td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4794<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2560 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x4793<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2560 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x2491<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x1491<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x149<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430xG439<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;">No<br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x249<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x449<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center;">msp430x169<br> </td> <td style="vertical-align: top; text-align: center;">59 kB<br> </td> <td style="vertical-align: top; text-align: center;">2048 B<br> </td> <td style="vertical-align: top; text-align: center;"><span style="font-weight: bold;">Yes</span> </td> </tr> </tbody> </table> <br> <span style="text-decoration: underline;">Note:</span> the program memory size should imperatively match the openMSP430 configuration.<br> <br> <a name="5.3 Custom linker script"></a> <h2>5.3 Custom linker script</h2> The use of the <b>-mmcu</b> switch is of course <b>NOT</b> mandatory. It is simply a convenient way to use the pre-existing linker scripts provided with the MSPGCC4 toolchain.<br> <br> However, if the peripheral address space is larger than the standard 512B of the original MSP430 (see the <a href="http://opencores.org/project,openmsp430,core#2.1.3.2%20Advanced%20System%20Configuration">Advanced System Configuration</a> section), a customized linker script <b>MUST</b> be provided.<br> <br> To create a custom linker script, the simplest way is to start from an existing one: <ul> <li>the MSPGCC toolchain provides a wide range of examples for all supported MSP430 models (see "<b><i>msp430/lib/ldscripts/</i></b>" sub-directory, in the MSPGCC installation directory).</li> <li>the openMSP430 project also provide a simple linker script example: <a href="http://opencores.org/websvn,filedetails?repname=openmsp430&path=/openmsp430/trunk/core/sim/rtl_sim/src/ldscript_example.x">ldscript_example.x</a></li> </ul> <br> From there, the script can be modified to match <b>YOUR</b> openMSP430 configuration: <ul> <li>In the <b><i>text (rx)</i></b> section definition, update the <b><i>ORIGIN</i></b> and <b><i>LENGTH</i></b> fields to match the <b>PROGRAM MEMORY</b> configuration.</li> <li>In the <b><i>data (rwx)</i></b> section definition, update the <b><i>ORIGIN</i></b> field to match the <b>PERIPHERAL SPACE</b> configuration and the <b><i>LENGTH</i></b> field to match the <b>DATA MEMORY</b> configuration.</li> <li>At last, update the stack pointer initialization value (look for the "<b><i>PROVIDE (__stack =</i></b>" section) and make sure that it falls in the data memory space (the stack size should also matches your application requirements, i.e. not to small... and not to big :-P ).</li> </ul> <br> <br> </body></html>
Go to most recent revision | Compare with Previous | Blame | View Log