This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPGCC 4.8.0 linker question

Other Parts Discussed in Thread: MSP430F5438A

I'm trying MSPGCC from TI, with this simple test case (ubuntu 12.04):

main.c:

  #include <msp430.h>
  int main() {
    return 0;
}

/opt/msp430/bin/msp430-elf-gcc -O0 -g -Wall -mmcu=msp430f5438a -std=gnu89 main.c
/opt/msp430/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld: cannot open linker script file msp430f5438a/memory.ld: No such file or directory
collect2: error: ld returned 1 exit status

The memory file is located into /opt/msp430/msp430-elf/include/msp430f5438a

It seems a setup problem, Am I missing something?

Attilio

  • Are you using CCSv6 build 156? Please see this related thread for a similar error. 

    I suspect you first created the project for TI compiler and then changed it to GNU compiler. If you create a new CCS project, select the GNU v4.8.0 (Red Hat) compiler, and create an empty project (with main.c), then it should build fine.

  • No,

    I'm using MSPGCC standalone (Msp430GCCopensource-msp430-130423-272-linux-installer.run) on my ubuntu machine.

    -------------------------------------------------------------

     (not related to the above question)

    I tried also CCSv6, but ccs_setup_6.0.0.00156.bin doesn't find packages that are installed on the system (ubuntu 12.04 64 bit machine) and it give this message:

    failed to locate system libraries required for system operation:

    libgnomevfs-2.0.so.0

    libORBIT-2.0.s.0

    > /opt/msp430$ dpkg -l|grep libgnomevfs
    ii libgnomevfs2-0 1:2.24.4-1ubuntu2.1 GNOME Virtual File System (runtime libraries)
    ii libgnomevfs2-common 1:2.24.4-1ubuntu2.1 GNOME Virtual File System (common files)
    ii libgnomevfs2-extra 1:2.24.4-1ubuntu2.1 GNOME Virtual File System (extra modules)
    > /opt/msp430$ dpkg -l|grep liborbit2
    ii liborbit2 1:2.14.19-0.1ubuntu1 libraries for ORBit2 - a CORBA ORB

    Are the CCS package for linux targeted for 32 bit machines?

    Attilio

  • Attilio Dona' said:

    Are the CCS package for linux targeted for 32 bit machines?

    Yes, you need to install the 32bit library support package on 64bit ubuntu distributions. Please see this wiki page for details: http://processors.wiki.ti.com/index.php/Linux_Host_Support

  • Attilio Dona' said:

    /opt/msp430/bin/msp430-elf-gcc -O0 -g -Wall -mmcu=msp430f5438a -std=gnu89 main.c
    /opt/msp430/bin/../lib/gcc/msp430-elf/4.8.0/../../../../msp430-elf/bin/ld: cannot open linker script file msp430f5438a/memory.ld: No such file or directory
    collect2: error: ld returned 1 exit status

    The memory file is located into /opt/msp430/msp430-elf/include/msp430f5438a

    The GNU linker accepts -L (or --library-path) option to specify the directory to search for linker scripts. Try adding this option to your command line to tell it to look for the scripts in that directory:
    -L /opt/msp430/msp430-elf/include

  • Thanks Aartig,

    The -L option works.

    Just as a note the previous mspgcc that I built doesn't need the library-path option, it is in the default search path.

    > msp430-gcc -v

    gcc version 4.7.0 20120322 (mspgcc dev 20120911) (GCC)

    > msp430-gcc -O0 -g -Wall -mmcu=msp430f5438a -std=gnu89  main.c

    --> a.out

    I also confirm that with the 32 support libray CCS install and run successfully.