Launchpad is an easy to use development tool for msp430 family. The launchpad development board is MSP-EXP430G2. This board socket supports upto 20pins. It has a mini USB cable for connecting to PC. it has 2 programmable LEDs, 1 power LED and 2 programmable buttons. it has a 2 KB Flash memory for machine codes starting from 0xf800 and a 128B RAM for datas starting from 0x200h.
MSP430 is a microcontroller for low power management(msp430Watch out this video). The msp430 was connected to my usb port as it has the usb support. For confirming that the device was connected just type ‘dmesg’ in the terminal. There should be some debugging interface inmicrocontroller and msp430 provides wih 2 such interfaces. One is JTAG(Joint Test Architecture Group) which is inbuilt in almost all the modern microcntrollers and a 2 wire debugging interface known as Spy-Bi-Wire.
MSPDebug is a free debugger for use with MSP430 MCUs.It can be used as a proxy for gdb or as an independent debugger with support for programming, disassembly and reverse engineering. As there is no kernel support for msp430, libusb(‘libusb-dev’-package name) was installed . This will help in accessing the usb in userspace itself. Sometimes you need to install an additional package called ‘libreadline’. now download and make the mspdebug by typing the commands
make
make install(for which you need to be a super user).
Now for testing mspdebug just type mspdebug int he terminal. You should be a superuser to perform the following:
so some kind of drivers need to be specified.
Being a usb connection we can use rf2500 as the device specification. Now when this command ‘mspdebug rf2500’ the initialization message can be seen as follows:
On reading this initialization message it can be seen that device : MSP430F2013 is specified. If you are not really using this series you may get confused here as I was while using a MSP430G2231. But not to worry as the MSP430 series have almost the same memory layout. After initialization a set of available commands can also be seen for debugging. It should be noted that no code is running at this point of time. Before doing this one should be aware of he memory layout of the device.
MSP430 has RAM (starting from 0x200h) of 128 B, flash memory of 2KB. 16 registers (R0-R15) of which R0-R3 are Special Function Registers.
———————R0 represent PC
———————R1 represent SP
———————R2 represent SR/CG
———————R3 represent CG
RAM stores the data and flash memory stores the machine code. The commands usually used in mspdebug are as follows:
dis – for disassembling
erase – flash memory ges erased. The erase state of flash memory is 1.
regs – gives the register values.
help – for displaying the available commands.
MSPdebug is a low level tool for debugging. It doesn’t have any any awareness about higher level languages like C.