This shows how to setup the Contiki toolchain in a freshly installed Ubuntu 13.04.
1. Run this command in terminal so that the URLs point to the right repositories
(older repos are moved to archive server):
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g'
/etc/apt/sources.list
sudo apt-get update
2. Install the following packages:
sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc
binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-7-jdk openjdk-7-jre ant libncurses5-dev doxygen git
This will allow you to cross-compile for MSP430- and AVR-platforms.
3. Clone the Contiki sources from Github:
git clone --recursive git://github.com/contiki-os/contiki.git contiki
And you should be good to go.
4. You can test your setup by compiling and running the hello-world-example as follows:
cd contiki/examples/hello-world
make TARGET=native hello-world
./hello-world.native
The last command should result in an output like this:
Contiki-2.6-584-g807293a started
Rime started with address 2.1
MAC nullmac RDC nullrdc NETWORK Rime
Hello, world
Setup contiki toolchain in ubuntu 13.04
最新推荐文章于 2024-08-12 21:51:32 发布