Msp430 Debbuging With Pyclewn and Vim

Writing code for microcontrollers is sometimes very annoying, since you don’t if your device is exactly doing what you want. Since (mostly) there isn’t any monitor or terminal connected to you can’t just put some debugging-output via printf to your code.

For my msp430 I found one solution by using pyclewn, mspdebug and vim.

Debugging within vim


The installation-process described below is for a local user-installation.

  1. Download pyclewn
  2. extract the archive, cd into the extracted archive
  3. run vimdir=$HOME/.vim python install --force --home=$HOME

How to use

  1. cd into your project-directory and run: pyclewn -e gvim -p msp430-gdb
  2. Run mspdebug rf2500 gdb in a Terminal, to connect to your msp
  3. Now connect gdb to the mspdebugger. In your gvim window, type :Ctarget remote :2000
  4. Load the symbols. In your gvim window, type :Cload main.elf
  5. Load the elf-file to gdb, type :Cfile main.elf
  6. Load the keybindings for pyclew. In gvim :Cmapkeys
  7. Set some breakpoints: Ctrl-B
  8. Execute continue: C