Detailed Description
The project configuration is done in the
projdefs.h file. It contains a list of defines that configure the project at compilation.
It is
very important not to do any project specific configuration in the TCP/IP stack files (
net folder), but only in the
projdefs.h file. This will simplify updating to newer versions of the Modtronix TCP/IP stack in the future. To update to a newer version of the Modtronix TCP/IP, all that should be done is replacing the files contained in the
net folder with the newer ones.
The following section describes how to configure modules included in this project
- Appcfg: For details on configuring the Appcfg module click here
- DHCP: For details on configuring the DHCP module click here
- DNS: For details on configuring the DNS module click here
- FTP: For details on configuring the FTP module click here
- HTTP: For details on configuring the HTTP module click here
- IP: For details on configuring the IP module click here
- LCD: For details on configuring the LCD module click here
- MAC: For details on configuring the MAC (Ethernet) module click here
- NetBIOS: For details on configuring the NetBIOS module click here
- Serint: For details on configuring the Interrupt driven serial module click here
- UDP: For details on configuring the UDP module click here
- TCP: For details on configuring the TCP module click here
The following section describes how to configure general parameter contained in this project
Include this define in the code to compiled the program to be uploaded to a device that has the
Modtronix Network Bootloader installed on it. By doing this, this project will be compiled with the correct start of program address and interrupt vector addresses. For further info in the Modtronix Network Bootloader, click
here.
The following compiler specific modifications have to be made:
- For HiTech compiler, remove "-A800h" option from linker
- For MPLAB C18 compiler, configure 18f6621.lkr file
Configure the PIC's internal clock.
Configures if debug information is written out onto the serial port. For the production version of this project, this define should NOT be defined.
Debug Configuration. When uncommenting any of the following line, remember to uncomment a debug implementation in
debug.h. For example, uncommend
busser1.h and link busser1.c with project.
For details, see
Debugging module.
Defines the Modtronix SBC board that this code is compiled for. Possible defines are:
- BRD_SBC44EC
- BRD_SBC45EC
- BRD_SBC65EC
- BRD_SBC68EC This define is often defined in the MPLAB project file.
#define EEPROM_CONTROL (n)
This value is for Microchip 24LC256 - 256kb serial EEPROM
Uncomment if stack is to use ICMP. For details see
ICMP.
#define STACK_USE_HTTP_SERVER
Uncomment if stack is to have a HTTP server. This is usually the case, and this define is usually included. For details see
HTTP Server.
Uncomment if stack should implement the SLIP protocol. For details see
SLIP.
#define STACK_USE_IP_GLEANING
Uncomment if stack should implement IP Gleaning. For details see
IP Gleaning.
Uncomment if stack should implement the DHCP protocol. For details see
DHCP.
#define STACK_USE_FTP_SERVER
Uncomment if stack should implement a FTP server. For details see
FTP.
#define STACK_USE_SNMP_SERVER
Uncomment if stack should implement the SNMP protocol.
#define STACK_USE_TFTP_CLIENT
Uncomment if stack should implement a TFTP client
Uncomment if stack should implement SMTP
This define is automatically enabled/disabled based on high-level module selections. If you need them with your custom application, enable it here. Uncomment if stack should implement the TCP protocol. For details see
TCP.
This define is automatically enabled/disabled based on high-level module selections. If you need them with your custom application, enable it here. Uncomment if stack should implement the UDP protocol. For details see
UDP.
Uncomment if stack should implement NBNS
Uncomment if stack should implement DNS
#define STACK_CLIENT_MODE
Uncomment following line if this stack will be used in CLIENT mode. In CLIENT mode, some functions specific to client operation are enabled.
#define MY_DEFAULT_IP_ADDR_BYTE1 (n)
#define MY_DEFAULT_IP_ADDR_BYTE2 (n)
#define MY_DEFAULT_IP_ADDR_BYTE3 (n)
#define MY_DEFAULT_IP_ADDR_BYTE4 (n)
Use these defines to define the default IP address of the device.
#define MY_STATIC_IP_BYTE1 (n)
#define MY_STATIC_IP_BYTE2 (n)
#define MY_STATIC_IP_BYTE3 (n)
#define MY_STATIC_IP_BYTE4 (n)
Use these defines to define the default static IP address that is used if no DHCP server is found.
#define MY_DEFAULT_MASK_BYTE1 (n)
#define MY_DEFAULT_MASK_BYTE2 (n)
#define MY_DEFAULT_MASK_BYTE3 (n)
#define MY_DEFAULT_MASK_BYTE4 (n)
#define MY_DEFAULT_GATE_BYTE1 (n)
#define MY_DEFAULT_GATE_BYTE2 (n)
#define MY_DEFAULT_GATE_BYTE3 (n)
#define MY_DEFAULT_GATE_BYTE4 (n)
#define MY_DEFAULT_MAC_BYTE1 (n)
#define MY_DEFAULT_MAC_BYTE2 (n)
#define MY_DEFAULT_MAC_BYTE3 (n)
#define MY_DEFAULT_MAC_BYTE4 (n)
#define MY_DEFAULT_MAC_BYTE5 (n)
#define MY_DEFAULT_MAC_BYTE6 (n)
Use these defines to define the default Mask, Gateway and Ethernet MAC address of this device.
#define MY_DEFAULT_DNS_BYTE1 (n)
#define MY_DEFAULT_DNS_BYTE2 (n)
#define MY_DEFAULT_DNS_BYTE3 (n)
#define MY_DEFAULT_DNS_BYTE4 (n)
Use these defines to define the default Primary DNS server IP address.
Number of available TCP sockets to be created. Note that each socket consumes 34 bytes of RAM.
TCP configurations
To minimize page update, match number of sockets and HTTP connections with different page sources in a page. For example, if page contains reference to 3 more pages, browser may try to open 4 simultaneous HTTP connections, and to minimize browser delay, set HTTP connections to 4, MAX_SOCKETS to 4. If you are using ICMP or other applications, you should keep at least one socket available for them.
Number of available UDP sockets to be created.
Maximum numbers of simultaneous HTTP connections allowed. Each connection consumes 10 bytes.
Configures if debug information is written out onto the serial port. For the production version of this project, this define should NOT be defined.
Debug Configuration. When uncommenting any of the following line, remember to uncomment a debug implementation in
debug.h. For example, uncommend
serint.h and link serint.c with project.
For details, see
Debugging module.