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.

Building MSP430-GCC 3_03_04_00 on OS X

Hi all,

I'm trying to switch from the legacy "peter bigot" mspgcc to the newer Ti/Redhat version. The legacy one installed fine on OS X and I've been using happily it for a long time.

Trying to build the new one using

./configure
make

I get an error.

Question: Do you know if anyone has been able to build mspgcc on OS X?

I've scoured the web and not found any info.

I only read mentions of windows and linux in the product description. But the release notes mention OS X and the old mspgcc supported it, so this has kept me hopeful.

Here is the build error I get:

MLIBS=`/Users/me/Downloads/sources/tools/host-x86_64-apple-darwin14.3.0/gcc/xgcc -B/Users/me/Downloads/sources/tools/host-x86_64-apple-darwin14.3.0/gcc/ -B/usr/local/x86_64-apple-darwin14.3.0/bin/ -B/usr/local/x86_64-apple-darwin14.3.0/lib/ -isystem /usr/local/x86_64-apple-darwin14.3.0/include -isystem /usr/local/x86_64-apple-darwin14.3.0/sys-include    --print-multi-lib | sed -e 's/;.*$//'` ; \
  for mlib in $MLIBS ; do \
    /Users/me/Downloads/sources/tools/host-x86_64-apple-darwin14.3.0/binutils/strip-new -o libgcc_ext.10.5.dylib_T${mlib} \
      -R ../.././libgcc/config/i386/libgcc-darwin.10.5.ver -c -urx \
      ../${mlib}/libgcc/${mlib}/libgcc_s.dylib || exit 1 ; \
  done
xgcc: warning: couldn’t understand kern.osversion ‘14.3.0
xgcc: warning: couldn’t understand kern.osversion ‘14.3.0
xgcc: warning: couldn’t understand kern.osversion ‘14.3.0
lipo -output libgcc_s.1.dylib \
    -create libgcc_s.1.dylib_T*
/Users/me/Downloads/sources/tools/host-x86_64-apple-darwin14.3.0/binutils/strip-new: invalid option -- c

I'm on OS X 10.10.2

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0

Question: I'm trying to fix this but I have limited experience in building gcc, any idea on how to fix this error?

Cheers

  • Hello,


    I'm not quite sure where your error is being introduced, however, this is the process I've used to build natively on MacOS:

    %  wget http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/msp430-gcc-source.tar.bz2
    %  tar xvjf msp430-gcc-source.tar.bz2?tracked=1
    % export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

    % export LIBRARY_PATH=/usr/X11/lib

    %  mkdir build
    %  cd build
    % ../sources/tools/configure --target=msp430-elf --prefix=/Users/cgadmin/gmiller/msp430-gcc-4.9.1 --enable-languages=c,c++ --disable-werror

    % make all

    % make install

    % make info

    % make install-info

    Hope that helps.

    Regards,
    Greg

  • Thanks alot Greg, following your steps worked.

    For the record, I did run into an error:

    (...)
    duplicate symbol _sim_addr_range_hit_p in:
        nrun.o
        libsim.a(sim-stop.o)
    ld: 25 duplicate symbols for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[3]: *** [run] Error 1
    make[2]: *** [all] Error 1
    make[1]: *** [all-sim] Error 2
    make: *** [all] Error 2

    To circumvent the error, I added the `--disable-sim` option to the `./configure` command.