How To: Setup Linux Mint for TI MSP430 development

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Level 1
Level 1
Posts: 12
Joined: Thu Jul 16, 2009 9:56 am

How To: Setup Linux Mint for TI MSP430 development

Postby MarkusR » Fri Sep 14, 2012 12:06 am

I wanted to setup a development environment for me MSP430 hardware, including:
MSP430 Launchpad ($5)
MSP430 eZ430-RF2500 ($49)
MSP430 eZ430-T2012 ($10 for 3)

My system was a fairly fresh install of Linux Mint 13 Maya, 64-bit, KDE
uname -a: Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm gald to say I was successful and felt like sharing my Journal. So, here it is:
MSP430 Linux Journal.

1. Installed software listed at ... der-linux/ , as recommended packages prior to MSGCC install, using Synaptic Package Manager
2. Installed MSP430 specific software listed on ... ext=msp430
3. Error Message during step 2: E: /var/cache/apt/archives/gdb-msp430_7.2~mspgcc-7.2-20110612-1ubuntu1_amd64.deb: trying to overwrite '/usr/share/gdb/python/gdb/', which is also in package gdb 7.4-2012.04-0ubuntu2 (See Log 1)
4. Step 3 confirmed as a Bug in Ubuntu. Ref: ... bug/860045
5. Checked gdb version 7-4 for removal using Synaptic Package Manager (not complete removal)
6. Successfully installed gdb-msp430 once gdb was uninstalled
7. Followed ... launchpad/ code & compilation instructions successfully, by changing all MCU references from msp430g2553 to msp430g2231
8. Performed the “Installation” section on the site in step 7 successfully.
9. LED blink operated as expected. Used Ctrl+C to abort and display registry and assembly code on the MCU
10. Created a second led.c file, this time with F2012 MCU descriptions.
11. Successfully debugged the MSP430 ez430-T2012 module using steps 8 & 9

No other steps were required to program/debug MSP430 devices using just the command line and the USB port (EDIT: unless you want to use the code examples for interrupts)

EDIT Sept 25, 2012:
PROBLEM: Instructions above are not sufficient for using Interrupts in the code. When compiing an example with an interrupt:

Code: Select all

// Timer A0 interrupt service routine
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
  P1OUT ^= 0x01;                            // Toggle P1.0
  CCR0 += 50000;                            // Add Offset to CCR0

The following error appears, referring to "__interrupt" in the code sample.

Code: Select all

msp430g2xx1_ta_01.c:40:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’

SOLUTION: Replace instances like this:

Code: Select all

#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)

with something like this:

Code: Select all

void Timer_A (void) __attribute__((interrupt(TIMERA0_VECTOR)));
void Timer_A (void)

And it will fix it. This is not to say original can't be made to work (I'm sure it can), but at this point of system configuration the substitution is necessary.

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 5 guests