Home

Porting Kit

The KwikNet Porting Kit makes it simple for you to port the KwikNet TCP/IP Stack to the environment of your choice, allowing you to add networking features to your products with a minimum of time and expense.

KwikNet Porting Kit Examples
Using the KwikNet Porting Kit
RTOS Porting Assistance
Supported Software Development Tools
Additional Materials

  Features

Supports multitasking or single threaded operation
Can be used with or without an RTOS
Minimal RTOS requirements when used with an RTOS
Flexible memory allocation methods
Separate OS interface
Separate C compiler interface
Allows in-line assembly of time critical operations
Separate board interface for interrupt handling
Ready for use with Microsoft NMAKE or Borland MAKE
No make file editing required
Four examples ready to use
Support for many commonly used toolsets included
Windows® based KwikNet Configuration Builder


  KwikNet Porting Kit Examples

There are few KwikNet files which will require modification. Four sets of files are provided, each set offering a complete KwikNet port using a particular RT/OS, target processor and software toolset.

The following examples, two of which are fully functional, are provided with the KwikNet Porting Kit:

MSDOS MS-DOS, PC hardware, Microsoft tools
DOS4GW DOS/4GW, PC hardware, WATCOM tools
XRTOS Custom RTOS, 68xxx/ColdFire, Mentor Graphics tools
XOS Custom single threaded OS, 68xxx/ColdFire, Mentor Graphics tools

The MSDOS example illustrates the use of KwikNet with stand-alone MS-DOS operating in real mode on PC compatible hardware. This single threaded example is ready to use with MS-DOS with very little change.

The DOS4GW example illustrates the use of KwikNet with stand-alone MS-DOS operating in protected mode on PC compatible hardware with the Tenberry DOS/4GW DOS Extender. This single threaded example is ready to use with MS-DOS and DOS/4GW with very little change.

The last two examples are for use with custom KwikNet ports.

If you are using a commercial multitasking RTOS (not AMX) or an in-house RTOS, start with the XRTOS example. This example assumes that an RTOS is available with the task, semaphore and timing features required by KwikNet for multitasking operation.

If you are using your own single threaded OS or if you are operating without an OS of any kind, start with the XOS example.


  Using the KwikNet Porting Kit

The KwikNet TCP/IP Stack is a compact, reliable, high performance TCP/IP stack, well suited for use in embedded networking applications. KwikNet is best used with a real-time operating system (RTOS) such as KADAK's AMX Real-Time Multitasking Kernel. However, KwikNet can be used in single threaded systems without an RTOS. Designing and implementing an application which requires a TCP/IP stack will always be easier if you start with some form of underlying operating system, even if it is of the crudest form.

The KwikNet Porting Kit allows you to port KwikNet to the operating environment of your choice. You pick the target processor, the software development tools and the multitasking RTOS or single threaded OS. The term RT/OS is used to refer to any operating system (OS), be it a multitasking RTOS or a single threaded OS.

Although porting KwikNet to your environment is a fairly straight-forward process, it is still not trivial. KADAK has used its extensive knowledge of target processors and software development tools and their quirks to simplify the steps which must be followed for a successful port. Since KwikNet is already available for use with KADAK's AMX kernel, you know that KwikNet has been tested on many target processors with a number of different compilers.

KwikNet is connected to your RT/OS by an OS Interface Module, a C file containing procedures which provide access to the services of your particular RT/OS. This module is incorporated into the KwikNet Library so that it is always available for use by your application. A separate board driver connects KwikNet, its device drivers and your OS Interface Module to your target hardware in an RT/OS independent manner. You must edit these modules to meet the requirements of your particular RT/OS and target hardware.

The Porting Kit also includes an application OS interface, a C module used by KADAK to provide a standard interface between your RT/OS and the sample programs (applications) provided with KwikNet and its options. If you port the KwikNet sample programs (and it is recommended that you do so), you will have to edit this module to adapt it for use with your RT/OS. You will probably find that portions of the code in this module can, with very little adaptation, also be used by your own application.

The separation of the portable KwikNet components into the OS Interface Module, the application OS interface and the board driver will meet most porting needs. However, you are free to adapt these interfaces to meet your RT/OS needs and to accommodate the constraints imposed by your software development tools. As long as the functional requirements are met, the services can be provided in any module of your choice.

To adapt KwikNet for your use, you will need a make utility capable of running your C compiler, object librarian (archiver) and link/locate utility. Three porting kit modules will require modification to adapt the make process to accommodate your software development tools.

Your custom KwikNet Library is created from the KwikNet Network Parameter File, a text file describing the TCP/IP features and options which your application requires. This file is created and edited using the KwikNet Configuration Builder provided with the KwikNet TCP/IP Stack.

The KwikNet Configuration Builder uses the information in your Network Parameter File to generate a Network Library Make File. This make file is suitable for use with either Borland's MAKE or Microsoft's NMAKE utility. The make file purposely avoids constructs and directives that tend to vary among make utilities. Hence, you should have little difficulty using this make file with your own make utility if you so choose.

The make utility uses your C compiler and object librarian to generate the KwikNet Library from the KwikNet source modules and your OS Interface Module.

