Difference between revisions of "Board-msp430"

From Bashlinux
Jump to: navigation, search
(Howto setup Eclipse for MSP430 GCC toolchain)
(Howto setup Eclipse for MSP430 GCC toolchain)
Line 1: Line 1:
== Howto setup Eclipse for MSP430 GCC toolchain ==
+
== How to setup udev for MSP430 LaunchPad ==
  +
* Add the proper udev rule to let the user have access to the device
  +
SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0664", GROUP="dialout"
  +
* Restart udev
  +
udevadm control --reload
  +
  +
== How to setup MSP430 GCC toolchain from distro ==
 
* Install msp430 tools and dependencies
 
* Install msp430 tools and dependencies
 
'''Fedora'''
 
'''Fedora'''
<nowiki>yum -y install msp430-gcc msp430-binutils msp430-libc mspdebug msp430mcu eclipse eclipse-cdt libmpc-devel glibc-devel.i686</nowiki>
+
yum -y install msp430-gcc msp430-binutils msp430-libc mspdebug msp430mcu eclipse eclipse-cdt libmpc-devel glibc-devel.i686
 
'''Ubuntu'''
 
'''Ubuntu'''
<nowiki>apt-get -y install gcc-msp430 binutils-msp430 msp430-libc gdb-msp430 msp430mcu eclipse eclipse-cdt libmpc-dev libc6-dev-i386</nowiki>
+
apt-get -y install gcc-msp430 binutils-msp430 msp430-libc gdb-msp430 msp430mcu eclipse eclipse-cdt libmpc-dev libc6-dev-i386
  +
* Setup the MSP430 Plugin
  +
  +
== How to setup MSP430 GCC toolchain non-distro ==
  +
On Fedora 21 and newer versions the toolchain has missed some symbols, so will be better to not use the toolchain that comes with the distro.
  +
In order to deal with this, one can use the toolchain provided by xpg.dk
  +
* Get the toolchain from http://xpg.dk/files/File/msp430/msp430-toolchain-linux-amd64-3.0.tar.bz2
  +
* Decompress, rename and put it on /opt/ti/msp430-toolchain
  +
* Setup the MSP430 Plugin
  +
  +
== How to setup Eclipse for the MSP430 GCC toolchain ==
 
* Update eclipse, ''Help > Check Updates''
 
* Update eclipse, ''Help > Check Updates''
 
* Add the MSP430 plug-in on ''Help > Install New software''
 
* Add the MSP430 plug-in on ''Help > Install New software''
Line 11: Line 27:
 
* On the "Install Details" screen click 'Finish' and click 'Ok" if the "Security Warning" prompts you to confirm the installation
 
* On the "Install Details" screen click 'Finish' and click 'Ok" if the "Security Warning" prompts you to confirm the installation
 
* Click on 'Yes' when Eclipse finish up the installation and ask you to restart Eclipse itself.
 
* Click on 'Yes' when Eclipse finish up the installation and ask you to restart Eclipse itself.
  +
* Click on ''MSP430 > Tool Manager'' at the top menu
  +
** Click on 'Add' and look for the toolchain at '/opt/ti/msp430-toolchain'
  +
** Click on 'Activate'
  +
  +
== How to create a project ==
  +
* Select ''File > New > Project ''
  +
** Select ''C/C++ > C Project'' and click 'Next'
  +
** Set a name on 'Project name'
  +
** Select ''MSP430 Cross Target Application > Empty Project'' and click 'Finish'
  +
* Right clik on Project and select 'Properties' and then select 'MSP430' on the left menu
  +
** 'Target MCU' select your microcontroller
  +
** 'MSPDebug' select the driver 'rf2500'
  +
** 'Connection' select 'USB', the serial number of the MSP430 Launchpad should be listed in the dropbox, if not udev has not been set properly

Revision as of 22:41, 30 May 2015

How to setup udev for MSP430 LaunchPad

  • Add the proper udev rule to let the user have access to the device
SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0664", GROUP="dialout"
  • Restart udev
udevadm control --reload

How to setup MSP430 GCC toolchain from distro

  • Install msp430 tools and dependencies

Fedora

yum -y install msp430-gcc msp430-binutils msp430-libc mspdebug msp430mcu eclipse eclipse-cdt libmpc-devel glibc-devel.i686 

Ubuntu

apt-get -y install gcc-msp430 binutils-msp430 msp430-libc gdb-msp430 msp430mcu eclipse eclipse-cdt libmpc-dev libc6-dev-i386
  • Setup the MSP430 Plugin

How to setup MSP430 GCC toolchain non-distro

On Fedora 21 and newer versions the toolchain has missed some symbols, so will be better to not use the toolchain that comes with the distro. In order to deal with this, one can use the toolchain provided by xpg.dk

How to setup Eclipse for the MSP430 GCC toolchain

  • Update eclipse, Help > Check Updates
  • Add the MSP430 plug-in on Help > Install New software
  • On the "Available Software" screen, click on 'Add' button and type in the new dialog "MSP430 Plugin" in name field and http://eclipse.xpg.dk in Location
  • Back to "Available Software" screen, enable the check box for "msp430" and then hit 'Next' at the bottom of the screen
  • On the "Install Details" screen click 'Finish' and click 'Ok" if the "Security Warning" prompts you to confirm the installation
  • Click on 'Yes' when Eclipse finish up the installation and ask you to restart Eclipse itself.
  • Click on MSP430 > Tool Manager at the top menu
    • Click on 'Add' and look for the toolchain at '/opt/ti/msp430-toolchain'
    • Click on 'Activate'

How to create a project

  • Select File > New > Project
    • Select C/C++ > C Project and click 'Next'
    • Set a name on 'Project name'
    • Select MSP430 Cross Target Application > Empty Project and click 'Finish'
  • Right clik on Project and select 'Properties' and then select 'MSP430' on the left menu
    • 'Target MCU' select your microcontroller
    • 'MSPDebug' select the driver 'rf2500'
    • 'Connection' select 'USB', the serial number of the MSP430 Launchpad should be listed in the dropbox, if not udev has not been set properly