在Ubuntu14.04下安装MSP430-gcc

第一步:解压缩文件msp430-toolchain-linux-i386-2.1.tar.bz2,并将其放到/opt目录下。

tar jxvf msp430-toolchain-linux-i386-2.1.tar.bz2

sudo mv msp430-toolchain-linux-i386-2.1 /opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1

第二步:修改环境变量

在~/.bashrc中的最后加上以下语句:

export PATH=/opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1/bin:/opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1/lib:/opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1/include:$PATH

并且使其生效:

source ~/.bashrc

第三步:在/etc/ld.so.conf.d/目录下添加msp430-toolchain.conf文件,

sudo vim /etc/ld.so.conf.d/msp430-toolchain.conf

并在其中增加如下语句:

/opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1/lib
/opt/msp430-toolchain/msp430-toolchain-linux-i386-2.1/libexec

保存退出,并且通过以下指令使其生效:

sudo ldconfig

 

此时,输入命令

msp430-gcc -v

会有版本返回:

gcc version 4.7.0 20120302 (mspgcc internal 20120716) (GCC)msp430-gcc 4.7.0(32位版本)压缩包下载地址:

http://pan.baidu.com/s/1o6vkWDc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s