There are several custom adaptations which must be made for the construction process to succeed. All KwikNet C files include a KwikNet compiler configuration header file. This file must be edited to identify the characteristics of your C compiler. This file is also used to optimize code sequences within KwikNet modules by taking advantage of compiler specific features such as in-line code, assembly language functions and C library macros or functions. Fortunately, a number of variants of this module are provided with the KwikNet Porting Kit ready for use with popular compilers on a variety of target processors.

Your custom OS Interface Module is included in the KwikNet Library. This is the module which connects KwikNet to your RT/OS. You must specify the make dependencies and rules which control the compilation of its source file. These make specifications are provided in the OS Interface Make File which the make process automatically includes. This is the only file which you must edit to adapt the make process to support your RT/OS interface.

As you would probably expect, the make file does not know how to run your C compiler and object librarian. You must provide this information in a file, called a tailoring file, which the make process automatically includes. This file is used to tailor the library construction process to accommodate your make utility's syntax for implicit rules. It also provides the command sequences necessary to invoke your C compiler and object librarian. The KwikNet Porting Kit is shipped with a number of tailoring files ready for use with many popular compilers using either Borland's MAKE or Microsoft's NMAKE utility.

For a complete description of the process just described, you can download the KwikNet Porting Kit User's Guide.


  RTOS Porting Assistance

The KwikNet Porting Kit includes an example of how to port KwikNet for use with the real-time operating system (RTOS) of your choice. KADAK can provide you with a prototype for the KwikNet OS Interface Module required to connect KwikNet to any of the following commercially available RTOS implementations:

CMX from CMX Systems, Inc.
SMX from Micro Digital, Inc.
ThreadX from Express Logic, Inc.
uC/OS from Jean Labrosse
VxWorks from Wind River

KADAK will provide you with any of these prototype OS interfaces free of charge, provided that you agree to return your modified copy of the interface to KADAK and permit KADAK to offer it free of charge, modified or not, to others.

Each of these prototype RTOS interfaces uses features documented by the RTOS vendor to implement the services required by KwikNet. In each case, KADAK has created an RTOS header file which provides the RTOS function prototypes specified by the vendor's publicly available documentation. It is expected that you will replace this artificial header file with those provided with the RTOS.

Unfortunately, interrupt exception servicing is completely dependent upon the processor architecture. That may explain why little (if any) exception servicing information is publicly available from the RTOS vendors. The KwikNet Porting Kit tries to circumvent these difficulties by providing a general purpose interface through which KwikNet's interrupt driven serial and Ethernet device drivers can meet the processor's exception servicing requirements in a manner compatible with the RTOS interrupt handling specification.

Two functions in the prototype RTOS interface will require modification by you to service device interrupts in a hardware and RTOS compatible manner. These functions install and remove hooks to KwikNet device driver interrupt service procedures. If the RTOS provides interrupt dispatching services, the KwikNet functions will be very simple to implement.


  Supported Software Development Tools

The KwikNet Porting Kit includes support for the following commonly used software development tools:

80x86 Microsoft 16-bit Visual C/C++ (real mode)
80x86 Borland 16-bit C/C++ (real mode)
80x86 Paradigm Systems 16-bit C/C++ (real mode)
80x86 WATCOM (Sybase) 16-bit C/C++ (real mode)
80x86 Microsoft 32-bit Visual C/C++ (protected mode)
80x86 Borland 32-bit Visual C/C++ (protected mode)
80x86 MetaWare 32-bit High C/C++ (protected mode)
80x86 Paradigm Systems 32-bit C/C++ (protected mode)
80x86 WATCOM (Sybase) 32-bit C/C++ (protected mode)
68000 Diab-SDS C/C++
68000 Mentor Graphics (Microtec) C/C++
68000 Metrowerks C/C++
68000 Tasking (Intermetrics) C/C++
ColdFire Diab-SDS C/C++
ColdFire Metrowerks C/C++
PowerPC Diab-SDS C/C++
PowerPC MetaWare High C/C++
PowerPC Metrowerks C/C++
ARM/Thumb ARM Ltd. C/C++
ARM/Thumb MetaWare High C/C++
MIPS32 MetaWare High C/C++
Blackfin Analog Devices C/C++


  Additional Materials

Be sure to read the comprehensive KwikNet booklet. It provides an excellent overview of KwikNet, a summary of the network protocols which it supports and a list of the available device drivers.
 
You can also download the various guides which make up the complete KwikNet Reference Manual. The KwikNet User's Guide describes the basic TCP/IP stack and its use. Other guides are available for each of the network protocols supported by KwikNet. The KwikNet Device Driver Technical Reference describes the steps to be followed to create a custom device driver from the templates provided with KwikNet.
 
A separate KwikNet Porting Kit User's Guide describes the porting procedure to be followed to adapt KwikNet for use with your target processor, your software tools and your RTOS or single-threaded OS.
 
The KwikNet TCP/IP Stack includes a Configuration Manager, a Windows® utility which is used to tailor KwikNet to meet your particular networking needs. Download the manager and see for yourself just how easy it is to adapt KwikNet for your application.


Copyright © 1996-2007

















































RTOS
TCP/IP
Graphics
File System
License
Showcase
Manuals
Demos
Support
What's New
Press
Newsletters
White Papers
Tools
Alliances
Dealers
Contractors
Site Map
Company
Support
Home
FAQ
Get Info