Installation
The basic amenities are:
- mspgcc
- libusb-dev
- libreadline-dev
- mspdebug
After these are installed, msp-430-gcc or msp-430-gcc-4.4.3 can be used to cross-compile the C code.
The 'libusb-dev' library contains necessary libraries for sucessfully connecting the LaunchPad through the USB cable.
The 'libreadline-dev' library is for enabling history for the commands typed inside the 'mspdebug' environment.
Ensure that the LaunchPad has been detected by:
dmesg | tail
Your LaunchPad will be assigned to the device: /dev/ttyACM0.
The mspdebug is used for interacting with, erasing or burning the flash memory of the MSP chip. It also allows to debug the downloaded program present inside the MSP chip flash memory, through the inbuilt JTAG or Spy-By-Wire support.
The eZ430-RF2500 tool of the mspdebug supports the USB connection and also provides Spy-By-Wire debugging.
Switch on your LEDs !!!
A sample program led2.c, which lights up both the LEDs on th LaunchPad when the switch S2 on P1.3 is pressed.
Fig 1. The sample program |
First, cross-compile the code.
msp430-gcc-4.4.3 -g led2.c
Now connect the LaunchPad. Then:
sudo mspdebug rf2500
Fig 2. Inside mspdebug |
To download the code, use:
(mspdebug) prog a.out
Fig 3. Downloading the code |
Now run it, as:
(mspdebug) run
Fig 4. Running the code |
No comments:
Post a Comment