Microchip TCP/IP Stack v3.75.6

Contents
Download zip file (1143KB)



Building the code image

To build the code image you must have installed Microchip's MPLAB IDE (version 7.61 or later), MPLAB C18 Compiler (version 3.12 or later) if you are using a PIC18 part or MPLAB C30 Compiler (version 3.01 or later) if you are using a PIC24 or dsPIC part.

After you are done with the configuration of the stack you must include in your MPLAB IDE project the correct linker script file (if a different processor than the existing one in the project will be used).

For MPLAB C18 you have to use the Overlay storage class and Large data model (all RAM banks). These two options are selected in the Projects->Build Options->Project menu and MPLAB C18 tab, Categories General and Memory Model.

For 16-bit devices, certain parts of the code may use the UART interface as stdout for functions like printf(), this feature requires setting some heap memory, for example 100 bytes, this option is set in the Projects->Build Options->Project menu and MPLAB LINK30 tab.

In this version the header files for the main code and different modules are distributed in separate include directories, then for both compilers it is necessary to include those directories in the "search path". The directories you must include in the search path are " src", "../src" and " ../../src". This is done in the Projects->Build Options-> Project menu, Directories tab and "Show directories for: Include Serach Path".

The dialog window should look like the one shown in Figure 1 below.


Figure 1
[Click on the image for a larger view]

The linker directory includes several script files for various processors compatible with the boards/designs included in this version.

If in the config.h file you enabled the HTTP server module and storage on program memory MPFS_USE_PGRM), previously to build the image, you must first generate a "C language image" source file using the MPFS.EXE utility using the /c option, move the output C file to the main source directory, include it in the project Source file list and edit it to replace the line that has the #include "..\Include\Compiler.h" by #include "include/config.h".

The current distribution includes a C source code image of the sample website in the file mpfsimg.c in the main source directory.

To build your project just use the make or build functions on MPLAB IDE.

If there are some missing configuration options or errors the compiler will stop and show the error on the output screen.

If you use any of the existing MPLAB IDE project files to build the code image, the project options are set in a way that all objects will be stored under the obj subdirectory for each module and the binary files, cof and map files will be stored in the bin directory.

The project files also assume that the C18 compiler is installed in the C:\MCC18 directory and the C30 compiler in the C:\MPLAB C30, if your install path is different you will need to change the language tool suite directories accordingly.

Use your preferred PIC programmer to download the image to the microcontroller program memory.

While it is recommended to use the MPLAB IDE, C18 and C30 versions mentioned before, the code should compile with previous versions.

MPLAB IDE must not be prior to 7.41 to support the include search path, C18 not prior to 3.02 and C30 3.00. Be aware that some device specific features may not be present or supported in earlier versions of the tools and the latest releases include fixes associated with several devices that can be used to run the TCP/IP Stack.




   
    ©2006-2008, Jorge Amodio, All rights reserved

Last Update: July 15, 2007