MSPSim

From TinyOS Wiki
Revision as of 00:13, 11 December 2009 by Sissou (talk | contribs) (Usage)
Jump to: navigation, search
Error creating thumbnail: File missing
MSPSim on Ubuntu

MSPSim is a Java-based simulator of the MSP430 microcontroller.

Installation

After dowloading the last version of MSPSIM, it can be install by entering the command:

make

in the MSPSim folder. A Jar package of MSPSim can be created with the command:

make jar

Then a mspsim.jar is created in the directory. For simplicity, you may want to create an alias to MSPSim:

alias mspsim="java -jar PATH_TO_MSPSIM/mspsim.jar"

After that, MSPSim can be lauched with the command mspsim

Usage

Blink application

We show in this section how to use MSPSIm on the Blink application. First we need to compile the application for the TelosB mote which uses the MSP430 microcontroller with the command:

make telosb

Since MSPSim can open ELF file we have to rename the program file:

mv build/telosb/main.exe build/telosb/main.elf

Then we can run MSPSim:

mspsim builb/telosb/main.elf

Five windows of MSPSim should open, in one of then you should see a picture of the mote with the LED blinking at different frequency. In the terminal you should obtain a MSPSim prompt:

Flash got reset!
MSPSim>Autoloading script: PATH_TO_MSPSIM/scripts/autorun.sc
-----------------------------------------------
MSPSim 0.97 starting firmware: main.elf
-----------------------------------------------
MSPSim>

You can enter the command help inside this prompt to have a list of the available commands.

Profiling

See also

External links