Coder Social home page Coder Social logo

homebrew-mspgcc's Introduction

homebrew-mspgcc

These are Homebrew formulae for mspgcc, the compiler toolchain for the MSP430 microcontroller. The repository includes binutils, gcc, libc, and the mcu files.

To get everything, type:

$ brew tap sampsyo/mspgcc
$ brew install msp430-libc

Since libc is the top of the dependency chain, this should suffice to get everything you need.

$ msp430-gcc --version
msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120911)
...

These formulae are quick n' dirty and undoubtedly need some improvement (missing dependencies, brittle workarounds, etc.). I also haven't (yet) included gdb or mspdebug.

One manual step is required to get a working system. Annoyingly, since the --prefix= compile option for each of these packages is different, each of the various tools can't find required files installed by other packages. To consolidate the various lib pieces under a common directory, run:

$ $(brew --prefix)/Homebrew/Library/Taps/sampsyo/homebrew-mspgcc/addlinks.sh

This script symlinks everything from all the packages into msp430 under the msp430-gcc keg. This means your root for the MSP430 toolchain is something like /usr/local/opt/msp430-gcc/msp430 (which would be /usr/local/msp430 on a "normal" installation).

homebrew-mspgcc's People

Contributors

bz007 avatar dderiso avatar lukeadams avatar mvochoa avatar sampsyo avatar tsparber avatar turbo87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

homebrew-mspgcc's Issues

msp430-gcc "/lib/cpp" fails sanity check

Below is the error I get on OSX 10.11 when installing msp430-gcc.

checking whether we are using the GNU C compiler... yes
checking whether /private/tmp/msp430-gcc20151020-38772-h11hf8/gcc-4.7.0/build/./gcc/xgcc -B/private/tmp/msp430-gcc20151020-38772-h11hf8/gcc-4.7.0/build/./gcc/ -B/usr/local/Cellar/msp430-gcc/4.7.0/msp430/bin/ -B/usr/local/Cellar/msp430-gcc/4.7.0/msp430/lib/ -isystem /usr/local/Cellar/msp430-gcc/4.7.0/msp430/include -isystem /usr/local/Cellar/msp430-gcc/4.7.0/msp430/sys-include    accepts -g... yes
checking for /private/tmp/msp430-gcc20151020-38772-h11hf8/gcc-4.7.0/build/./gcc/xgcc -B/private/tmp/msp430-gcc20151020-38772-h11hf8/gcc-4.7.0/build/./gcc/ -B/usr/local/Cellar/msp430-gcc/4.7.0/msp430/bin/ -B/usr/local/Cellar/msp430-gcc/4.7.0/msp430/lib/ -isystem /usr/local/Cellar/msp430-gcc/4.7.0/msp430/include -isystem /usr/local/Cellar/msp430-gcc/4.7.0/msp430/sys-include    option to accept ISO C89... unsupported
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/private/tmp/msp430-gcc20151020-38772-h11hf8/gcc-4.7.0/build/msp430/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make: *** [all] Error 2

Unlinking libiberty fails

Line 41 in msp430-gcc.rb fails to execute because macOS has a fake gcc at /usr/bin/gcc that is actually just Clang. I'm not sure what exactly that piece was needed for or if it's still a problem, but you may want to find a different way to get that value.

Just a thought, as homebrew is a macOS platform, you may be working harder than necessary to use --print-multi-os-directory for that step.

binutils issue

not sure what is happening

$ brew install msp430-libc
==> Installing dependencies for msp430-libc: msp430-binutils, msp430-gcc, msp430-m
==> Installing msp430-libc dependency: msp430-binutils
==> Downloading http://ftpmirror.gnu.org/binutils/binutils-2.21.1a.tar.bz2

################################################################## 100.0%

==> Downloading http://sourceforge.net/projects/mspgcc/files/mspgcc/mspgcc-20120406.tar.bz2

################################################################## 100.0%

==> Downloading msp430-binutils-2.21.1a-20120406.patch

curl: (6) Could not resolve host: msp430-binutils-2.21.1a-20120406.patch
Error: Failed to download resource "msp430-binutils--patch"
Download failed: msp430-binutils-2.21.1a-20120406.patch

msp430-binutils forces linking

for building msp430-gcc you are forced to link msp430-binutils but this is a problem if you already have binutils installed.
It would be much better if msp430-binutils would be keg_only.

msp430-gcc does not compile on yosemite

$ brew install msp430-libc

give the following error:

==> ../configure --target=msp430 --enable-languages=c,c++ --program-prefix='msp430-' --prefix=/usr/local/Cellar/msp430-g
==> make
checking for suffix of object files... configure: error: in /private/tmp/msp430-gcc20150331-75858-1ubybp9/gcc-4.7.0/build/msp430/libgcc': configure: error: cannot compute suffix of object files: cannot compile Seeconfig.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make: *** [all] Error 2

My Mac is running up to date yosemite and xtools.

Any idea what might be causing this?

libiberty.a no such file or directory

I had a problem, with the File.unlink as my libiberty.a was not in a subfolder x86_64.

/usr/local/Library/Taps/sampsyo/homebrew-mspgcc/msp430-gcc.rb:51:in `unlink'
Errno::ENOENT: No such file or directory - /usr/local/Cellar/msp430-gcc/4.7.0/lib/x86_64/libiberty.a

The patch in larsimmisch/homebrew-avr@8cc2a2e would check for that (using gcc) but my gcc does not have the option --print-multi-os-dir so this is only a workaround.

      if File.exists?("#{prefix}/lib/x86_64/libiberty.a")
        File.unlink "#{prefix}/lib/x86_64/libiberty.a"
      else
        File.unlink "#{prefix}/lib/libiberty.a"
      end

binutils does not compile in OS X 10.10.1

$ brew install msp430-gcc
==> Installing msp430-gcc from sampsyo/homebrew-mspgcc
==> Installing msp430-gcc dependency: msp430-binutils
==> Downloading http://ftpmirror.gnu.org/binutils/binutils-2.21.1a.tar.bz2
######################################################################## 100.0%
Error: wrong number of arguments (0 for 3)
Please report this bug:
    http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formula.rb:31:in `initialize'
/usr/local/Library/Taps/sampsyo/homebrew-mspgcc/msp430-binutils.rb:15:in `new'
/usr/local/Library/Taps/sampsyo/homebrew-mspgcc/msp430-binutils.rb:15:in `patches'
/usr/local/Library/Homebrew/formula.rb:629:in `patch'
/usr/local/Library/Homebrew/formula.rb:281:in `block in brew'
/usr/local/Library/Homebrew/formula.rb:623:in `block in stage'
/usr/local/Library/Homebrew/resource.rb:66:in `block in unpack'
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in `mktemp'
/usr/local/Library/Homebrew/resource.rb:63:in `unpack'
/usr/local/Library/Homebrew/resource.rb:56:in `stage'
/usr/local/Library/Homebrew/formula.rb:621:in `stage'
/usr/local/Library/Homebrew/formula.rb:279:in `brew'
/usr/local/Library/Homebrew/build.rb:117:in `install'
/usr/local/Library/Homebrew/build.rb:186:in `<main>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.