Main Page Modules Alphabetical List Data Structures File List Data Fields Globals Related Pages Examples
The first decision that has to be made, is to select the development platform you want to use. The commercial ImageCraft Compiler offers an advanced IDE and is the first choice of most professional developers using a Windows PC. The GNU compiler AVR-GCC is available for Linux and Windows (WinAVR).
- Open a command line window.
- Change to the Nut/OS installation directory.
- Make sure, that your compiler's bin directory is include in the PATH.
- Execute configure.
In order to start with your own Embedded Ethernet Application, take one of the samples like TCPS and add some modifications. Then recompile and link it with the Nut/OS library by using the prepared Makefile for the GNU compiler or simply press the "Build" button of the ImageCraft IDE. The ImageCraft IDE comes with an integrated tool to upload the resulting binary into your Ethernut Board. The GNU archive provides a command line utility named usip, which takes over this task. Also note, that Ethernut applications are linked to the Nut/OS operating system and its TCP/IP Stack. The resulting binary file contains all three parts, the application, Nut/OS and Nut/Net. The advantage is, that only those parts of the operating system are included, which your application really needs, leaving more room for application code.
Using the ImageCraft IDE.
The ImageCraft IDE should be used for your application code only. Compiling the Nut/OS libraries requires a command line environment (see next section).
Executing configure as described above copies all Nut/OS libraries to the ImageCraft library directory.
Before creating Nut/OS applications, you have to enter some special settings in the ImageCraft Project. On the first page of the Compiler Options Dialog you need to add the Nut/OS include file path. Note, that the path of your ImageCraft directory may differ.
..\..\include\;C:\icc\include\
On the last page you must add the following additional libs.
nutpro nutnet nutfs nutos nutdev nutcrt
On the same page enter
-ucrtnut.o c:\icc\lib\nutinit.o
in the field named Other Options. Again, your path to the ImageCraft directory may differ. Please refer to the ICCAVR Online Manuals for further assistance.
Command Line Environment for ICCAVR
In case you avoid IDEs in general or if you want to make your own modifications to Nut/OS libraries, then you must use a shell, also known as the DOS window or command line.
Change to the Nut/OS installation directory and make sure, that your PATH includes the ICCAVR bin directory.
To rebuild the complete library, enter
followed by
All Nut/OS and Nut/Net libraries should compile and link without problem and will be copied to the Nut/OS lib directory. The configure tool will then copy these libraries to the ImageCraft lib directory.
Get yourself familiar with the GNU make utility.
Most applications written for AVR-GCC will not run properly when compiled by ICCAVR. Specifically the macro PSTR() will not work with ICCAVR. For porting, refer to the samples in subdirectory appicc.
Command Line Environment for AVR-GCC
Open a shell and change to the directory, which contains your application source code. Make sure, that your PATH includes the AVRGCC bin directory. WinAVR users must include two directories in their path.
SET PATH=C:\WinAVR\bin;C:\WinAVR\utils\bin;%PATH%
To build you application's hex file, simply enter
If you are using uisp for uploading the hex file to the target system, you can enter
This will build your application and, if successful, automatically program your target.
To rebuild the complete Nut/OS library, change to the Nut/OS installation directory and enter
followed by
If successful, the new libraries will be copied to the Nut/OS lib directory.
© 2000-2003 by egnite Software GmbH -
visit http://www.ethernut.de/