1405 views|1 replies

3836

Posts

19

Resources
The OP
 

MSP430 development environment construction under Ubuntu [Copy link]

Msp430G2553 program burning method: #include

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


This post is from Microcontroller MCU

Latest reply

A method that can be understood, but is not used much now  Details Published on 2018-12-25 08:36
 

6366

Posts

4929

Resources
2
 
A method that can be understood, but is not used much now
This post is from Microcontroller MCU
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list