Skip to content

Programming Environment Setup

brianstarnes edited this page Feb 4, 2015 · 21 revisions

Linux (Ubuntu)

Install toolchain:

sudo apt-get install python-pystache libprotobuf-dev python-protobuf 
                     protobuf-compiler freetype* screen netcat

Download the GNU ARM compiler package for your OS from https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q3-update. Unpack it with tar using something like tar -xvf gcc-arm-none-eabi-*. You'll need to update your path to include the path to the /bin directory within that directory you just unpacked.

Install Pygame 1.9.2 (from source for now). Note that ffmpeg is no longer widely available. You can leave it out of the list of packages to install without problems since the model-t doesn't use this functionality.

Eclipse (optional)

Windows

  1. GNU Tools for ARM Embedded Processors latest version
  2. Python 2.7
  3. pygame 1.9.2
  4. pystache
  5. Python-protobufs
  6. Cygwin including the following packages:
  • Make (gcc)
  • Google protobufs (libprotobuf-devel)
  • screen
  • PGrep (procps)
  • Netcat (nc)
  • git
  1. Eclipse (optional)

OS X

  1. GNU Tools for ARM Embedded Processors
  2. Python Items
  • brew install python && brew link python
  • brew install libpng SDL_image
  • pip install hg+http://bitbucket.org/pygame/pygame
  • pip install pystache
  • pip install pyprotobuf
  1. Protobuf stuff
  • brew install protobuf

If the build fails with an error about an image not being a Windows BMP then you need to troubleshoot getting pygame to use extended image formats. This may require installing the PIL python package with pip install PIL --allow-external PIL and removing and re-adding pygame through pip so that it gets rebuilt.

If the build fails with the error about not being able to import descriptor_pb2 then take a look at this discussion on StackOverflow, specifically the answer that discusses downloading the protobuf source and running the python setup build, test, and install to create the pb2.

Dependencies

<MODEL_T_BUILD_DIR>
|-- model-t
|-- ChibiOS-RT
|-- nanopb
|-- brewbit-protobuf-messages
  • Alternatively, you can edit deps.mk and point to your dependencies.