您的位置:首页 > 其它

Ubuntu下MSP430开发环境搭建

2013-12-08 12:50 387 查看
阅读 以下文章可搞定

Ubuntu下搭建MSP430开发环境(MSPGCC)(一) 

Programming the MSP430 Launchpad on Ubuntu

msp430G2553程序烧写方法:

#include <msp430g2553.h>

int main (void)
{
volatile int i;

/* Stop watchdog timer */
WDTCTL = WDTPW | WDTHOLD;

/* Setup bit 0 of P1 as output */
P1DIR = 0x01;

/* Setup bit 0 of P1 to 0 */
P1OUT = 0x00;

/* Loop forever */
while (1) {
/* Toggle bit 0 of P1 */
P1OUT ^= 0x01;
/* Just delay */
for (i = 0; i < 0x6000; i++) {}
}
}
运行:
1、msp430-gcc  -Os  -mmcu=msp430g2553  -o  main.elf  main.c

2、mspdebug rf2500

3、load main.elf

4、run
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: