Skip to content

Ubuntu ARM build environment from scratch

Attilio Donà edited this page Apr 17, 2016 · 12 revisions

ARM dev setup for Ubuntu (14.04)

After a fresh installation of Ubuntu upgrade the system:

> sudo apt-get update
> sudo apt-get upgrade

If you notice the error:

loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache

take the following steps:

> sudo apt-get install libgdk-pixbuf2.0-dev
> sudo su
# gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache

a suggested but not mandatory option is to install the synaptic package manager

> sudo apt-get install synaptic

Tools

Install git:

> sudo apt-get install git

Set python 3 as default interpreter:

> alias python=python3 (optional, just for running python scripts from shell)
> sudo apt-get install python3-pip
> sudo pip3 install pyaml
> sudo pip3 install pyserial

pyaml is needed for reading mocks.yml files for removing mocked modules at link phase.

Install minicom:

> sudo apt-get install minicom

TDD tools

Install cmock:

> git clone --recursive https://github.com/throwtheswitch/cmock.git

Clone protobuf from github, extract and follow the README instructions:

> ./autogen.sh
> ./configure
> make
> make check
> sudo make install
> sudo ldconfig
> cd python
> python3 setup.py build
> python3 setup.py test
> sudo python3 setup.py install

For the embedded side clone protoc-c, build and install:

> ./autogen.sh
> ./configure
> make
> sudo make install

ruby

This steps are extracted from https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04:

Install prerequisites

> sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev


> cd
> git clone git://github.com/sstephenson/rbenv.git .rbenv
> echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
> echo 'eval "$(rbenv init -)"' >> ~/.bashrc

> git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
> echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
> source ~/.bashrc

As the user that will be using Ruby, install it with these commands:

> rbenv install -v 2.3.0
> rbenv global 2.3.0

gcc cross compiler

For installing arm-gcc follow these instructions:

Step1: Inside Ubuntu, open a terminal and input "sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa"

Step2: Continue to input "sudo apt-get update"

Step3: Continue to input to install toolchain "sudo apt-get install gcc-arm-embedded"

openocd

> sudo apt-get install libtool autoconf texinfo libusb-dev libusb-1.0.0-dev
> git clone https://github.com/daniel-k/openocd.git
> cd openocd
> git checkout riot_patched
> ./bootstrap
> ./configure
> sudo make install

Energia

Download latest energia binary and extract in /opt and follow Setup Energia on Linux instructions:

# download 71-ti-permissions.rules
> mv 71-ti-permissions.rules /etc/udev/rules.d/
> sudo service udev restart
> sudo usermod -a -G dialout <user_id>

After adding dialout group logout and login again.

Eclipse

Eclipse needs java:

> sudo add-apt-repository ppa:webupd8team/java
> sudo apt-get update
> sudo apt-get install oracle-java8-installer

Download and extract Eclipse IDE for C/C++ Developers

Clone this wiki locally