2014-09-28 2 views
-2

누구나 리눅스 (특히 우분투)에서 MSP430 용 툴 체인을 설정하는 절차를 안내해 줄 수 있습니까? MSP430 런치 패드 (MSP-EXP430G2)를 사용하고 있으며 컴파일러/빌드 도구와 디버거 드라이버를 설치해야합니다.MSP430 toolchain in Linux

+0

apt-cache search msp430은 gcc-msp430, binutils-msp430 (자동으로 gcc와 함께 제공됨)을 제공합니다. 또한 mspdebug를 사용하면 16 진수/2 진 파일을 런치 패드에로드 할 수 있습니다. –

+0

다음 링크를 확인하십시오 : 1) eliaselectronics.com/installing-the-msp430-toolchain-on-ubuntu 2) elabz.com/msp430-in-64-bit-ubuntu-12-04-linux-the-adduinoway –

+0

데비안 mspgcc 패키지를 사용하지 마십시오! 오래된 것이고 유지 보수가되지 않았고 일부 심각한 버그가있어서 일부 MSP430 장치가 작동하지 않을 수 있습니다. (일부 구성에서는 플래시 퓨즈 위에 코드를 작성하여 장치를 부팅 할 수 없게 만듭니다.) 대신 TI의 컴파일러를 구하십시오. –

답변

0

Linux 버전의 Texas Instruments 'CCS IDE를 설치하면 툴 체인이 설치됩니다. 그러나 Linux에서 MSP430을 개발할 때 다른 문제가 있습니다. 버그 및 수정 여기 내 게시물에 자세히 설명되어 있습니다 :

MSP430/eZ430-RF2500 Linux support Guide

"Compile code using Code Composer Studio (CCS) 

Download CCS for Linux. 
Create a new CCS project with a Custom MSP430 Device or any other. 
Compile the code. The result binary image will be in the workspace. The workspace path can be found in “File”/“Switch workspace”. 
The file that should be programmed to the device is the project-name.out file. 
Program and run device using mspdebug 

Download and Install mspdebug 
From the directory with the file project-name.out run: 
$ sudo mspdebug rf2500 
Now you are in mspdebug’s command line shell. Run the following to program and run the device: 
(mspdebug) prog project-name.out 
(mspdebug) run 
Use Ctrl+c to pause run and get command line back. 
Fix a Linux Kernel bug that prevents Minicom to communicate with device 

The device path in /dev is /dev/ttyACM0. Currently, connecting to it 
serially using utilities such as minicom is not possible, and you get the message “/dev/ttyACM0: No such file or directory”. 

The bug is in Kernel module “cdc_acm”. The solution is to fix the bug in the source code, recompile the module and plug it instead of the existing one. 

Find out Linux version: 
$ uname -r 
cdc_acm’s source is the files cdc-acm.c and cdc-acm.h. They are under the Linux path drivers/usb/class/. 
Download these two files from a repository that matches your Linux version. Such repos are available in lxr.free-electrons.com and www.kernel.org. 
Create a new directory and move the files to it.There are two code segments need to be removed or commented out: 
The next lines appear in function “acm_port_activate()” on newer versions and in “acm_tty_open()” in older ones: 
// if (0 > acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS) && 
// (acm->ctrl_caps & USB_CDC_CAP_LINE)) 
// goto bail_out; 
The next line appears in function “acm_port_shutdown()” on newer versions “acm_port_down()” in older ones: 
// acm_set_control(acm, acm->ctrlout = 0); 
Create a Makefile and compile: 
$ echo 'obj-m += cdc-acm.o' > Makefile 
$ make -C /lib/modules/`uname -r`/build M=$PWD modules 
You should have a new cdc-acm.ko file in the directory 
Replace the existing module (This change will be discarded after boot): 
$ sudo rmmod cdc-acm 
$ sudo insmod ./cdc-acm.ko 
Communicate via the serial port using Minicom 

Launch minicom setup from command line: 
$ minicom -s 
In the menu, choose: 
Serial port setup 
Press ‘A’ (for “Serial Device”). 
Replace Current device path with: 
/dev/ttyACM0 
Press ‘E’ (for “Bps/Par/Bits”). 
Set the correct data rate for your device.To lower the rate (to 1200, for instance), keep pressing ‘B’ (for “previous”) until the top line shows: 
Current: 1200 8N1 
Press “Enter” until returning to main menu, there, press “Exit”.This will exit the setup menu and start running on the device. From now on you should see messages over the serial connection: It is up to you to program the device with such messages."