Nut/OS installation on Linux (Debain)
Contents
Test Environments
Linux | wxWidgets | Lua | Nut/OS | GCC | Autoconf | Automake |
Ubuntu 8.04.2 | 2.8 | 5.0.3 | 2.6.4 | 4.2.4 | 2.61 | 1.10 |
Description
On this page you will learn how to setup the Nut/OS configurator and software Nut/OS depends on, on a Debian Linux machine.
The Nut/OS configurator is essential for developing and testing Nut/OS applications.
You have the choice to install different options of the development environment. For example an additional tool called Discoverer or several debugging solutions are available. As this is a quickstart guide, we will concentrate on the essential tools and packages. For a more detailed tutorial on all available options, please have a look at Nut/OS Development on Debian as well as the entire Documents section of ethernut.de.
We will install the software in the following order:
- build-essentials (Linux C compiler etc.)
- wxWidgets
- Lua
- Nut/OS
- Cross Toolchains
Everything in this guide will happen in the Linux shell (Konsole).
All major topics are also covered in screencasts:
- 16px Screencast Part 1 build-essentials
- 16px Screencast Part 2 wxWidgets
- 16px Screencast Part 3 Lua
- 16px Screencast Part 4 Nut/OS
build-essentials
In this section we will install:
- build-essentials
- C compiler 4.1 or later
- Autoconf 2.61
- Automake 1.10
Most Debian distributions offer to install all basic tools for building Linux applications in one step:
sudo apt-get install build-essential
If the package "build-essential" is not available to you, you may install or upgrade gcc and g++ by:
sudo apt-get install gcc g++
Next you need to make sure to have a recent version of the GNU autotools installed.
autoconf --version
autoconf (GNU Autoconf) 2.61
automake --version
automake (GNU automake) 1.10
To install or upgrade, use:
sudo apt-get install automake autoconf
wxWidgets
In this section we will install:
- wxWidgets 2.8 or later
You can either get the binary packages or build wxWidgets from the source code. The latter is required to build the Nut/OS Discoverer and is featured in Nut/OS Development on Debian.
To install the binary packages, use:
sudo apt-get install libwxgtk2.8-0 libwxgtk2.8-dev wx2.8-headers wx-common
Lua
In this section we will install:
- Lua 5.0
Whether any later version may work hasn't been tested yet.
The following command installs the necessary packages:
sudo apt-get install lua50 liblua50 liblua50-dev liblualib50 liblualib50-dev
If no binary package is available for your Linux distribution, you can build Lua from the source. See Nut/OS Development on Debian
Nut/OS
Now we got everything on our Linux system to install the Nut/OS source package. Well, in fact the AVR or ARM toolchains are missing to build the Nut/OS libraries and sample applications. But this is done later (see Description) with the Nut/OS Configurator and therefore the platform specific cross toolchains are not yet required.
Thus, there is no binary package, we will build Nut/OS from sources.
It is highly recommended to create a project directory first and then download the latest ethernut-x.y.z.tar.bz2 from the download section into this directory.
mkdir ~/ethernut cd ~/ethernut
Now we download the latest Nut/OS version for Linux and store it in the folder just created. You can do this with your browser or by:
The next step is to unpack the downloaded archive by:
tar xjf ethernut-4.6.5.tar.bz2
We may later upgrade to a new version or we may concurrently work with different versions. Thus, it is most convenient to create a symbolic link 'nut' reffering on 'ethernut-4.6.5' :
ln -s ethernut-4.6.5 nut
Now, change to 'nut', which will actually give us access to the content of the ethernut-4.6.4 folder:
cd nut/
No it is time to start the configure script, to prepare the building process:
./configure
You will get an output. Please check especially if these lines state 'enabled':
configure: nutconf tools enabled configure: nutconfgui is enabled
If they do not, the Nut/OS configurator or it's Graphical User Interface will not get built! Please consult other help documents in this case.
The next command will build tools and documentation and will take several minutes to finish.
make
Finally:
sudo make install
Cross Toolchains
Depending on your board you may proceed with either
- GNU AVR toolchain installation on Linux (Debian) for: Ethernut 1.3 ; Ethernut 2.1
or
- GNU arm-elf toolchain installation on Linux (Debian) for: Ethernut 3.0 ; Elektor Internet Radio
External Links
[1] Nut/OS Development on Debian: A more comprehensive Installation Guide
[2] ethernut.de documents section
[3] Ethernut Software Manual (November 2005)