2014년 11월 13일 목요일

eZ430 as RFID tag

1. basic eZ430-F2013 install
http://indiantinker.wordpress.com/2014/02/17/coffeebreak-tutorial-1-setting-up-ubuntu-12-04lts-64bit-to-say-hi-to-msp430

1.1. The original of this
http://www.mycontraption.com/programming-the-msp430-launchpad-on-ubuntu/
2. WISP code to test
http://wisp.wikispaces.com/WISP+Code+Examples


  1. sudo apt-get install binutils-msp430 gcc-msp430 msp430-libc mspdebug
  2. msp430-gcc
    - check MSP430 installation
    msp430-gcc: no input files // you will see no input files
  3. lsusb // check MSP430 is properly connected
  4. mspdebug -uif //MSP430 debugger for the device
DO somecoding in main.c
+---------------------------------------------------------------------------+
/*
* main.c
*/
#include
#define LED BIT0
void delayMS(unsigned int ms ) // MS delay function
{
    unsigned int i;
    for (i = 0; i<= ms; i++)
        __delay_cycles(2000);
}

int main(void) {
    WDTCTL = WDTPW + WDTHOLD;
    P1DIR |= LED;
    P1OUT=0x00;
    while(1)
    {
        P1OUT^= LED;
    delayMS(500);
    }
    return 0;
}

+---------------------------------------------------------------------------+
  1. msp430-gcc -Os -Wall -g -mmcu=msp430f2013 -c main.c // compile
  2. msp430-gcc  -g  -mmcu=msp430f2013 -o main.elf main.o // elf (Executable and Linking file) file generation
  3. sudo mspdebug uif 'erase' 'load main.elf' 'exit' // burn the executable to MSP430