http://www.ethernut.de/nutwiki/index.php?title=Documents/Development_on_Debian_Sarge&feed=atom&action=historyDocuments/Development on Debian Sarge - Revision history2024-03-29T00:53:45ZRevision history for this page on the wikiMediaWiki 1.26.2http://www.ethernut.de/nutwiki/index.php?title=Documents/Development_on_Debian_Sarge&diff=422&oldid=prevHarald: /* Nut/OS Development on Debian Sarge [Logo] */2017-07-13T14:11:11Z<p><span dir="auto"><span class="autocomment">Nut/OS Development on Debian Sarge <a href="/nutwiki/index.php/File:Debian-logo.png" title="File:Debian-logo.png">[Logo</a>]</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 14:11, 13 July 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><div id="content"></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><div id="content"></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>= Nut/OS Development on Debian Sarge [[File:<del class="diffchange diffchange-inline">debian-logo</del>.png|[Logo]]] =</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>= Nut/OS Development on Debian Sarge [[File:<ins class="diffchange diffchange-inline">debianlogo</ins>.png|[Logo]]] =</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
</table>Haraldhttp://www.ethernut.de/nutwiki/index.php?title=Documents/Development_on_Debian_Sarge&diff=419&oldid=prevHarald: /* Nut/OS Development on Debian Sarge [Logo] */2017-07-13T14:05:46Z<p><span dir="auto"><span class="autocomment">Nut/OS Development on Debian Sarge [[File:../../img/debian-logo.png|[Logo]]]</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 14:05, 13 July 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><div id="content"></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><div id="content"></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>= Nut/OS Development on Debian Sarge [[File:<del class="diffchange diffchange-inline">../../img/</del>debian-logo.png|[Logo]]] =</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>= Nut/OS Development on Debian Sarge [[File:debian-logo.png|[Logo]]] =</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
</table>Haraldhttp://www.ethernut.de/nutwiki/index.php?title=Documents/Development_on_Debian_Sarge&diff=322&oldid=prevHarald: /* Nut/OS Development on Debian Sarge [Logo] */2017-07-13T07:25:37Z<p><span dir="auto"><span class="autocomment">Nut/OS Development on Debian Sarge [[File:../../img/debian-logo.png|[Logo]]]</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 07:25, 13 July 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l6" >Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>'''THIS DOCUMENT IS OUTDATED. A more recent version is available [[<del class="diffchange diffchange-inline">debian.html</del>|here]].'''<br /></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>'''THIS DOCUMENT IS OUTDATED. A more recent version is available [[<ins class="diffchange diffchange-inline">Documents/Development on Debian</ins>|here]].'''<br /></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><br /></div></td></tr>
</table>Haraldhttp://www.ethernut.de/nutwiki/index.php?title=Documents/Development_on_Debian_Sarge&diff=321&oldid=prevHarald: Created page with "<div id="content"> = Nut/OS Development on Debian Sarge [Logo] = <br /> <br /> <br /> '''THIS DOCUMENT IS OUTDATED. A more recent version..."2017-07-13T07:24:56Z<p>Created page with "<div id="content"> = Nut/OS Development on Debian Sarge [[File:../../img/debian-logo.png|[Logo]]] = <br /> <br /> <br /> '''THIS DOCUMENT IS OUTDATED. A more recent version..."</p>
<p><b>New page</b></p><div><div id="content"><br />
<br />
= Nut/OS Development on Debian Sarge [[File:../../img/debian-logo.png|[Logo]]] =<br />
<br />
<br /><br />
<br /><br />
<br /><br />
'''THIS DOCUMENT IS OUTDATED. A more recent version is available [[debian.html|here]].'''<br /><br />
<br /><br />
<br /><br />
<br /><br />
<br /><br />
<br />
<br />
Currently there's no up-to-date package available for Debian. Thus, you need to build the Nut/OS Development Environment from the source package. Most required minimum versions of all required tools may not be available in the Debian stable tree. We generally used testing, but be warned, that mixing stable and testing releases on your system may introduce unforeseen problems.<br />
<br />
You have the choice to build..<br />
<br />
* ...the full installation including the Nut/OS Configurator GUI or<br />
* ...the command line installation including the Nut/OS Configurator command line tool or<br />
* ...the minimal installation without the Nut/OS Configurator<br />
<br />
Both versions of the Configurator, the GUI type and the command line tool require Lua, an extension programming language. The GUI version additionally requires GTK+ and wxWidgets, a cross-platform C++ GUI framework.<br />
<br />
You can also choose to include or exclude the API Documentation from the build process. This documentation is created from comment lines within the source files by using Doxygen and GraphViz.<br />
<br />
It's recommended to try the full installation first. If it fails for some reason, you may step down to a less complete installation.<br />
<br />
== Full Installation ==<br />
<br />
=== GNU Compiler Collection ===<br />
<br />
First check, that at least the following versions of the GNU Compilers are available.<br />
<br />
<pre class="coding">$ gcc --version<br />
gcc (GCC) 3.3.5<br />
$ g++ --version<br />
g++ (GCC) 3.3.5 <br />
</pre><br />
Previous versions may work, but haven't been tested.<br />
=== GNU Autotools ===<br />
<br />
Next you need to make sure to have the current version of the GNU autotools installed.<br />
<br />
<pre class="coding">$ autoconf --version<br />
autoconf (GNU Autoconf) 2.59<br />
$ automake --version<br />
automake (GNU automake) 1.9.5<br />
</pre><br />
To upgrade, use<br />
<pre class="coding">$ apt-get install autoconf<br />
1 http://ftp.de.debian.org testing/main autoconf 2.59a-3 [381kB]<br />
</pre><br />
and<br />
<pre class="coding">$ apt-get install automake1.9<br />
1 http://ftp.de.debian.org testing/main autotools-dev 20050422.1 [55,9kB]<br />
2 http://ftp.de.debian.org testing/main automake1.9 1.9.5-1 [505kB]<br />
</pre><br />
=== GTK+ Development Package ===<br />
<br />
As mentioned above, the Configurator's GUI is based on wxWidgets, which uses GTK+ on Linux systems. Use<br />
<br />
<pre class="coding">$ apt-get install libgtk2.0-dev<br />
1 http://ftp.de.debian.org testing/main libglib2.0-dev 2.6.4-1 [469kB]<br />
2 http://ftp.de.debian.org testing/main libatk1.0-dev 1.8.0-4 [95,4kB]<br />
3 http://ftp.de.debian.org testing/main libexpat1-dev 1.95.8-3 [126kB]<br />
4 http://ftp.de.debian.org testing/main zlib1g-dev 1:1.2.2-4 [488kB]<br />
5 http://ftp.de.debian.org testing/main libfreetype6-dev 2.1.7-2.4 [695kB]<br />
6 http://ftp.de.debian.org testing/main libfontconfig1-dev 2.3.1-2 [398kB]<br />
7 http://ftp.de.debian.org testing/main x-dev 4.3.0.dfsg.1-12 [213kB]<br />
8 http://ftp.de.debian.org testing/main libxext-dev 4.3.0.dfsg.1-12.0.1 [244kB]<br />
9 http://ftp.de.debian.org testing/main libxi-dev 4.3.0.dfsg.1-12.0.1 [228kB]<br />
10 http://ftp.de.debian.org testing/main libxv-dev 4.3.0.dfsg.1-12.0.1 [187kB]<br />
11 http://ftp.de.debian.org testing/main xlibs-static-dev 4.3.0.dfsg.1-12.0.1 [851kB]<br />
12 http://ftp.de.debian.org testing/main libx11-dev 4.3.0.dfsg.1-12.0.1 [1355kB]<br />
13 http://ftp.de.debian.org testing/main render-dev 0.8-4 [25,1kB]<br />
14 http://ftp.de.debian.org testing/main libxrender-dev 0.8.3-7 [28,2kB]<br />
15 http://ftp.de.debian.org testing/main libxft-dev 2.1.7-1 [66,3kB]<br />
16 http://ftp.de.debian.org testing/main libpango1.0-dev 1.8.1-1 [284kB]<br />
17 http://ftp.de.debian.org testing/main libgtk2.0-dev 2.6.4-1 [7235kB]<br />
</pre><br />
to install the development package of the GTK+ 2.0 library. At least on our system a large number of additional packages are installed or replaced.<br />
=== wxWidgets Libraries ===<br />
<br />
Now we are ready to install wxWidgets. At the time of this writing there was no Debian package available. Thus we install it from the sources. Download wxGTK-2.8.0.tar.gz from [http://www.wxwidgets.org/ www.wxwidgets.org] and<br />
<br />
<pre class="coding">$ tar xzf wxGTK-2.8.0.tar.gz<br />
$ cd wxGTK-2.8.0/<br />
$ mkdir build-gtk2-ansi-static<br />
$ cd build/<br />
$ ../configure --disable-shared<br />
Configured wxWidgets 2.8.0 for `i686-pc-linux-gnu'<br />
<br />
Which GUI toolkit should wxWidgets use? GTK+ 2<br />
Should wxWidgets be compiled into single library? no<br />
Should wxWidgets be compiled in debug mode? no<br />
Should wxWidgets be linked as a shared library? no<br />
Should wxWidgets be compiled in Unicode mode? no<br />
What level of wxWidgets compatibility should be enabled?<br />
wxWidgets 2.4 no<br />
wxWidgets 2.6 yes<br />
Which libraries should wxWidgets use?<br />
jpeg builtin<br />
png builtin<br />
regex sys<br />
tiff builtin<br />
zlib sys<br />
odbc no<br />
expat sys<br />
libmspack no<br />
sdl no<br />
gnomeprint no<br />
</pre><br />
Due to several problems with shared libraries we prefer to build the static ones only. Anyway, shared libraries may work for you. Now type<br />
<pre class="coding">$ make<br />
...lots of output lines, finally ending with...<br />
ranlib lib/libwx_gtk2_xrc-2.8.a<br />
(test -d utils/wxrc &amp;&amp; cd utils/wxrc &amp;&amp; make all) || true<br />
make[1]: Entering directory `/home/harald/wxGTK-2.8.0/build/utils/wxrc'<br />
../.././bk-deps g++ -c -o wxrc_wxrc.o -D__WXGTK__ -I../../../utils/wxrc -DwxUSE_GUI=0 \<br />
-DGTK_NO_CHECK_CASTS -I../../lib/wx/include/gtk2-ansi-release-static-2.8 \<br />
-I../../../include -DXTHREADS -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include \<br />
-I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 \<br />
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES \<br />
-D_LARGEFILE_SOURCE=1 -O2 -pthread -Wall -Wno-ctor-dtor-privacy ../../../utils/wxrc/wxrc.cpp<br />
g++ -o wxrc wxrc_wxrc.o -pthread -L/usr/X11R6/lib -L../../lib -lwx_base_xml-2.8 \<br />
-lexpat -lwx_base-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -pthread -L/usr/X11R6/lib \<br />
-lz -ldl -lm<br />
make[1]: Leaving directory `/home/harald/wxGTK-2.8.0/build/utils/wxrc'<br />
</pre><br />
and, as root<br />
<pre class="coding"># make install<br />
...after some output the result is...<br />
------------------------------------------------------<br />
<br />
The installation of wxWidgets is finished. On certain<br />
platforms (e.g. Linux) you'll now have to run ldconfig<br />
if you installed a shared library and also modify the<br />
LD_LIBRARY_PATH (or equivalent) environment variable.<br />
<br />
wxWidgets comes with no guarantees and doesn't claim<br />
to be suitable for any purpose.<br />
<br />
Read the wxWidgets Licence on licencing conditions.<br />
<br />
------------------------------------------------------<br />
</pre><br />
To check the installtion, try<br />
<br />
<pre class="coding">$ cd samples<br />
$ make<br />
$ cd aui<br />
$ ./auidemo<br />
</pre><br />
The last command should open a sample application window with dockable toolbars. This means the wxWidgets installation is working.<br />
=== Lua Language ===<br />
<br />
In the next step we are going to install the Lua language, which is used later by the Nut/OS Configurator to parse the configuration files. Although there may be readily build binary packages, it is recommended to build from the source. Download lua-5.0.2.tar.gz from [http://www.lua.org www.lua.org] and<br />
<br />
<pre class="coding">$ gzip -d downloads/lua-5.0.2.tar.gz<br />
$ tar xf downloads/lua-5.0.2.tar<br />
$ cd lua-5.0.2/ <br />
</pre><br />
The Lua source archive doesn't provide a configure script. Instead it comes with a prepared Makefile, which includes a file named config. This file allows to modify several build options. On our system the original file worked fine, but you may at least have a look to the contents. To build the Lua tools and libraries, type<br />
<pre class="coding">$ make<br />
</pre><br />
and, after it finished without error, become a root user and type<br />
<pre class="coding"># make install<br />
...<br />
cp bin/* /usr/local/bin<br />
cp include/*.h /usr/local/include<br />
cp lib/*.a /usr/local/lib<br />
cp doc/*.1 /usr/local/man/man1<br />
</pre><br />
=== Doxygen And GraphViz ===<br />
<br />
The Nut/OS API Documentation will be build automatically from the source code. For this we need to install<br />
<br />
* Doxygen 1.4.1 or later<br />
* GraphViz 2.2.1 or later<br />
<br />
Luckily, Debian binary packages are available.<br />
<pre class="coding">$ apt-get install doxygen doxygen-doc graphviz<br />
1 http://ftp.de.debian.org testing/main doxygen 1.4.2-3 [1349kB]<br />
2 http://ftp.de.debian.org testing/main doxygen-doc 1.4.2-3 [1100kB]<br />
3 http://ftp.de.debian.org testing/main graphviz 2.2.1-1 [971kB]<br />
</pre><br />
On Windows we have had several problems with all Doxygen versions above 1.4.1, but nothing really important. Some duplicate entries may be created or the structure of the contents may not appear as intended. In general all versions upto 1.4.4 create a usable documentation.<br />
=== Installing Nut/OS ===<br />
<br />
No we got everything on our system to install the Nut/OS source package. Well, in fact the AVR or ARM toolchain is missing to build the Nut/OS libraries and sample applications. But these are build later with the Nut/OS Configurator and therefore the platform specific toolchains are not yet required.<br />
<br />
Download ethernut-4.3.1.tar.bz2 from http://www.ethernut.de and<br />
<br />
<pre class="coding">$ bzip2 -d ethernut-4.3.1.tar.bz2<br />
$ tar xf ethernut-4.3.1.tar.bz2<br />
$ cd ethernut-4.3.1/<br />
$ ./configure<br />
====================================================================<br />
Your Nut/OS development environment has been configured.<br />
After running make and make install, you may...<br />
... run nutconf or nutconfigure to set up a Nut/OS build tree.<br />
... or run ./nutsetup to set up the environment for building<br />
Nut/OS in the source tree.<br />
====================================================================<br />
</pre><br />
The next command will take a quite long time to finish.<br />
<br />
<pre class="coding">$ make<br />
...after a long time...<br />
g++ -g -O2 -o nutconf nutconf-nutconf.o nutcomponent.o nutconf-appoptdlg.o \<br />
nutconf-bldoptdlg.o nutconf-configitem.o nutconf-configtree.o nutconf-enumeditctrl.o \<br />
nutconf-iconinfo.o nutconf-iconlist.o nutconf-infowindow.o nutconf-inteditctrl.o \<br />
nutconf-mainframe.o nutconf-nutconfdoc.o nutconf-nutconfhint.o nutconf-nutconfview.o \<br />
nutconf-propertylist.o nutconf-repoptdlg.o nutconf-scrolledtree.o nutconf-settings.o \<br />
nutconf-settingsdlg.o nutconf-splitscroll.o nutconf-texteditctrl.o nutconf-tooloptdlg.o \<br />
nutconf-treecomp.o nutconf-treeitemdata.o nutconf-utils.o nutconf-valuewindow.o \<br />
-llua -llualib -L/usr/local/lib -pthread -L/usr/X11R6/lib /usr/local/lib/libwx_gtk2_xrc-2.8.a \<br />
/usr/local/lib/libwx_gtk2_qa-2.8.a /usr/local/lib/libwx_gtk2_html-2.8.a \<br />
/usr/local/lib/libwx_gtk2_adv-2.8.a /usr/local/lib/libwx_gtk2_core-2.8.a \<br />
/usr/local/lib/libwx_base_xml-2.8.a /usr/local/lib/libwx_base_net-2.8.a \<br />
/usr/local/lib/libwx_base-2.8.a -Wl,--export-dynamic -pthread -lgtk-x11-2.0 \<br />
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 \<br />
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lexpat \<br />
-lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -ldl -lm<br />
</pre><br />
Now change to the root user and type<br />
<pre class="coding">$ make install<br />
</pre><br />
This should install the three executables<br />
* crurom, UROM file system creator<br />
* nutconfigure, Nut/OS Configurator for the command line<br />
* nutconf, full fledged Nut/OS Configurator GUI<br />
<br />
in /usr/local/bin/.<br />
=== Building Nut/OS ===<br />
<br />
As a final step we have to install the proper GCC toolchain to cross compile Nut/OS libraries and applications on Linux.<br />
<br />
For the AVR platform use<br />
<br />
<pre class="coding">$ apt-get install gcc-avr<br />
1 http://ftp.de.debian.org testing/main binutils-avr 2.15-3 [2336kB]<br />
2 http://ftp.de.debian.org testing/main gcc-avr 1:3.4.3-2 [3170kB]<br />
$ apt-get install avr-libc<br />
1 http://ftp.de.debian.org testing/main avr-libc 1:1.2.3-3 [1298kB]<br />
</pre><br />
Now you should be able to run the Configurator<br />
<pre class="coding">$ cd ~/ethernut-4.3.1/ <br />
$ nutconf <br />
</pre><br />
and follow the [[../../pdf/enswm28e.pdf|Nut/OS Software Manual]] to build Nut/OS and the related sample applications.<br />
== Installation With Command Line Tools Only ==<br />
<br />
In case you experience problems with GTK+ or wxWidgets, or simply refuse to use GUI tools for building embedded applications, you can install a reduced version. Beside GUI gimmicks, you won't miss anything.<br />
<br />
Install the same packages as described in the full installation, except<br />
<br />
* GTK+ Development Package<br />
* wxWidgets Libraries<br />
<br />
After downloading and unpacking ethernut-4.3.1.tar.bz2, configure the package with an additional option.<br />
<br />
<pre class="coding">$ cd ethernut-4.3.1/<br />
$ ./configure --disable-nutconf-gui<br />
$ make<br />
$ make install<br />
</pre><br />
Now you can consult the [[../../pdf/enswm28e.pdf|Nut/OS Software Manual]] about how to build the Nut/OS libraries and sample applications. Except, the GUI Configurator will not be available and separate build trees or sample directories have to be created on the command line.<br />
<br />
=== Using nutconfigure ===<br />
<br />
To create a build tree for Ethernut 1.3 Rev-G, you may use<br />
<br />
<pre class="coding">$ cd ethernut-4.3.1/<br />
$ nutconfigure -bnutbld-13g-gcc -cnut/conf/ethernut13g.conf -lnutbld-13g-gcc/lib \<br />
-mavr-gcc create-buildtree<br />
</pre><br />
This will read the configuration file nut/conf/ethernut13g.conf, create a new directory nutbld-13g-gcc/ with all required Makefiles and specify nutbld-13g-gcc/lib/ as the target directory for the libraries. Now change to the build tree and use make to build the libraries for Ethernut 1.3.<br />
<pre class="coding">$ cd nutbld-13g-gcc/<br />
$ make install<br />
</pre><br />
In case you want to build another set of libraries for the GameBoy Advance, use<br />
<br />
<pre class="coding">$ cd ethernut-4.3.1/<br />
$ nutconfigure -bnutbld-gba-gcc -cnut/conf/gbaxport2.conf -lnutbld-gba-gcc/lib \<br />
-marm-gcc create-buildtree<br />
$ cd nutbld-gba-gcc/<br />
$ make install<br />
</pre><br />
In order to create an application tree for the Ethernut 1.3 board, which uses the libraries from the build tree created previously, use<br />
<br />
<pre class="coding">$ nutconfigure -anutapp-13g-gcc -b../../nutbld-13g-gcc -cnut/conf/ethernut13g.conf \<br />
-lnutbld-13g-gcc/lib -mavr-gcc create-apptree<br />
$ echo &quot;# Ethernut 1.3&quot; &gt;nutapp-13g-gcc/UserConf.mk<br />
</pre><br />
The second command is required to destroy the default UserConf.mk. That's because nutconfigure will create one for Ethernut 2 by default. These board versions are equipped with different Ethernet Controller Chips and applications are typically build for one specific chip only to save program space.<br />
The [[../../pdf/enswm28e.pdf|Nut/OS Software Manual]] will further explain how to build a few sample applications and run them on Ethernut or any other compatible hardware.<br />
<br />
== Minimum Installation ==<br />
<br />
Some people experience problems with installing Lua, which is also required by the command line based Configurator. You still need<br />
<br />
* GNU Compiler Collection 3.3.5 or above<br />
* AVR or ARM Toolchain<br />
* Doxygen 1.4.1 and GraphViz 2.2.1 or later<br />
<br />
To completely exclude the Configurator, configure Nut/OS with<br />
<pre class="coding">$ cd ethernut-4.3.1/<br />
$ ./configure --disable-nutconf-tools<br />
$ make<br />
$ make install<br />
</pre><br />
This will still build the crurom utility and the API documentation. In case of problems with Doxygen or GraphViz, the latter can be excluded from the build as well:<br />
<pre class="coding">$ cd ethernut-4.3.1/<br />
$ ./configure --disable-nutconf-tools --disable-html-docs<br />
$ make<br />
$ make install<br />
</pre><br />
The latest release of the API documentation is also available online at www.ethernut.de.<br />
With the minimum installation it is quite difficult to create your Nut/OS libraries in a separate build tree. As long as you are developing for a specific single target, this is no big loss though. You can still build Nut/OS libraries in the source tree.<br />
<br />
<pre class="coding">$ cd ethernut-4.3.1/nut/<br />
$ ./nutsetup<br />
</pre><br />
The nutsetup script will create a file named UserConf.mk used by make and will create a link of Makedefs, Makerules, app/Makedefs and app/Makerules to the platform specific files. For the AVR platform the link will point to Makedefs.avr-gcc, Makerules.avr-gcc, app/Makedefs.avr-gcc and app(Makerules.avr-gcc resp. For the Nut/OS emulation on the UNIX, it will also create a few additional header files in include/. Now type<br />
<pre class="coding">$ cd lib/<br />
$ make install<br />
</pre><br />
The last command will build all required Nut/OS libraries in a platform specific subdirectory of lib/. You can finally change to one of the subdirectories in app/ and create one of the sample applications.<br />
<pre class="coding">$ cd ethernut-4.3.1/nut/app/httpd<br />
$ make<br />
</pre><br />
Several applications, like the one chosen here, require the crurom utility. This is a quite simple application. Even if the whole Nut/OS configuration fails somehow, you should be able to create this tool manually. You'll find the sources in tools/crurom.<br />
== Getting Nut/OS From CVS ==<br />
<br />
Instead of downloading the source package, you may retrieve the latest updates from the CVS repository.<br />
<br />
<pre class="coding">$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ethernut login<br />
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ethernut co nut</pre><br />
Simply press enter when prompted for a password.<br />
The CVS repository will not contain files, which can be created locally. This is also true for some default files used by automake. Thus, after checking out the module for the first time, enter<br />
<br />
<pre class="coding">$ automake --add-missing</pre><br />
A script named reconf had been prepared to run the autotools. Run it.<br />
<pre class="coding">$ ./reconf</pre><br />
We are now ready to configure, make and install the Nut/OS development environment.<br />
<br />
<pre class="coding">$ ./configure<br />
$ make<br />
$ make install</pre><br />
== Related Links ==<br />
<br />
[http://www.ethernut.de/nutwiki NutWiki]<br /><br />
Contains a collection of links.<br />
<br />
[http://packages.debian.org/testing/devel Debian Packages]<br /><br />
Devel section of Debian software packages in the testing distribution.<br />
<br />
<br /><br />
<br /><br />
<br />
Good luck,<br /><br />
Harald Kipp<br /><br />
Herne, 5th of August 2005<br />
<br />
<br />
</div></div>Harald