Menu

MSP430 in ubuntu 13.04

Help
2013-08-08
2013-08-08
  • Andre Luiz Tietbohl Ramos

    Hello,

    I'm just starting to explore this platform and am unable to solve a configuration issue (I guess) in the first program I try, very simple, below.

    include "msp430x22x4.h"

    volatile unsigned int i; // volatile to prevent optimization

    void main(void)
    {
    WDTCTL = WDTPW + WDTHOLD; // stop watchdog timer
    P1DIR |= 0X01; // set P1.0 to output direction

    for(;;) {
    P1OUT ^= 0x01; // toogle P1.0 exclusive-OR
    i = 50000; // delay
    do (i--);
    while (i != 0);
    }
    }

    When I try to compile it under ubuntu 13.04 I receive the error message below,

    sigmatech@sigmatech:~/Desktop/ESL/code/MSP430$ msp430-gcc hello_word.c
    /usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot open linker script file memory.x: No such file or directory
    collect2: ld returned 1 exit status/usr/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: cannot open linker script file memory.x: No such file or directory
    collect2: ld returned 1 exit status

    Could anyone help please?

    TIA

    Sigmatech
    PS - is there an emacs mode available?

     
  • Peter A. Bigot

    Peter A. Bigot - 2013-08-08

    This forum isn't normally used; please subscribe to and mail mspgcc-users for support. See the wiki.

    You'll need to provide the MCU for which your program runs as a parameter to msp430-gcc for both compiling and linking. For example: -mmcu=msp430f2553

    There are emacs modes for C, I don't know what one for mspgcc would look like.

    When you post to mspgcc-users say where you got the toolchain, or if you built it yourself, or if it came with Ubuntu 13.04.

     

Log in to post a comment.