Index: /webserver/example/EasyWEB/easyweb.c =================================================================== --- /webserver/example/EasyWEB/easyweb.c (revision 9) +++ /webserver/example/EasyWEB/easyweb.c (revision 9) @@ -0,0 +1,156 @@ +/****************************************************************** + ***** ***** + ***** Name: easyweb.c ***** + ***** Ver.: 1.0 ***** + ***** Date: 07/05/2001 ***** + ***** Auth: Andreas Dannenberg ***** + ***** HTWK Leipzig ***** + ***** university of applied sciences ***** + ***** Germany ***** + ***** Func: implements a dynamic HTTP-server by using ***** + ***** the easyWEB-API ***** + ***** ***** + ******************************************************************/ + +#include +#include +#include + +#define extern // Keil: Line added for modular project management + +#include "easyweb.h" +#include "EMAC.h" // Ethernet packet driver +#include "tcpip.h" // easyWEB TCP/IP stack +#include // Keil: Register definition file for LPC2368 +#include "webpage.h" // webside for our HTTP server (HTML) + + +//void main(void) +int main(void) +{ + TCPLowLevelInit(); + + /* Start of Config ADC */ + PCONP |= (1<<12); // Power-On Clock Control of ADC + PINSEL1 &= 0xFFFF3FFF; // Reset Pin Config P0[23] + PINSEL1 |= 0x00004000; // Config P0[23] = AD0 + /* End of Config ADC */ + + HTTPStatus = 0; // clear HTTP-server's flag register + TCPLocalPort = TCP_PORT_HTTP; // set port we want to listen to + + while (1) // repeat forever + { + if (!(SocketStatus & SOCK_ACTIVE)) TCPPassiveOpen(); // listen for incoming TCP-connection + DoNetworkStuff(); // handle network and easyWEB-stack + // events + HTTPServer(); + } +} + +// This function implements a very simple dynamic HTTP-server. +// It waits until connected, then sends a HTTP-header and the +// HTML-code stored in memory. Before sending, it replaces +// some special strings with dynamic values. +// NOTE: For strings crossing page boundaries, replacing will +// not work. In this case, simply add some extra lines +// (e.g. CR and LFs) to the HTML-code. + +void HTTPServer(void) +{ + if (SocketStatus & SOCK_CONNECTED) // check if somebody has connected to our TCP + { + if (SocketStatus & SOCK_DATA_AVAILABLE) // check if remote TCP sent data + TCPReleaseRxBuffer(); // and throw it away + + if (SocketStatus & SOCK_TX_BUF_RELEASED) // check if buffer is free for TX + { + if (!(HTTPStatus & HTTP_SEND_PAGE)) // init byte-counter and pointer to webside + { // if called the 1st time + HTTPBytesToSend = sizeof(WebSide) - 1; // get HTML length, ignore trailing zero + PWebSide = (unsigned char *)WebSide; // pointer to HTML-code + } + + if (HTTPBytesToSend > MAX_TCP_TX_DATA_SIZE) // transmit a segment of MAX_SIZE + { + if (!(HTTPStatus & HTTP_SEND_PAGE)) // 1st time, include HTTP-header + { + memcpy(TCP_TX_BUF, GetResponse, sizeof(GetResponse) - 1); + memcpy(TCP_TX_BUF + sizeof(GetResponse) - 1, PWebSide, MAX_TCP_TX_DATA_SIZE - sizeof(GetResponse) + 1); + HTTPBytesToSend -= MAX_TCP_TX_DATA_SIZE - sizeof(GetResponse) + 1; + PWebSide += MAX_TCP_TX_DATA_SIZE - sizeof(GetResponse) + 1; + } + else + { + memcpy(TCP_TX_BUF, PWebSide, MAX_TCP_TX_DATA_SIZE); + HTTPBytesToSend -= MAX_TCP_TX_DATA_SIZE; + PWebSide += MAX_TCP_TX_DATA_SIZE; + } + + TCPTxDataCount = MAX_TCP_TX_DATA_SIZE; // bytes to xfer + InsertDynamicValues(); // exchange some strings... + TCPTransmitTxBuffer(); // xfer buffer + } + else if (HTTPBytesToSend) // transmit leftover bytes + { + memcpy(TCP_TX_BUF, PWebSide, HTTPBytesToSend); + TCPTxDataCount = HTTPBytesToSend; // bytes to xfer + InsertDynamicValues(); // exchange some strings... + TCPTransmitTxBuffer(); // send last segment + TCPClose(); // and close connection + HTTPBytesToSend = 0; // all data sent + } + + HTTPStatus |= HTTP_SEND_PAGE; // ok, 1st loop executed + } + } + else + { + HTTPStatus &= ~HTTP_SEND_PAGE; // reset help-flag if not connected + } +} + +unsigned int GetAD0Val(void) +{ + unsigned int val; + + AD0CR = 0x01000001 | 0x002E0400; // Setup A/D: 10-bit AIN0 @ 3MHz + do + { + val = AD0GDR; // Read A/D Data Register + } while ((val & 0x80000000) == 0); // Wait for end of A/D Conversion + AD0CR &= ~0x01000001; // Stop A/D Conversion + val = (val >> 6) & 0x03FF; // Extract AIN0 Value + return(val / 10); // result of A/D process +} + +// searches the TX-buffer for special strings and replaces them +// with dynamic values (AD-converter results) + +void InsertDynamicValues(void) +{ + unsigned char *Key; + char NewKey[5]; + unsigned int i; + + if (TCPTxDataCount < 4) return; // there can't be any special string + + Key = TCP_TX_BUF; + + for (i = 0; i < (TCPTxDataCount - 3); i++) + { + if (*Key == 'A') + if (*(Key + 1) == 'D') + if (*(Key + 3) == '%') + switch (*(Key + 2)) + { + case '0' : // "AD0%"? + { + sprintf(NewKey, "%3u", GetAD0Val()); // insert AD converter value + memcpy(Key, NewKey, 3); // AD0(P0[23]) + break; + } + } + Key++; + } +} Index: /webserver/example/EasyWEB/Abstract.txt =================================================================== --- /webserver/example/EasyWEB/Abstract.txt (revision 9) +++ /webserver/example/EasyWEB/Abstract.txt (revision 9) @@ -0,0 +1,28 @@ +This tiny web server was taken from the 'Design & Elektronik' +extra issue 'Embedded Internet'. It can be downloaded from the +following web site: www.elektroniknet.de/extraheft. + +This software was adapted to work with a "CP-JR ARM7 LPC2368" board and +the Keil RV ARM C-Compiler with as few modifications as possible. + +Note that modifications are not optimal, because ARM is a 32-bit +machine while the original software was written for 16-bit cpu. + +The web page shows the values of one analog inputs (AN0:(P0[23]). +This tiny webserver needs very little resources and therefore has +some restrictions: +- only one active TCP session at any one time +- no support for fragmented IP datagrams +- no buffer for TCP datagrams received in wrong order +- only one web page. No GIF/JPG graphics possible. + +The IP address can be modified in the module tcpip.h to +fit into your existing LAN (see MYIP_x). +Please order the extra issue 'Embedded Internet' of the +'Design & Elektronik' magazine for a technical description. +It is only available in German language. + +The easyWEB project is set up for one target: + +LPC2368: Settings for "CP-JR ARM7 LPC2368" Board. + Program code is loaded into on-chip flash Index: /webserver/example/EasyWEB/LPC2300.s =================================================================== --- /webserver/example/EasyWEB/LPC2300.s (revision 9) +++ /webserver/example/EasyWEB/LPC2300.s (revision 9) @@ -0,0 +1,528 @@ +;/*****************************************************************************/ +;/* LPC2300.S: Startup file for Philips LPC2300/LPC2400 device series */ +;/*****************************************************************************/ +;/* <<< Use Configuration Wizard in Context Menu >>> */ +;/*****************************************************************************/ +;/* This file is part of the uVision/ARM development tools. */ +;/* Copyright (c) 2007 Keil - An ARM Company. All rights reserved. */ +;/* This software may only be used under the terms of a valid, current, */ +;/* end user licence from KEIL for a compatible version of KEIL software */ +;/* development tools. Nothing else gives you the right to use this software. */ +;/*****************************************************************************/ + + +;/* +; * The LPC2300.S code is executed after CPU Reset. This file may be +; * translated with the following SET symbols. In uVision these SET +; * symbols are entered under Options - ASM - Define. +; * +; * REMAP: when set the startup code initializes the register MEMMAP +; * which overwrites the settings of the CPU configuration pins. The +; * startup and interrupt vectors are remapped from: +; * 0x00000000 default setting (not remapped) +; * 0x40000000 when RAM_MODE is used +; * +; * RAM_MODE: when set the device is configured for code execution +; * from on-chip RAM starting at address 0x40000000. +; */ + + +; Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs + +Mode_USR EQU 0x10 +Mode_FIQ EQU 0x11 +Mode_IRQ EQU 0x12 +Mode_SVC EQU 0x13 +Mode_ABT EQU 0x17 +Mode_UND EQU 0x1B +Mode_SYS EQU 0x1F + +I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled +F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled + + +;// Stack Configuration (Stack Sizes in Bytes) +;// Undefined Mode <0x0-0xFFFFFFFF:8> +;// Supervisor Mode <0x0-0xFFFFFFFF:8> +;// Abort Mode <0x0-0xFFFFFFFF:8> +;// Fast Interrupt Mode <0x0-0xFFFFFFFF:8> +;// Interrupt Mode <0x0-0xFFFFFFFF:8> +;// User/System Mode <0x0-0xFFFFFFFF:8> +;// + +UND_Stack_Size EQU 0x00000000 +SVC_Stack_Size EQU 0x00000008 +ABT_Stack_Size EQU 0x00000000 +FIQ_Stack_Size EQU 0x00000000 +IRQ_Stack_Size EQU 0x00000100 +USR_Stack_Size EQU 0x00000400 + +ISR_Stack_Size EQU (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + \ + FIQ_Stack_Size + IRQ_Stack_Size) + + AREA STACK, NOINIT, READWRITE, ALIGN=3 + +Stack_Mem SPACE USR_Stack_Size +__initial_sp SPACE ISR_Stack_Size + +Stack_Top + + +;// Heap Configuration +;// Heap Size (in Bytes) <0x0-0xFFFFFFFF> +;// + +Heap_Size EQU 0x00000000 + + AREA HEAP, NOINIT, READWRITE, ALIGN=3 +__heap_base +Heap_Mem SPACE Heap_Size +__heap_limit + + +; System Control Block (SCB) Module Definitions +SCB_BASE EQU 0xE01FC000 ; SCB Base Address +PLLCON_OFS EQU 0x80 ; PLL Control Offset +PLLCFG_OFS EQU 0x84 ; PLL Configuration Offset +PLLSTAT_OFS EQU 0x88 ; PLL Status Offset +PLLFEED_OFS EQU 0x8C ; PLL Feed Offset +CCLKCFG_OFS EQU 0x104 ; CPU Clock Divider Reg Offset +USBCLKCFG_OFS EQU 0x108 ; USB Clock Divider Reg Offset +CLKSRCSEL_OFS EQU 0x10C ; Clock Source Select Reg Offset +SCS_OFS EQU 0x1A0 ; System Control and Status Reg Offset +PCLKSEL0_OFS EQU 0x1A8 ; Peripheral Clock Select Reg 0 Offset +PCLKSEL1_OFS EQU 0x1AC ; Peripheral Clock Select Reg 1 Offset + +; Constants +OSCRANGE EQU (1<<4) ; Oscillator Range Select +OSCEN EQU (1<<5) ; Main oscillator Enable +OSCSTAT EQU (1<<6) ; Main Oscillator Status +PLLCON_PLLE EQU (1<<0) ; PLL Enable +PLLCON_PLLC EQU (1<<1) ; PLL Connect +PLLSTAT_M EQU (0x7FFF<<0) ; PLL M Value +PLLSTAT_N EQU (0xFF<<16) ; PLL N Value +PLLSTAT_PLOCK EQU (1<<26) ; PLL Lock Status + +;// Clock Setup +;// System Controls and Status Register (SCS) +;// OSCRANGE: Main Oscillator Range Select +;// <0=> 1 MHz to 20 MHz +;// <1=> 15 MHz to 24 MHz +;// OSCEN: Main Oscillator Enable +;// +;// +;// +;// Clock Source Select Register (CLKSRCSEL) +;// CLKSRC: PLL Clock Source Selection +;// <0=> Internal RC oscillator +;// <1=> Main oscillator +;// <1=> RTC oscillator +;// +;// +;// PLL Configuration Register (PLLCFG) +;// PLL_clk = (2* M * PLL_clk_src) / N +;// MSEL: PLL Multiplier Selection +;// <1-32768><#-1> +;// M Value +;// NSEL: PLL Divider Selection +;// <1-256><#-1> +;// N Value +;// +;// +;// CPU Clock Configuration Register (CCLKCFG) +;// CCLKSEL: Divide Value for CPU Clock from PLL +;// <1-256><#-1> +;// +;// +;// USB Clock Configuration Register (USBCLKCFG) +;// USBSEL: Divide Value for USB Clock from PLL +;// <1-16><#-1> +;// +;// +;// Peripheral Clock Selection Register 0 (PCLKSEL0) +;// PCLK_WDT: Peripheral Clock Selection for WDT +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_TIMER0: Peripheral Clock Selection for TIMER0 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_TIMER1: Peripheral Clock Selection for TIMER1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_UART0: Peripheral Clock Selection for UART0 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_UART1: Peripheral Clock Selection for UART1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_PWM0: Peripheral Clock Selection for PWM0 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_PWM1: Peripheral Clock Selection for PWM1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_I2C0: Peripheral Clock Selection for I2C0 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_SPI: Peripheral Clock Selection for SPI +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_RTC: Peripheral Clock Selection for RTC +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_SSP1: Peripheral Clock Selection for SSP1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_DAC: Peripheral Clock Selection for DAC +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_ADC: Peripheral Clock Selection for ADC +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_CAN1: Peripheral Clock Selection for CAN1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 6 +;// PCLK_CAN2: Peripheral Clock Selection for CAN2 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 6 +;// PCLK_ACF: Peripheral Clock Selection for ACF +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 6 +;// +;// +;// Peripheral Clock Selection Register 1 (PCLKSEL1) +;// PCLK_BAT_RAM: Peripheral Clock Selection for the Battery Supported RAM +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_GPIO: Peripheral Clock Selection for GPIOs +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_PCB: Peripheral Clock Selection for Pin Connect Block +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_I2C1: Peripheral Clock Selection for I2C1 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_SSP0: Peripheral Clock Selection for SSP0 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_TIMER2: Peripheral Clock Selection for TIMER2 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_TIMER3: Peripheral Clock Selection for TIMER3 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_UART2: Peripheral Clock Selection for UART2 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_UART3: Peripheral Clock Selection for UART3 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_I2C2: Peripheral Clock Selection for I2C2 +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_I2S: Peripheral Clock Selection for I2S +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_MCI: Peripheral Clock Selection for MCI +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// PCLK_SYSCON: Peripheral Clock Selection for System Control Block +;// <0=> Pclk = Cclk / 4 +;// <1=> Pclk = Cclk +;// <2=> Pclk = Cclk / 2 +;// <3=> Pclk = Hclk / 8 +;// +;// +CLOCK_SETUP EQU 1 +SCS_Val EQU 0x00000020 +CLKSRCSEL_Val EQU 0x00000001 +PLLCFG_Val EQU 0x0000000B +CCLKCFG_Val EQU 0x00000005 +USBCLKCFG_Val EQU 0x00000005 +PCLKSEL0_Val EQU 0x00000000 +PCLKSEL1_Val EQU 0x00000000 + + +; Memory Accelerator Module (MAM) definitions +MAM_BASE EQU 0xE01FC000 ; MAM Base Address +MAMCR_OFS EQU 0x00 ; MAM Control Offset +MAMTIM_OFS EQU 0x04 ; MAM Timing Offset + +;// MAM Setup +;// MAM Control +;// <0=> Disabled +;// <1=> Partially Enabled +;// <2=> Fully Enabled +;// Mode +;// MAM Timing +;// <0=> Reserved <1=> 1 <2=> 2 <3=> 3 +;// <4=> 4 <5=> 5 <6=> 6 <7=> 7 +;// Fetch Cycles +;// +MAM_SETUP EQU 1 +MAMCR_Val EQU 0x00000002 +MAMTIM_Val EQU 0x00000004 + + +; Area Definition and Entry Point +; Startup Code must be linked first at Address at which it expects to run. + + AREA RESET, CODE, READONLY + ARM + + +; Exception Vectors +; Mapped to Address 0. +; Absolute addressing mode must be used. +; Dummy Handlers are implemented as infinite loops which can be modified. + +Vectors LDR PC, Reset_Addr + LDR PC, Undef_Addr + LDR PC, SWI_Addr + LDR PC, PAbt_Addr + LDR PC, DAbt_Addr + NOP ; Reserved Vector +; LDR PC, IRQ_Addr + LDR PC, [PC, #-0x0120] ; Vector from VicVectAddr + LDR PC, FIQ_Addr + +Reset_Addr DCD Reset_Handler +Undef_Addr DCD Undef_Handler +SWI_Addr DCD SWI_Handler +PAbt_Addr DCD PAbt_Handler +DAbt_Addr DCD DAbt_Handler + DCD 0 ; Reserved Address +IRQ_Addr DCD IRQ_Handler +FIQ_Addr DCD FIQ_Handler + +Undef_Handler B Undef_Handler +SWI_Handler B SWI_Handler +PAbt_Handler B PAbt_Handler +DAbt_Handler B DAbt_Handler +IRQ_Handler B IRQ_Handler +FIQ_Handler B FIQ_Handler + + +; Reset Handler + + EXPORT Reset_Handler +Reset_Handler + + +; Setup Clock + IF CLOCK_SETUP != 0 + LDR R0, =SCB_BASE + MOV R1, #0xAA + MOV R2, #0x55 + +; Configure and Enable PLL + LDR R3, =SCS_Val ; Enable main oscillator + STR R3, [R0, #SCS_OFS] + + IF (SCS_Val:AND:OSCEN) != 0 +OSC_Loop LDR R3, [R0, #SCS_OFS] ; Wait for main osc stabilize + ANDS R3, R3, #OSCSTAT + BEQ OSC_Loop + ENDIF + + LDR R3, =CLKSRCSEL_Val ; Select PLL source clock + STR R3, [R0, #CLKSRCSEL_OFS] + LDR R3, =PLLCFG_Val + STR R3, [R0, #PLLCFG_OFS] + STR R1, [R0, #PLLFEED_OFS] + STR R2, [R0, #PLLFEED_OFS] + MOV R3, #PLLCON_PLLE + STR R3, [R0, #PLLCON_OFS] + STR R1, [R0, #PLLFEED_OFS] + STR R2, [R0, #PLLFEED_OFS] + +; Wait until PLL Locked +PLL_Loop LDR R3, [R0, #PLLSTAT_OFS] + ANDS R3, R3, #PLLSTAT_PLOCK + BEQ PLL_Loop + +M_N_Lock LDR R3, [R0, #PLLSTAT_OFS] + LDR R4, =(PLLSTAT_M:OR:PLLSTAT_N) + AND R3, R3, R4 + LDR R4, =PLLCFG_Val + EORS R3, R3, R4 + BNE M_N_Lock + +; Setup CPU clock divider + MOV R3, #CCLKCFG_Val + STR R3, [R0, #CCLKCFG_OFS] + +; Setup USB clock divider + LDR R3, =USBCLKCFG_Val + STR R3, [R0, #USBCLKCFG_OFS] + +; Setup Peripheral Clock + LDR R3, =PCLKSEL0_Val + STR R3, [R0, #PCLKSEL0_OFS] + LDR R3, =PCLKSEL1_Val + STR R3, [R0, #PCLKSEL1_OFS] + +; Switch to PLL Clock + MOV R3, #(PLLCON_PLLE:OR:PLLCON_PLLC) + STR R3, [R0, #PLLCON_OFS] + STR R1, [R0, #PLLFEED_OFS] + STR R2, [R0, #PLLFEED_OFS] + ENDIF ; CLOCK_SETUP + + +; Setup MAM + IF MAM_SETUP != 0 + LDR R0, =MAM_BASE + MOV R1, #MAMTIM_Val + STR R1, [R0, #MAMTIM_OFS] + MOV R1, #MAMCR_Val + STR R1, [R0, #MAMCR_OFS] + ENDIF ; MAM_SETUP + + +; Memory Mapping (when Interrupt Vectors are in RAM) +MEMMAP EQU 0xE01FC040 ; Memory Mapping Control + IF :DEF:REMAP + LDR R0, =MEMMAP + IF :DEF:RAM_MODE + MOV R1, #2 + ELSE + MOV R1, #1 + ENDIF + STR R1, [R0] + ENDIF + + +; Initialise Interrupt System +; ... + + +; Setup Stack for each mode + + LDR R0, =Stack_Top + +; Enter Undefined Instruction Mode and set its Stack Pointer + MSR CPSR_c, #Mode_UND:OR:I_Bit:OR:F_Bit + MOV SP, R0 + SUB R0, R0, #UND_Stack_Size + +; Enter Abort Mode and set its Stack Pointer + MSR CPSR_c, #Mode_ABT:OR:I_Bit:OR:F_Bit + MOV SP, R0 + SUB R0, R0, #ABT_Stack_Size + +; Enter FIQ Mode and set its Stack Pointer + MSR CPSR_c, #Mode_FIQ:OR:I_Bit:OR:F_Bit + MOV SP, R0 + SUB R0, R0, #FIQ_Stack_Size + +; Enter IRQ Mode and set its Stack Pointer + MSR CPSR_c, #Mode_IRQ:OR:I_Bit:OR:F_Bit + MOV SP, R0 + SUB R0, R0, #IRQ_Stack_Size + +; Enter Supervisor Mode and set its Stack Pointer + MSR CPSR_c, #Mode_SVC:OR:I_Bit:OR:F_Bit + MOV SP, R0 + SUB R0, R0, #SVC_Stack_Size + +; Enter User Mode and set its Stack Pointer + MSR CPSR_c, #Mode_USR + IF :DEF:__MICROLIB + + EXPORT __initial_sp + + ELSE + + MOV SP, R0 + SUB SL, SP, #USR_Stack_Size + + ENDIF + + +; Enter the C code + + IMPORT __main + LDR R0, =__main + BX R0 + + + IF :DEF:__MICROLIB + + EXPORT __heap_base + EXPORT __heap_limit + + ELSE +; User Initial Stack & Heap + AREA |.text|, CODE, READONLY + + IMPORT __use_two_region_memory + EXPORT __user_initial_stackheap +__user_initial_stackheap + + LDR R0, = Heap_Mem + LDR R1, =(Stack_Mem + USR_Stack_Size) + LDR R2, = (Heap_Mem + Heap_Size) + LDR R3, = Stack_Mem + BX LR + ENDIF + + + END Index: /webserver/example/EasyWEB/easyweb.h =================================================================== --- /webserver/example/EasyWEB/easyweb.h (revision 9) +++ /webserver/example/EasyWEB/easyweb.h (revision 9) @@ -0,0 +1,35 @@ +/****************************************************************** + ***** ***** + ***** Name: easyweb.h ***** + ***** Ver.: 1.0 ***** + ***** Date: 07/05/2001 ***** + ***** Auth: Andreas Dannenberg ***** + ***** HTWK Leipzig ***** + ***** university of applied sciences ***** + ***** Germany ***** + ***** Func: header-file for easyweb.c ***** + ***** ***** + ******************************************************************/ + +#ifndef __EASYWEB_H +#define __EASYWEB_H + +const unsigned char GetResponse[] = // 1st thing our server sends to a client +{ + "HTTP/1.0 200 OK\r\n" // protocol ver 1.0, code 200, reason OK + "Content-Type: text/html\r\n" // type of data we want to send + "\r\n" // indicate end of HTTP-header +}; + +void InitOsc(void); // prototypes +void InitPorts(void); +void HTTPServer(void); +void InsertDynamicValues(void); +unsigned int GetAD0Val(void); +unsigned char *PWebSide; // pointer to webside +unsigned int HTTPBytesToSend; // bytes left to send +unsigned char HTTPStatus; // status byte +#define HTTP_SEND_PAGE 0x01 // help flag + +#endif + Index: /webserver/example/EasyWEB/EMAC.c =================================================================== --- /webserver/example/EasyWEB/EMAC.c (revision 9) +++ /webserver/example/EasyWEB/EMAC.c (revision 9) @@ -0,0 +1,381 @@ +/****************************************************************** + ***** ***** + ***** Name: cs8900.c ***** + ***** Ver.: 1.0 ***** + ***** Date: 07/05/2001 ***** + ***** Auth: Andreas Dannenberg ***** + ***** HTWK Leipzig ***** + ***** university of applied sciences ***** + ***** Germany ***** + ***** Func: ethernet packet-driver for use with LAN- ***** + ***** controller CS8900 from Crystal/Cirrus Logic ***** + ***** ***** + ***** Keil: Module modified for use with Philips ***** + ***** LPC2378 EMAC Ethernet controller ***** + ***** ***** + ******************************************************************/ + +#include "EMAC.h" +#include "tcpip.h" +#include + +static unsigned short *rptr; +static unsigned short *tptr; + +// Keil: function added to write PHY +void write_PHY (int PhyReg, int Value) +{ + unsigned int tout; + + MAC_MADR = DP83848C_DEF_ADR | PhyReg; + MAC_MWTD = Value; + + /* Wait utill operation completed */ + tout = 0; + for (tout = 0; tout < MII_WR_TOUT; tout++) { + if ((MAC_MIND & MIND_BUSY) == 0) { + break; + } + } +} + + +// Keil: function added to read PHY +unsigned short read_PHY (unsigned char PhyReg) +{ + unsigned int tout; + + MAC_MADR = DP83848C_DEF_ADR | PhyReg; + MAC_MCMD = MCMD_READ; + + /* Wait until operation completed */ + tout = 0; + for (tout = 0; tout < MII_RD_TOUT; tout++) { + if ((MAC_MIND & MIND_BUSY) == 0) { + break; + } + } + MAC_MCMD = 0; + return (MAC_MRDD); +} + + +// Keil: function added to initialize Rx Descriptors +void rx_descr_init (void) +{ + unsigned int i; + + for (i = 0; i < NUM_RX_FRAG; i++) { + RX_DESC_PACKET(i) = RX_BUF(i); + RX_DESC_CTRL(i) = RCTRL_INT | (ETH_FRAG_SIZE-1); + RX_STAT_INFO(i) = 0; + RX_STAT_HASHCRC(i) = 0; + } + + /* Set EMAC Receive Descriptor Registers. */ + MAC_RXDESCRIPTOR = RX_DESC_BASE; + MAC_RXSTATUS = RX_STAT_BASE; + MAC_RXDESCRIPTORNUM = NUM_RX_FRAG-1; + + /* Rx Descriptors Point to 0 */ + MAC_RXCONSUMEINDEX = 0; +} + + +// Keil: function added to initialize Tx Descriptors +void tx_descr_init (void) { + unsigned int i; + + for (i = 0; i < NUM_TX_FRAG; i++) { + TX_DESC_PACKET(i) = TX_BUF(i); + TX_DESC_CTRL(i) = 0; + TX_STAT_INFO(i) = 0; + } + + /* Set EMAC Transmit Descriptor Registers. */ + MAC_TXDESCRIPTOR = TX_DESC_BASE; + MAC_TXSTATUS = TX_STAT_BASE; + MAC_TXDESCRIPTORNUM = NUM_TX_FRAG-1; + + /* Tx Descriptors Point to 0 */ + MAC_TXPRODUCEINDEX = 0; +} + + +// configure port-pins for use with LAN-controller, +// reset it and send the configuration-sequence + +void Init_EMAC(void) +{ +// Keil: function modified to access the EMAC +// Initializes the EMAC ethernet controller + unsigned int regv,tout,id1,id2; + + /* Power Up the EMAC controller. */ + PCONP |= 0x40000000; // PCENET Enable + + /* Enable P1 Ethernet Pins. */ + if (MAC_MODULEID == OLD_EMAC_MODULE_ID) + { + /* For the first silicon rev.'-' ID P1.6 should be set. */ + // 5 0 1 5 1 1 0 5 + // 0101 xxxx xx01 0101 xx01 xx01 xxxx 0101 + // P1[15,14,10,9,8,6,4,1,0] + PINSEL2 = 0x50151105; + } + + else + { + /* on rev. 'A' and later, P1.6 should NOT be set. */ + // 5 0 1 5 0 1 0 5 + // 0101 xxxx xx01 0101 xxxx xx01 xxxx 0101 + // P1[15,14,10,9,8,4,1,0] + PINSEL2 = 0x50150105; + } + + // Config P1.[17:16] = ENET_MDIO:ENET_MDC + PINSEL3 = (PINSEL3 & ~0x0000000F) | 0x00000005; + + /* Reset all EMAC internal modules. */ + MAC_MAC1 = MAC1_RES_TX | MAC1_RES_MCS_TX | MAC1_RES_RX | MAC1_RES_MCS_RX | + MAC1_SIM_RES | MAC1_SOFT_RES; + MAC_COMMAND = CR_REG_RES | CR_TX_RES | CR_RX_RES; + + /* A short delay after reset. */ + for (tout = 100; tout; tout--); + + /* Initialize MAC control registers. */ + MAC_MAC1 = MAC1_PASS_ALL; + MAC_MAC2 = MAC2_CRC_EN | MAC2_PAD_EN; + MAC_MAXF = ETH_MAX_FLEN; + MAC_CLRT = CLRT_DEF; + MAC_IPGR = IPGR_DEF; + + /* Enable Reduced MII interface. */ + MAC_COMMAND = CR_RMII | CR_PASS_RUNT_FRM; + + /* Reset Reduced MII Logic. */ + MAC_SUPP = SUPP_RES_RMII; + for (tout = 100; tout; tout--); + MAC_SUPP = 0; + + /* Put the DP83848C in reset mode */ + write_PHY (PHY_REG_BMCR, 0x8000); + + /* Wait for hardware reset to end. */ + for (tout = 0; tout < 0x100000; tout++) { + regv = read_PHY (PHY_REG_BMCR); + if (!(regv & 0x8000)) { + /* Reset complete */ + break; + } + } + + /* Check if this is a DP83848C PHY. */ + id1 = read_PHY (PHY_REG_IDR1); + id2 = read_PHY (PHY_REG_IDR2); + if (((id1 << 16) | (id2 & 0xFFF0)) == DP83848C_ID) { + /* Configure the PHY device */ + + /* Use autonegotiation about the link speed. */ + write_PHY (PHY_REG_BMCR, PHY_AUTO_NEG); + + /* Wait to complete Auto_Negotiation. */ + for (tout = 0; tout < 0x100000; tout++) { + regv = read_PHY (PHY_REG_BMSR); + if (regv & 0x0020) { + /* Autonegotiation Complete. */ + break; + } + } + } + + /* Check the link status. */ + for (tout = 0; tout < 0x10000; tout++) { + regv = read_PHY (PHY_REG_STS); + if (regv & 0x0001) { + /* Link is on. */ + break; + } + } + + /* Configure Full/Half Duplex mode. */ + if (regv & 0x0004) { + /* Full duplex is enabled. */ + MAC_MAC2 |= MAC2_FULL_DUP; + MAC_COMMAND |= CR_FULL_DUP; + MAC_IPGT = IPGT_FULL_DUP; + } + else { + /* Half duplex mode. */ + MAC_IPGT = IPGT_HALF_DUP; + } + + /* Configure 100MBit/10MBit mode. */ + if (regv & 0x0002) { + /* 10MBit mode. */ + MAC_SUPP = 0; + } + else { + /* 100MBit mode. */ + MAC_SUPP = SUPP_SPEED; + } + + /* Set the Ethernet MAC Address registers */ + MAC_SA0 = (MYMAC_1 << 8) | MYMAC_2; + MAC_SA1 = (MYMAC_3 << 8) | MYMAC_4; + MAC_SA2 = (MYMAC_5 << 8) | MYMAC_6; + + /* Initialize Tx and Rx DMA Descriptors */ + rx_descr_init (); + tx_descr_init (); + + /* Receive Broadcast and Perfect Match Packets */ + MAC_RXFILTERCTRL = RFC_UCAST_EN | RFC_BCAST_EN | RFC_PERFECT_EN; + + /* Enable EMAC interrupts. */ + MAC_INTENABLE = INT_RX_DONE | INT_TX_DONE; + + /* Reset all interrupts */ + MAC_INTCLEAR = 0xFFFF; + + /* Enable receive and transmit mode of MAC Ethernet core */ + MAC_COMMAND |= (CR_RX_EN | CR_TX_EN); + MAC_MAC1 |= MAC1_REC_EN; +} + + +// reads a word in little-endian byte order from RX_BUFFER + +unsigned short ReadFrame_EMAC(void) +{ + return (*rptr++); +} + +// reads a word in big-endian byte order from RX_FRAME_PORT +// (useful to avoid permanent byte-swapping while reading +// TCP/IP-data) + +unsigned short ReadFrameBE_EMAC(void) +{ + unsigned short ReturnValue; + + ReturnValue = SwapBytes (*rptr++); + return (ReturnValue); +} + + +// copies bytes from frame port to MCU-memory +// NOTES: * an odd number of byte may only be transfered +// if the frame is read to the end! +// * MCU-memory MUST start at word-boundary + +void CopyFromFrame_EMAC(void *Dest, unsigned short Size) +{ + unsigned short * piDest; // Keil: Pointer added to correct expression + + piDest = Dest; // Keil: Line added + while (Size > 1) { + *piDest++ = ReadFrame_EMAC(); + Size -= 2; + } + + if (Size) { // check for leftover byte... + *(unsigned char *)piDest = (char)ReadFrame_EMAC();// the LAN-Controller will return 0 + } // for the highbyte +} + +// does a dummy read on frame-I/O-port +// NOTE: only an even number of bytes is read! + +void DummyReadFrame_EMAC(unsigned short Size) // discards an EVEN number of bytes +{ // from RX-fifo + while (Size > 1) { + ReadFrame_EMAC(); + Size -= 2; + } +} + +// Reads the length of the received ethernet frame and checks if the +// destination address is a broadcast message or not +// returns the frame length +unsigned short StartReadFrame(void) { + unsigned short RxLen; + unsigned int idx; + + idx = MAC_RXCONSUMEINDEX; + RxLen = (RX_STAT_INFO(idx) & RINFO_SIZE) - 3; + rptr = (unsigned short *)RX_DESC_PACKET(idx); + return(RxLen); +} + +void EndReadFrame(void) { + unsigned int idx; + + /* DMA free packet. */ + idx = MAC_RXCONSUMEINDEX; + if (++idx == NUM_RX_FRAG) idx = 0; + MAC_RXCONSUMEINDEX = idx; +} + +unsigned int CheckFrameReceived(void) { // Packet received ? + //unsigned int i; + // /* A short delay after reset. */ + //for (i = 10; i; i--); + //FIO3CLR = 0x04000000; // ON LED2 = Status Frame Receive + + if (MAC_RXPRODUCEINDEX != MAC_RXCONSUMEINDEX) // more packets received ? + return(1); + + else + return(0); +} + +// requests space in EMAC memory for storing an outgoing frame + +void RequestSend(unsigned short FrameSize) +{ + unsigned int idx; + + idx = MAC_TXPRODUCEINDEX; + tptr = (unsigned short *)TX_DESC_PACKET(idx); + TX_DESC_CTRL(idx) = FrameSize | TCTRL_LAST; +} + +// check if ethernet controller is ready to accept the +// frame we want to send + +unsigned int Rdy4Tx(void) +{ + return (1); // the ethernet controller transmits much faster +} // than the CPU can load its buffers + + +// writes a word in little-endian byte order to TX_BUFFER +void WriteFrame_EMAC(unsigned short Data) +{ + *tptr++ = Data; +} + +// copies bytes from MCU-memory to frame port +// NOTES: * an odd number of byte may only be transfered +// if the frame is written to the end! +// * MCU-memory MUST start at word-boundary + +void CopyToFrame_EMAC(void *Source, unsigned int Size) +{ + unsigned short * piSource; + unsigned int idx; + + piSource = Source; + Size = (Size + 1) & 0xFFFE; // round Size up to next even number + while (Size > 0) { + WriteFrame_EMAC(*piSource++); + Size -= 2; + } + + idx = MAC_TXPRODUCEINDEX; + if (++idx == NUM_TX_FRAG) idx = 0; + MAC_TXPRODUCEINDEX = idx; +} + Index: /webserver/example/EasyWEB/easyweb_LPC2368.dep =================================================================== --- /webserver/example/EasyWEB/easyweb_LPC2368.dep (revision 9) +++ /webserver/example/EasyWEB/easyweb_LPC2368.dep (revision 9) @@ -0,0 +1,25 @@ +Dependencies for Project 'easyweb', Target 'LPC2368': (DO NOT MODIFY !) +F (.\webpage.html)(0x47A9C31C)() +F (.\easyweb.c)(0x47A9C464)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\easyweb.o" --depend ".\Objects\easyweb.d") +I (C:\Keil\ARM\RV31\INC\stdlib.h)(0x473448F4) +I (C:\Keil\ARM\RV31\INC\stdio.h)(0x473448F4) +I (C:\Keil\ARM\RV31\INC\string.h)(0x473448F4) +I (easyweb.h)(0x47A9C464) +I (EMAC.h)(0x4769E108) +I (tcpip.h)(0x4769E63C) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E7529A) +I (webpage.h)(0x47F6BE6E) +F (.\tcpip.c)(0x47A9C0E0)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\tcpip.o" --depend ".\Objects\tcpip.d") +I (tcpip.h)(0x4769E63C) +I (EMAC.h)(0x4769E108) +I (C:\Keil\ARM\RV31\INC\string.h)(0x473448F4) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E7529A) +F (.\EMAC.c)(0x476A126E)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\emac.o" --depend ".\Objects\emac.d") +I (EMAC.h)(0x4769E108) +I (tcpip.h)(0x4769E63C) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E7529A) +F (.\Retarget.c)(0x46E6477E)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\retarget.o" --depend ".\Objects\retarget.d") +I (C:\Keil\ARM\RV31\INC\rt_misc.h)(0x473448F4) +F (.\LPC2300.s)(0x46E6477E)(--device DARMP -g --apcs=interwork --pd "__MICROLIB SETA 1" -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\LPC2300.o") +F (.\tcpip.h)(0x4769E63C)() +F (.\Abstract.txt)(0x47A9C552)() Index: /webserver/example/EasyWEB/easyweb_Uv2.Bak =================================================================== --- /webserver/example/EasyWEB/easyweb_Uv2.Bak (revision 9) +++ /webserver/example/EasyWEB/easyweb_Uv2.Bak (revision 9) @@ -0,0 +1,122 @@ +### uVision2 Project, (C) Keil Software +### Do not modify ! + +Target (MCB2300), 0x0004 // Tools: 'ARM-ADS' + +Group (HTML Source) +Group (C Source Files) +Group (Configuration Files) +Group (Documentation) + +File 1,7,<.\webpage.html> +File 2,1,<.\easyweb.c> +File 2,1,<.\tcpip.c> +File 2,1,<.\EMAC.c> +File 2,1,<.\Retarget.c> +File 3,2,<.\LPC2300.s> +File 3,5,<.\tcpip.h> +File 4,5,<.\Abstract.txt> + + +Options 1,0,0 // Target 'MCB2300' + Device (LPC2368) + Vendor (NXP (founded by Philips)) + Cpu (IRAM(0x40000000-0x40007FFF) IRAM2(0x7FD00000-0x7FD01FFF) IROM(0-0x7FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI)) + FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 38400 1)) + StupF ("STARTUP\Philips\LPC2300.s" ("Philips LPC2300 Startup Code")) + FlashDR (UL2ARM(-U268761108 -O7 -S0 -C0 -FO15 -FD40000000 -FC800 -FN1 -FF0LPC_IAP2_512 -FS00 -FL07D000)) + DevID (4152) + Rgf (LPC23xx.H) + Mem () + C () + A () + RL () + OH () + DBC_IFX () + DBC_CMS () + DBC_AMS () + DBC_LMS () + UseEnv=0 + EnvBin () + EnvInc () + EnvLib () + EnvReg (ÿPhilips\) + OrgReg (ÿPhilips\) + TgStat=16 + OutDir (.\Objects\) + OutName (easyweb) + GenApp=1 + GenLib=0 + GenHex=1 + Debug=1 + Browse=0 + LstDir (.\Listing\) + HexSel=1 + MG32K=0 + TGMORE=0 + RunUsr 0 0 <> + RunUsr 1 0 <> + BrunUsr 0 0 <> + BrunUsr 1 0 <> + CrunUsr 0 0 <> + CrunUsr 1 0 <> + SVCSID <> + GLFLAGS=1790 + ADSFLGA { 242,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ACPUTYP (ARM7TDMI) + RVDEV () + ADSTFLGA { 0,12,16,18,99,4,0,66,0,0,0,0,0,0,0,0,0,0,0,0 } + OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + OCMADSIRAM { 0,0,0,0,64,0,128,0,0 } + OCMADSIROM { 1,0,0,0,0,0,0,8,0 } + OCMADSXRAM { 0,0,0,0,0,0,0,0,0 } + OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,128,0,0,0,0,0,208,127,0,32,0,0 } + RV_STAVEC () + ADSCCFLG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSCMISC () + ADSCDEFN () + ADSCUDEF () + ADSCINCD () + ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSAMISC () + ADSADEFN () + ADSAUDEF () + ADSAINCD () + PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IncBld=1 + AlwaysBuild=0 + GenAsm=0 + AsmAsm=0 + PublicsOnly=0 + StopCode=3 + CustArgs () + LibMods () + ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSLDTA (0x00000000) + ADSLDDA (0x40000000) + ADSLDSC (.\Objects\easyweb.sct) + ADSLDIB () + ADSLDIC () + ADSLDMC () + ADSLDIF () + ADSLDDW () + OPTDL (SARM.DLL)(-cLPC236x)(DARMP.DLL)(-pLPC2368)(SARM.DLL)()(TARMP.DLL)(-pLPC2368) + OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()() + FLASH1 { 9,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + FLASH2 (BIN\UL2ARM.DLL) + FLASH3 (LPC210x_ISP.EXE ("#H" ^X $D COM1: 38400 1)) + FLASH4 () +EndOpt + +Options 1,1,1 // File 'webpage.html' + PropFld { 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IncBld=2 + AlwaysBuild=2 + GenAsm=2 + AsmAsm=2 + PublicsOnly=2 + StopCode=11 + CustArgs (webconverter.exe webpage.html webpage.h) + LibMods () +EndOpt + Index: /webserver/example/EasyWEB/Objects/retarget.d =================================================================== --- /webserver/example/EasyWEB/Objects/retarget.d (revision 9) +++ /webserver/example/EasyWEB/Objects/retarget.d (revision 9) @@ -0,0 +1,2 @@ +.\Objects\retarget.o: Retarget.c +.\Objects\retarget.o: C:\Keil\ARM\RV31\INC\rt_misc.h Index: /webserver/example/EasyWEB/Objects/easyweb.plg =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.plg (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.plg (revision 9) @@ -0,0 +1,21 @@ + + +
+

µVision3 Build Log

+

Project:

+C:\JR-LPC2368\EasyWEB\easyweb.uv2 +Project File Date: 01/02/2008 + +

Output:

+Build target 'LPC2368' +Custom: webconverter.exe webpage.html webpage.h +custom translating webpage.html... +compiling easyweb.c... +compiling tcpip.c... +compiling EMAC.c... +compiling Retarget.c... +assembling LPC2300.s... +linking... +Program Size: Code=6164 RO-data=1200 RW-data=76 ZI-data=2188 +FromELF: creating hex file... +".\Objects\easyweb.axf" - 0 Error(s), 0 Warning(s). Index: /webserver/example/EasyWEB/Objects/easyweb.d =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.d (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.d (revision 9) @@ -0,0 +1,9 @@ +.\Objects\easyweb.o: easyweb.c +.\Objects\easyweb.o: C:\Keil\ARM\RV31\INC\stdlib.h +.\Objects\easyweb.o: C:\Keil\ARM\RV31\INC\stdio.h +.\Objects\easyweb.o: C:\Keil\ARM\RV31\INC\string.h +.\Objects\easyweb.o: easyweb.h +.\Objects\easyweb.o: EMAC.h +.\Objects\easyweb.o: tcpip.h +.\Objects\easyweb.o: C:\Keil\ARM\INC\Philips\LPC23xx.h +.\Objects\easyweb.o: webpage.h Index: /webserver/example/EasyWEB/Objects/tcpip.d =================================================================== --- /webserver/example/EasyWEB/Objects/tcpip.d (revision 9) +++ /webserver/example/EasyWEB/Objects/tcpip.d (revision 9) @@ -0,0 +1,5 @@ +.\Objects\tcpip.o: tcpip.c +.\Objects\tcpip.o: tcpip.h +.\Objects\tcpip.o: EMAC.h +.\Objects\tcpip.o: C:\Keil\ARM\RV31\INC\string.h +.\Objects\tcpip.o: C:\Keil\ARM\INC\Philips\LPC23xx.h Index: /webserver/example/EasyWEB/Objects/easyweb.hex =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.hex (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.hex (revision 9) @@ -0,0 +1,468 @@ +:0400000500000000F7 +:020000040000FA +:1000000018F09FE518F09FE518F09FE518F09FE5C0 +:1000100018F09FE50000A0E120F11FE518F09FE532 +:1000200058000000400000004400000048000000AC +:100030004C000000000000005000000054000000D0 +:10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18 +:10005000FEFFFFEAFEFFFFEAF4009FE5AA10A0E31F +:100060005520A0E32030A0E3A03180E5A03190E549 +:10007000403013E2FCFFFF0A0130A0E30C3180E5C1 +:100080000B30A0E3843080E58C1080E58C2080E587 +:100090000130A0E3803080E58C1080E58C2080E585 +:1000A000883090E5013313E2FCFFFF0A883090E5C9 +:1000B000A0409FE5043003E00B40A0E3043033E0B0 +:1000C000F9FFFF1A0530A0E3043180E50530A0E315 +:1000D000083180E50030A0E3A83180E50030A0E3DE +:1000E000AC3180E50330A0E3803080E58C1080E502 +:1000F0008C2080E558009FE50410A0E3041080E503 +:100100000210A0E3001080E54C009FE5DBF021E346 +:1001100000D0A0E1000040E2D7F021E300D0A0E150 +:10012000000040E2D1F021E300D0A0E1000040E275 +:10013000D2F021E300D0A0E1010C40E2D3F021E3B2 +:1001400000D0A0E1080040E210F021E30C009FE5A0 +:1001500010FF2FE100C01FE0FF7FFF00D808004024 +:100160006401000000D09FE5A70400EBD007004029 +:10017000004700005E485F4910B5086048680028E5 +:10018000FCDA0A685C4B1A400A600004800D0A2100 +:1001900001F0EAF810BC08BC18477CB5574E7088CF +:1001A000042820D3564C002519E02078412814D18A +:1001B0006078442811D1E07825280ED1A078302825 +:1001C0000BD1FFF7D7FF02004EA1684601F036F9C8 +:1001D00003222000694601F0DBF8641C6D1C708866 +:1001E000C01E8542E1D37CBC08BC1847F8B5434C1F +:1001F0006078810755D5400701D500F03DF960785A +:1002000000074BD521783E483F4ECA0705D145210E +:100210000901E1603D49A16005E0E5683200B542B1 +:1002200028D9C90714D139492C222D3901F0B0F849 +:10023000A1683348FF22D5320D002C3001F0A8F818 +:10024000E068FF35FF38D538D535A560E0600BE0B4 +:10025000A1680F0001F09CF8FF3DFF3DFF37023D14 +:10026000FF370237A760E5606680FFF796FF00F072 +:1002700009F90FE0002D0DD0A1682A0001F088F8DF +:10028000E0686080FFF789FF00F0FCF800F0DFF81D +:100290000020E0602078012108432070F8BC08BCF1 +:1002A0001847207840084000F7E710B500F034F810 +:1002B0001748416801221203114341601548416803 +:1002C000032292039143416041680122920311434A +:1002D00041600A4C002020705020A0806078C00748 +:1002E00001D100F035F800F077FDFFF77FFFF5E76B +:1002F00001042E01004003E0FEFFFFFE000000406D +:100300008200004025337500000200004118000003 +:10031000C0C01FE000C002E0FD49FE4810B5816189 +:100320000321416101214160FB48FC490861FC490E +:100330001020086100F0C9FEFA4900200870FA494F +:100340000870FA490870FA49087010BC08BC1847D0 +:10035000F6480178002907D1F34A012113788B432D +:1003600013700170F24801707047F2490020087064 +:10037000F14804220270EC480178114301700178C1 +:10038000082211430170704770B5EC48FF22062126 +:1003900001F010F8E94CEA490622A01D00F0F8FF30 +:1003A000C120C000A081FF2001300821E08121820E +:1003B000E44906226182A0822000E149163000F063 +:1003C000E7FFE14D06212888A0836888E0832000AC +:1003D000203000F0F7FFDD4BDD4A188829881688A9 +:1003E0004140314206D159886B8855880A005A40ED +:1003F0002A4205D0D7480188E1844088208501E061 +:10040000E0842185D4492A200870C6480222017858 +:100410001143017070BC08BC1847C44810B500787F +:10042000002801D0012890D1BF4801240178FD2285 +:1004300021430170017811400170FFF7A5FFC74902 +:1004400000200870FFF791FFB94804707DE7B74AB4 +:10045000B549107801280AD0022808D0032801D015 +:10046000042803D108781022104308707047002038 +:1004700010700870AE49F8E7AD48FB2201781140D2 +:1004800001707047A9480078042801D0072818D1C6 +:10049000A7490878020714D5F72210400870B14820 +:1004A000AF4900880A6812180A60AF4936300880E0 +:1004B0009C490122087810430870A849042008705C +:1004C00053E770471CB500F0CFFEA849088006210D +:1004D000684600F0AAFEA648062100F0A6FE6B467C +:1004E0001988A448814209D15988814206D1998846 +:1004F000814203D101201CBC08BC18470020FAE748 +:10050000994810B501889C4800F0E7FE1DE70023DC +:1005100030B4002A18D08C4B0D021A885C888B4BA3 +:10052000A2181C885B88A2180C0A9A182C43230472 +:100530001B0C9A1803235B02D31805E00288891E5E +:10054000801CD3180904090C0129F7D8002906D00A +:100550000078C31803E01804000C190C4318180C99 +:10056000F9D1D84330BC0004000C70470A0E027069 +:100570000A0C42700A0A8270C17070470A0A02703F +:100580004170704770B57D497B48062200F000FF3E +:10059000794C6B490622A01D00F0FAFE0820A081CC +:1005A0007748704EE0813088283001042000090C23 +:1005B0001030FFF7E3FF0025192065828001A58236 +:1005C000E0826148258301882A0061834088A083F6 +:1005D0005E480188E18340881421208420000E3089 +:1005E000FFF795FF20836748018820002230030031 +:1005F000FFF7C4FF6448018820002430FFF7BEFFE6 +:100600006248016820002630FFF7B0FF60480168AB +:1006100020002A30FFF7AAFF594801220B30E0855D +:10062000012020866586A586308814300104090CD7 +:100630001800FFF76CFF6086ECE6474810B50178BC +:100640003E4800F04AFE80E670B505004B493B4845 +:10065000062200F09DFE394C39490622A01D00F00B +:1006600097FE0820A0814648E081A80702D50B200C +:10067000800201E00520C002208200261920668247 +:100680008001A682E082304826830188320061839F +:100690004088A0832D480188E1834088142120846C +:1006A00026480E30FFF733FF208336480188234861 +:1006B00022300300FFF762FF334801881F482430CF +:1006C000FFF75CFF314801681C482630FFF74EFFFA +:1006D0002F48016819482A30FFF748FF012020867B +:1006E0006686A6861C4EA90754D5032149030D43EF +:1006F00029022A0A1143E18512490122091FE186D4 +:10070000208718211800FFF702FF60863A204FE08B +:1007100040F92F00004000E0BC0F000000F1FFFF97 +:1007200000F0FFFF330000403400004010000040A4 +:1007300001000040200000402100004082020040F3 +:100740009E1C000006040000921C000040000040B7 +:10075000961C00009A1C000032000040110000406E +:10076000180000400200004030000040220000401D +:1007700024000040FFFF00004C0000403A00004011 +:100780004510000004000040380000401400004004 +:100790001C0000400520000305432802290A0843E5 +:1007A000E085012214211800FFF7B1FE6086362093 +:1007B0003070FF4802220178114301702AE6FD499A +:1007C000FD4A002008701378FC499B079B0F012B02 +:1007D00001D1102300E020230B7010707047F64801 +:1007E000FB220178114001707047F54810B503787D +:1007F00000F0ACFD050407090B0F0600FFF7C4FD70 +:10080000A3E5022002E0122000E01120FFF71CFF08 +:100810009BE5E749012208781043087095E5E9490E +:10082000002008707047E74900200870E248042261 +:100830000178114301700178F7221140017070476F +:10084000FEB500F0E7FC019000F0E4FCDE49098809 +:10085000884263D100F0DEFC040400F0DBFC20439E +:10086000009000F0D7FC040400F0D4FC2043050005 +:1008700000F0D0FCD54904000988000B8000091A5B +:1008800014390E04FF21360C01318E4246D814284B +:1008900004D914380004000C00F0DAFCC54F387895 +:1008A00000281BD001283CD002287ED1C849C94865 +:1008B000042200F095FD002830D1C749019809882D +:1008C00088422BD1E00652D5C448006885424ED0FC +:1008D000600723D4C248056004201DE060071DD4D2 +:1008E000BD49019806220880BE49BF4800F050FD6E +:1008F000B749B8480A88028049884180E006E9D4AF +:10090000B749002008600098B8498019A20708601C +:1009100001D0401C08601420FFF796FEFEBC08BC06 +:1009200018476007FAD4AC49019806220880AD49FF +:10093000AD4800F02DFDA649A6480A8802804988E6 +:100940004180E006C6D4A007E8D50098A749401C1E +:100950000860A748A7490088896800040904090CB1 +:1009600008439F4908609D49401C08602BE06007D0 +:1009700009D5E006D2D590490020387008708F491B +:1009800030200870CAE7A007C8D500989749401CD6 +:100990000860E00615D5FFF722FF904801689048EF +:1009A00001601020FFF750FE00E017E004203870CF +:1009B0008248022201781143017001780822114314 +:1009C00030E0FFF70CFF1220FFF73EFE7C490220CB +:1009D0000870FFF7CAFC032038709FE77C497D4808 +:1009E000042200F0FDFC002898D17B490198098879 +:1009F000884293D17D490098096888428ED160076A +:100A000005D56D49002038700870302109E0A00735 +:100A10000AD50420FFF718FE6749002038700870D7 +:100A200040216648017079E7E006ABD56B4B18684A +:100A3000854234D1FFF7D3FE6948196801603B78DD +:100A4000DB1E00F083FC0805230D232310131D2358 +:100A5000042038705948022201781143017018E0CF +:100A60000620387023E00A2038703AE0524900200E +:100A7000387008705148042201781140017030E04C +:100A80001020FFF7E1FD4F49002008703878042856 +:100A900008D14A48082201781143017007E03878EC +:100AA000042804D03878052801D0062819D1002E52 +:100AB00017D0424D2878400713D4062000F0C8FB19 +:100AC0004D48310000F0B1FB4C48042106802878E5 +:100AD0000843287045480168891901601020FFF714 +:100AE000B3FDE0079FD03B78FD24DB1E00F02EFC19 +:100AF000080505080F1A1A1A171A0720387011E08E +:100B0000082038702D480178214001700AE0FFF775 +:100B10008AFE2A490A2038700878204001E02949D5 +:100B20000020087031490868401C08601020F3E676 +:100B300070B5264800883C2801D9242502E01838E1 +:100B400005042D0C27492E48062200F021FC2C4CD0 +:100B50002C490622A01D00F01BFC0820A081452086 +:100B6000E0812800183001042000090C1030FFF744 +:100B700005FD0026FF2066824130A682E0822248E1 +:100B800026830188320061834088A0831048018851 +:100B9000E18340881421208420000E30FFF7B7FC49 +:100BA00020832900200066842630A6842EE00000E1 +:100BB00033000040100000403400004001000040BD +:100BC0001100004020000040040000402E000040C2 +:100BD0002A0000404000004038000040180000405B +:100BE00014000040240000403A0000401C00004077 +:100BF00012000040004000E0CC02004036000040FF +:100C0000820200409E1C0000921C000000F00DFBC0 +:100C1000281D01042000090C00222230FFF777FC78 +:100C2000A084CE48CE4926350570087802221043AC +:100C3000087001E510B500F0EDFA040000F0EAFAE2 +:100C4000200A082801D1FFF773FF5FE438B500F0F0 +:100C5000E1FA0125ED02401B25D0062820D1C14C28 +:100C600020788007800F01281AD100F0D3FA0128DC +:100C700016D100F0CFFAA84212D100F0CBFABA494F +:100C800088420DD100F0C6FA022809D1FFF7A7FD6E +:100C9000B648062100F0C9FA2078022108432070E6 +:100CA00038BC08BC184700F0B5FA000A4528F7D14F +:100CB00000F0B0FAAE49088000F0ACFA00F0AAFAF1 +:100CC0008004EDD100F0A6FA0406240E00F0A2FA8A +:100CD000A848042100F0A9FA0421684600F0A5FA0A +:100CE000A5480422694600F07BFB0028D8D1012CDE +:100CF00004D0062CD4D1FFF7A3FDD1E7FFF79AFF6C +:100D0000CEE710B59D499E48062200F041FB9C4C61 +:100D10009C490622A01D00F03BFBC120C000A08121 +:100D2000FF200130E08108202082974895496082A9 +:100D300001204002A08220000622163000F028FB8D +:100D40008D4806220188A18340888C49E0832000D9 +:100D5000203000F01DFB874802220188E184408892 +:100D60007E4920852A2008707D4801781143017052 +:100D700069E408B500F04EFA8449884229D100F0B0 +:100D800049FA012825D100F045FA0121C90288421B +:100D90001FD100F03FFA744988421AD100F03AFAA4 +:100DA000012816D1062000F053FA7248042100F001 +:100DB0003CFA062000F04CFA0421684600F035FAAF +:100DC0006D480422694600F00BFB002801D1FFF7B3 +:100DD00098FF01B008BC1847F8B500F05DFA00288C +:100DE0000AD0FFF76FFB002802D0FFF7C2FF01E037 +:100DF000FFF72CFF00F048FA5A4C654D2078002789 +:100E000041071FD50107634812D50178082919D970 +:100E1000614E07703078002805D0FFF7E6FC307887 +:100E2000401E30700EE0FFF7DAFCFFF7C8FC09E067 +:100E30000078022806D959492F70277008780422B3 +:100E4000104008702B785649564A454E00F07EFAFD +:100E50000805054D24244D4D3A4D2078C30744D054 +:100E6000800742D53078800742D44F484F4B0088E6 +:100E70009B6800041B041B0C184308604C49401C71 +:100E80000F6010600220FFF7DFFB4A490120087065 +:100E9000FFF76BFA022027E02078C00625D53078CE +:100EA000800722D109681068814235D1401C10604A +:100EB0001120FFF7C9FB3F4903200870FFF755FADF +:100EC000052011E0307880070FD109681068814251 +:100ED00022D1401C10601120FFF7B6FB35490320DA +:100EE0000870FFF742FA092028703078800713D580 +:100EF0001A48007800F0D9F900F0E7F9002802D08C +:100F0000FFF79BFB04E0254950202F7008702770E5 +:100F10003078FD21084030703078C00715D0FFF7D9 +:100F200031FB2548008800F0C0F900F0CEF9002818 +:100F300002D0FFF7E5FA04E0184950202F7008703E +:100F400027703078400840003070F8BC08BC184763 +:100F5000010A000201430804000C704732000040FF +:100F60003300004034000040040600003A00004016 +:100F70002E0000402A000040921C00002400004087 +:100F8000820200409E1C00000604000006080000CB +:100F900010000040200000402100004001000040FF +:100FA000140000401800004012000040004000E023 +:100FB0001C000040110000403000004003002DE9FB +:100FC00034109FE5B000D1E1010080E2B000C1E142 +:100FD00028109FE50000D1E5010080E20000C1E596 +:100FE0001C109FE50100A0E3000081E50000A0E3E4 +:100FF000000100E50300BDE804F05EE212000040DD +:1010000020000040004000E0FF2201321043BF4AB0 +:101010009062D162002005210904536BDB0702D0E6 +:10102000401C8842F9D37047B849FF3001308862CC +:10103000012048620020052212044B6BDB0702D01E +:10104000401C9042F9D300204862086B0004000C59 +:10105000704770B4AE4C0020AD4DAE4E0200643C03 +:101060004100091849024B19C10009190A6248C117 +:101070000839401C04284A62F2D3A7488460A44976 +:101080004439C16003210161826170BC704730B492 +:101090009F4C0020A14D0200243C41000918490248 +:1010A0004B19C10009190B604A6081000919401CE5 +:1010B00003288A61F1D39848C46195490C390162CB +:1010C00002214162826230BC7047F0B594494868A1 +:1010D00001229207104348609248C16B924A93489C +:1010E000914201D1924900E092498160C1680909A9 +:1010F0000901491DC160854DCF2000022860864E40 +:10110000382030606420401EFDD10220286030204D +:10111000686040016861884828611220E8604001E9 +:1011200030600120C002A8616424641EFDD100204B +:10113000A8610121C903FFF767FF01273F050020D0 +:10114000FFF772FF000402D5641CBC42F7D30220F3 +:10115000FFF76AFF04000320FFF766FF774A2104C8 +:1011600010400143764881420DD10321090300203C +:10117000FFF74AFF00240120FFF756FF800602D444 +:10118000641CBC42F7D3002401273F041020FFF762 +:101190004BFFC10702D1641CBC42F7D341070124B5 +:1011A000002908DA6968214369603168A2021143A5 +:1011B0003160152100E01221A960800701D50020CF +:1011C00001E0FF200130A86150483021403001602B +:1011D0001B218902416002218160FFF73AFFFFF77E +:1011E00056FF5849232008604E48882141625349E0 +:1011F0000F31816230680321084330602868204342 +:101200002860F0BC08BC18474F4A11680888891C40 +:10121000116070474C4A10B511680888891C11602C +:10122000FFF796FE10BC08BC184710B50C00030071 +:1012300006E0FFF7E9FF18809B1CA41E2404240C81 +:10124000012CF6D8002CEDD0FFF7DEFF1870E9E78F +:1012500000B5030004E0FFF7D7FF9B1E1B041B0C27 +:10126000012BF8D808BC18472B488069364AC100C2 +:10127000274864380918086A09684005400DC01EEF +:101280000004000C1160704723498869401C042841 +:1012900000D10020886170471F4841698069814200 +:1012A00001D001207047002070471B4910B4896AA3 +:1012B000174AC900243A8918234B0A680124A40755 +:1012C00000195A60486010BC7047012070471E4BDF +:1012D00059688A1C08805A60704730B50400174866 +:1012E000491C0E3001400D0004E02088A41CFFF7CB +:1012F000EEFFAD1E002DF8D10749886A401C032877 +:1013000000D10020886230BC08BC18470000E0FF14 +:101310006400E07FFF0500800001E0FF6418E07FCB +:10132000C0C01FE0C00FE0FF0020023900C002E093 +:1013300005111550050115500F370000F0FF000092 +:10134000905C00200002E0FF440000407847C04667 +:1013500001C05EE50C0053E10330DE370C30DE27C0 +:1013600083C08EE01CFF2FE10B00010030B4002091 +:101370001F2201240D00D5409D4205D31D0095403C +:10138000491B250095404019521EF3D530BC7047CB +:1013900003000B439B070AD102E008C9121F08C0D3 +:1013A000042AFAD203E00B78491C0370401C521E39 +:1013B000F9D270471206120E01E00270401C491E5D +:1013C000FBD270470022F5E710B5040008001100B9 +:1013D00002002000FFF7EEFF200010BC08BC1847F9 +:1013E00030B404000020030000E05B1C934203D2F1 +:1013F000E05CCD5C401BF8D030BC7047004708472C +:1014000010471847204728473047384701C08FE228 +:101410001CFF2FE1064C074D04E020000FC8FFF72A +:10142000F0FF1034AC42F8D30348FEF7A1FE0000F1 +:10143000A41C0000C41C0000AB0200000FB410B5D7 +:10144000074B039804A902AA00F026F80400002024 +:1014500002A900F0DAF9200010BC08BC04B018475B +:101460000B180000000052E30430901404204212D4 +:1014700004308114FAFFFF1A1EFF2FE11EFF2FE137 +:101480000000A0E3000052E3042042120400811493 +:10149000FBFFFF1A1EFF2FE1FFB5050000268FB0EE +:1014A00076E125287ED10024C14A6D1C01210E94CD +:1014B0000D942B780800203B98400300134202D083 +:1014C00004436D1CF5E728782A2817D1109802C824 +:1014D000109000290E9104DA012040030443484291 +:1014E0000E90022004436D1C0EE00E9A0A235A430C +:1014F000303A80180C436D1C0E9000E002212878D1 +:101500000200303A092AF0D928782E2817D1042071 +:10151000044368786D1C2A280CD110986D1C02C8F1 +:1015200010900D910BE00D990A2359433039401862 +:101530006D1C0D902878010030390929F3D92878DD +:101540006C280FD009DC4C2819D068280DD06A28E7 +:1015500016D101204005044311E074280FD07A28E9 +:101560000ED10CE00121090501E0032109050C431E +:101570006978814203D101206D1C000524186D1C7F +:101580002878692806D01ADC00287CD0632846D049 +:10159000642887D110990A2701C910916102490F67 +:1015A000032900E0FDE001D100040014042901D169 +:1015B0000006001600287BDA40422D217BE06E28D1 +:1015C00013D0732836D07528E3D110990A2701C9A2 +:1015D00010916102490F032901D10004000C042974 +:1015E00001D10006000E002168E06002400F0228D1 +:1015F00005D11098F21701680E604A600CE00328CC +:1016000003D1109801680E8006E004281098016844 +:1016100001D10E7000E00E60001D1090B7E0109830 +:1016200008AB02C819731090002058730BA80C90D7 +:10163000012005E0109802C810900020C0430C91D2 +:1016400061070CD5002700E07F1C0D998F420FDA4F +:101650008742F9DB0C99C95D0029F5D108E0002724 +:1016600000E07F1C8742FCDB0C99C95D0029F8D1A2 +:101670000E9811AAC01B0E900CCA210000F0ADF804 +:101680008019C6190AE087E012E00C980C990078DE +:10169000491C0C9111A906C9FFF7B2FE7F1EF4D2B6 +:1016A00011AA0CCA0E98210000F084F886196EE089 +:1016B000210505D52B216B4619730121019103E00A +:1016C000E10790D02021F6E70DA9049107E0390049 +:1016D000FFF74AFE049A3031521E0492117000281E +:1016E000F5D1049805A9081A20300290600703D5A7 +:1016F00001200004844301E001200D900D9A02991D +:1017000000208A4200DD501A0D90401801994118BE +:101710000E98401A0E90E00306D411AA0CCA0E9837 +:10172000210000F05AF88619002707E011A906C920 +:1017300003A8C05DFFF764FE761C7F1C01988742FA +:10174000F4DBE0030DD511AA0CCA0E98210000F0BD +:1017500044F8861905E011A906C93020FFF750FEAC +:10176000761C0D98411E00280D91F4DC09E00498C8 +:1017700004990078491C049111A906C9FFF740FE9D +:10178000761C0298411E00280291F0DC88E76D1C4F +:101790002878002800D084E6300013B0F0BC08BCE4 +:1017A000184711A906C9FFF72BFE761CEFE70000CA +:1017B00009280100F8B517001E0004000025880460 +:1017C00007D504E039002020FFF71EFE6D1C641EC3 +:1017D000F8D52800F8BC08BC1847FFB51E00040067 +:1017E00000253027C80381B000D42027880407D4FF +:1017F00004E003993800FFF707FE6D1C641EF8D55E +:10180000280005B0F0BC08BC18470A68531C0B60E0 +:1018100010707047485454502F312E3020323030E1 +:10182000204F4B0D0A436F6E74656E742D547970A2 +:10183000653A20746578742F68746D6C0D0A0D0A12 +:10184000003C68746D6C3E0D0A0D0A3C686561646D +:101850003E0D0A3C6D65746120687474702D65716D +:101860007569763D22726566726573682220636FC2 +:101870006E74656E743D2235223E0D0A3C746974A7 +:101880006C653E65617379574542202D2064796E01 +:10189000616D696320576562736964653C2F746983 +:1018A000746C653E0D0A3C2F686561643E0D0A0D3F +:1018B0000A3C626F6479206267636F6C6F723D22CD +:1018C000233330333041302220746578743D222335 +:1018D000464646463030223E0D0A0D0A3C703E0D0B +:1018E0000A3C623E3C666F6E7420636F6C6F723DA3 +:1018F0002223464646464646222073697A653D22A3 +:1019000036223E3C693E48656C6C6F20576F726CA6 +:1019100064212046726F6D2043502D4A522041525F +:101920004D37204C504332333638203C2F693E3CF3 +:101930002F666F6E743E3C2F623E0D0A3C2F703E48 +:101940000D0A0D0A3C703E0D0A3C623E54686973F4 +:1019500020697320612064796E616D696320776509 +:10196000627369746520686F73746564206279209E +:1019700074686520656D626564646564205765629E +:101980007365727665723C2F623E200D0A3C623EA2 +:10199000656173795745422E3C2F623E0D0A3C2FFC +:1019A000703E0D0A0D0A3C703E0D0A3C623E4861D5 +:1019B0007264776172653A3C2F623E0D0A3C2F706B +:1019C0003E0D0A0D0A3C756C3E0D0A3C6C693E3CAE +:1019D000623E43502D4A522041524D37204C5043D5 +:1019E0003233363820426F6172642046726F6D2048 +:1019F00045545420434F2E2C4C54443C2F623E3CC3 +:101A00002F6C693E0D0A3C6C693E3C623E52756E1D +:101A1000203438204D487A2C203531324B42204634 +:101A20006C6173682C203332204B42205352414D5D +:101A30003C2F623E3C2F6C693E0D0A3C6C693E3C7B +:101A4000623E456D62656464656420454D41432096 +:101A500045746865726E657420436F6E74726F6C46 +:101A60006C65723C2F623E3C2F6C693E0D0A3C2F28 +:101A7000756C3E0D0A0D0A3C703E0D0A3C623E41FB +:101A80004443302850302E32332920496E7075740B +:101A9000203A3C2F623E0D0A3C2F703E0D0A0D0A83 +:101AA0003C7461626C65206267636F6C6F723D228B +:101AB000236666303030302220626F726465723D7A +:101AC0002235222063656C6C70616464696E673DC9 +:101AD0002230222063656C6C73706163696E673DB0 +:101AE0002230222077696474683D22353030223EEE +:101AF0000D0A3C74723E0D0A3C74643E0D0A3C743F +:101B000061626C652077696474683D2241443025C8 +:101B10002220626F726465723D2230222063656C00 +:101B20006C70616464696E673D2230222063656C6D +:101B30006C73706163696E673D2230223E0D0A3C12 +:101B400074723E3C7464206267636F6C6F723D22F6 +:101B500023303066663030223E266E6273703B3C26 +:101B60002F74643E3C2F74723E0D0A3C2F746162E8 +:101B70006C653E0D0A3C2F74643E0D0A3C2F747256 +:101B80003E0D0A3C2F7461626C653E0D0A0D0A3CE5 +:101B90007461626C6520626F726465723D223022EE +:101BA0002077696474683D22353430223E0D0A3C4A +:101BB00074723E0D0A3C74642077696474683D2237 +:101BC000313425223E30563C2F74643E0D0A3C745D +:101BD000642077696474683D22313425223E302EBA +:101BE00035563C2F74643E0D0A3C7464207769645A +:101BF00074683D22313425223E31563C2F74643EB8 +:101C00000D0A3C74642077696474683D2231342580 +:101C1000223E312E35563C2F74643E0D0A3C7464CE +:101C20002077696474683D22313425223E32563C67 +:101C30002F74643E0D0A3C74642077696474683DB7 +:101C400022313425223E322E35563C2F74643E0D0F +:101C50000A3C74642077696474683D22313425221B +:101C60003E33563C2F74643E0D0A3C2F74723E0D79 +:101C70000A3C2F7461626C653E0D0A0D0A3C2F62AE +:101C80006F64793E0D0A3C2F68746D6C3E0D0A0D31 +:101C90000A00C0A80164FFFFFF00C0A801010030D6 +:101CA0006C000002C41C0000000000404C0000005A +:101CB00064140000101D00004C0000408C0800005F +:101CC0008014000000000000000000000000000080 +:101CD0000000000000000000000000000000000004 +:101CE00000000000000000000000000000000000F4 +:101CF00000000000000000000000000000000000E4 +:101D000000000000000000000000000000000000D3 +:00000001FF Index: /webserver/example/EasyWEB/Objects/easyweb.tra =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.tra (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.tra (revision 9) @@ -0,0 +1,26 @@ +*** Creating Trace Output File '.\Objects\easyweb.tra' Ok. +### Preparing for ADS-LD. +### Creating ADS-LD Command Line +### List of Objects: adding '".\objects\easyweb.o"' +### List of Objects: adding '".\objects\tcpip.o"' +### List of Objects: adding '".\objects\emac.o"' +### List of Objects: adding '".\objects\retarget.o"' +### List of Objects: adding '".\objects\lpc2300.o"' +### ADS-LD Command completed: +".\objects\easyweb.o" ".\objects\tcpip.o" ".\objects\emac.o" ".\objects\retarget.o" ".\objects\lpc2300.o" --library_type=microlib --device DARMP --strict --scatter ".\Objects\easyweb.sct" + +--autoat --summary_stderr --info summarysizes --map --xref --callgraph --symbols + +--info sizes --info totals --info unused --info veneers + + --list ".\Listing\easyweb.map" -o ".\Objects\easyweb.axf"### Preparing Environment (PrepEnvAds) +### ADS-LD Output File: '.\Objects\easyweb.axf' +### ADS-LD Command File: '.\Objects\easyweb.lnp' +### Checking for dirty Components... +### Creating CmdFile '.\Objects\easyweb.lnp', Handle=0x00000258 +### Writing '.lnp' file +### ADS-LD Command file '.\Objects\easyweb.lnp' is ready. +### ADS-LD: About to start ADS-LD Thread. +### ADS-LD: executed with 0 errors +### Updating obj list +### LDADS_file() completed. Index: /webserver/example/EasyWEB/Objects/easyweb.htm =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.htm (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.htm (revision 9) @@ -0,0 +1,659 @@ + + +Static Call Graph - [.\Objects\easyweb.axf] +
+

Static Call Graph for image .\Objects\easyweb.axf


+

#<CALLGRAPH># ARM Linker, RVCT3.1 [Build 919]: Last Updated: Fri Apr 04 11:49:03 2008 +

+

Maximum Stack Usage = 104 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)

+Call chain for Maximum Stack Depth:

+main ⇒ DoNetworkStuff ⇒ ProcessEthIAFrame ⇒ ProcessTCPFrame ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +

+

+Functions with no stack information +

+ +

+

+Mutually Recursive functions +

  • Undef_Handler   ⇒   Undef_Handler
    +
  • SWI_Handler   ⇒   SWI_Handler
    +
  • PAbt_Handler   ⇒   PAbt_Handler
    +
  • DAbt_Handler   ⇒   DAbt_Handler
    +
  • IRQ_Handler   ⇒   IRQ_Handler
    +
  • FIQ_Handler   ⇒   FIQ_Handler
    + +

    +

    +Function Pointers +

    +

    +

    +Global Symbols +

    +

    Reset_Handler (ARM, 0 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +
    [Address Reference Count : 1]

    • lpc2300.o(RESET) +
    +

    __main (ARM, 8 bytes, Stack size 0 bytes, entry.o($$startup$$)) +

    [Calls]

    • >>   __init (via Veneer) +
    + +

    __call_main (Thumb, 2 bytes, Stack size 0 bytes, init.o(.emb_text)) +

    [Called By]

    • >>   __init +
    + +

    GetAD0Val (Thumb, 38 bytes, Stack size 8 bytes, easyweb.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = GetAD0Val ⇒ __aeabi_uidivmod +
    +
    [Calls]
    • >>   __aeabi_uidivmod +
    +
    [Called By]
    • >>   InsertDynamicValues +
    + +

    InsertDynamicValues (Thumb, 82 bytes, Stack size 24 bytes, easyweb.o(.text)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = InsertDynamicValues ⇒ __1sprintf +
    +
    [Calls]
    • >>   __1sprintf +
    • >>   __aeabi_memcpy +
    • >>   GetAD0Val +
    +
    [Called By]
    • >>   HTTPServer +
    + +

    HTTPServer (Thumb, 190 bytes, Stack size 24 bytes, easyweb.o(.text)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = HTTPServer ⇒ InsertDynamicValues ⇒ __1sprintf +
    +
    [Calls]
    • >>   __aeabi_memcpy +
    • >>   TCPTransmitTxBuffer +
    • >>   TCPReleaseRxBuffer +
    • >>   TCPClose +
    • >>   InsertDynamicValues +
    +
    [Called By]
    • >>   main +
    + +

    main (Thumb, 70 bytes, Stack size 8 bytes, easyweb.o(.text)) +

    [Stack]

    • Max Depth = 104
    • Call Chain = main ⇒ DoNetworkStuff ⇒ ProcessEthIAFrame ⇒ ProcessTCPFrame ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   TCPPassiveOpen +
    • >>   TCPLowLevelInit +
    • >>   DoNetworkStuff +
    • >>   HTTPServer +
    +
    [Address Reference Count : 1]
    • init.o(.text) +
    +

    TCPLowLevelInit (Thumb, 56 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = TCPLowLevelInit ⇒ Init_EMAC ⇒ rx_descr_init +
    +
    [Calls]
    • >>   Init_EMAC +
    +
    [Called By]
    • >>   main +
    + +

    TCPPassiveOpen (Thumb, 26 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   main +
    + +

    TCPStartRetryTimer (Thumb, 30 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   ProcessTCPFrame +
    • >>   TCPActiveOpen +
    • >>   TCPTransmitTxBuffer +
    • >>   DoNetworkStuff +
    + +

    PrepareARP_REQUEST (Thumb, 146 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = PrepareARP_REQUEST +
    +
    [Calls]
    • >>   __aeabi_memclr +
    • >>   __aeabi_memset +
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   TCPHandleRetransmission +
    • >>   TCPActiveOpen +
    + +

    TCPActiveOpen (Thumb, 52 bytes, Stack size 8 bytes, tcpip.o(.text), UNUSED) +

    [Calls]

    • >>   PrepareARP_REQUEST +
    • >>   TCPStartRetryTimer +
    + +

    TCPClose (Thumb, 42 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   HTTPServer +
    + +

    TCPReleaseRxBuffer (Thumb, 12 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   HTTPServer +
    + +

    TCPTransmitTxBuffer (Thumb, 64 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Calls]

    • >>   TCPStartRetryTimer +
    +
    [Called By]
    • >>   HTTPServer +
    + +

    IsBroadcast (Thumb, 60 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = IsBroadcast ⇒ CopyFromFrame_EMAC +
    +
    [Calls]
    • >>   StartReadFrame +
    • >>   CopyFromFrame_EMAC +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    SendFrame1 (Thumb, 14 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = SendFrame1 ⇒ CopyToFrame_EMAC +
    +
    [Calls]
    • >>   CopyToFrame_EMAC +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    CalcChecksum (Thumb, 94 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = CalcChecksum +
    +
    [Called By]
    • >>   PrepareICMP_ECHO_REPLY +
    • >>   PrepareTCP_FRAME +
    • >>   PrepareTCP_DATA_FRAME +
    + +

    WriteDWBE (Thumb, 16 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   PrepareTCP_FRAME +
    • >>   PrepareTCP_DATA_FRAME +
    + +

    WriteWBE (Thumb, 8 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   PrepareICMP_ECHO_REPLY +
    • >>   PrepareTCP_FRAME +
    • >>   PrepareTCP_DATA_FRAME +
    + +

    PrepareTCP_DATA_FRAME (Thumb, 182 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = PrepareTCP_DATA_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   __aeabi_memcpy +
    • >>   WriteWBE +
    • >>   WriteDWBE +
    • >>   CalcChecksum +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    SendFrame2 (Thumb, 14 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = SendFrame2 ⇒ CopyToFrame_EMAC +
    +
    [Calls]
    • >>   CopyToFrame_EMAC +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    PrepareTCP_FRAME (Thumb, 374 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   __aeabi_memcpy +
    • >>   WriteWBE +
    • >>   WriteDWBE +
    • >>   CalcChecksum +
    +
    [Called By]
    • >>   ProcessTCPFrame +
    • >>   TCPHandleRetransmission +
    • >>   DoNetworkStuff +
    + +

    TCPHandleTimeout (Thumb, 32 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   DoNetworkStuff +
    + +

    TCPStopTimer (Thumb, 12 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   ProcessEthIAFrame +
    • >>   ProcessTCPFrame +
    • >>   DoNetworkStuff +
    + +

    TCPHandleRetransmission (Thumb, 52 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = TCPHandleRetransmission ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   __ARM_switch8 (via Veneer) +
    • >>   PrepareTCP_FRAME +
    • >>   PrepareARP_REQUEST +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    TCPRestartTimer (Thumb, 8 bytes, Stack size 0 bytes, tcpip.o(.text), UNUSED) + +

    TCPStartTimeWaitTimer (Thumb, 26 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   ProcessTCPFrame +
    + +

    ProcessTCPFrame (Thumb, 752 bytes, Stack size 32 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = ProcessTCPFrame ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   memcmp +
    • >>   __aeabi_memcpy +
    • >>   __ARM_switch8 (via Veneer) +
    • >>   ReadFrameBE_EMAC +
    • >>   DummyReadFrame_EMAC +
    • >>   CopyFromFrame_EMAC +
    • >>   TCPStartTimeWaitTimer +
    • >>   TCPStopTimer +
    • >>   PrepareTCP_FRAME +
    • >>   TCPStartRetryTimer +
    +
    [Called By]
    • >>   ProcessEthIAFrame +
    + +

    PrepareICMP_ECHO_REPLY (Thumb, 260 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = PrepareICMP_ECHO_REPLY ⇒ CopyFromFrame_EMAC +
    +
    [Calls]
    • >>   __aeabi_memcpy +
    • >>   CopyFromFrame_EMAC +
    • >>   WriteWBE +
    • >>   CalcChecksum +
    +
    [Called By]
    • >>   ProcessICMPFrame +
    + +

    ProcessICMPFrame (Thumb, 24 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = ProcessICMPFrame ⇒ PrepareICMP_ECHO_REPLY ⇒ CopyFromFrame_EMAC +
    +
    [Calls]
    • >>   ReadFrameBE_EMAC +
    • >>   PrepareICMP_ECHO_REPLY +
    +
    [Called By]
    • >>   ProcessEthIAFrame +
    + +

    ProcessEthIAFrame (Thumb, 182 bytes, Stack size 16 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = ProcessEthIAFrame ⇒ ProcessTCPFrame ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   memcmp +
    • >>   ReadFrameBE_EMAC +
    • >>   CopyFromFrame_EMAC +
    • >>   ProcessICMPFrame +
    • >>   ProcessTCPFrame +
    • >>   TCPStopTimer +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    PrepareARP_ANSWER (Thumb, 112 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = PrepareARP_ANSWER +
    +
    [Calls]
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   ProcessEthBroadcastFrame +
    + +

    ProcessEthBroadcastFrame (Thumb, 102 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = ProcessEthBroadcastFrame ⇒ memcmp +
    +
    [Calls]
    • >>   memcmp +
    • >>   ReadFrameBE_EMAC +
    • >>   DummyReadFrame_EMAC +
    • >>   CopyFromFrame_EMAC +
    • >>   PrepareARP_ANSWER +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    DoNetworkStuff (Thumb, 376 bytes, Stack size 24 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = DoNetworkStuff ⇒ ProcessEthIAFrame ⇒ ProcessTCPFrame ⇒ PrepareTCP_FRAME ⇒ CalcChecksum +
    +
    [Calls]
    • >>   __ARM_switch8 (via Veneer) +
    • >>   RequestSend +
    • >>   Rdy4Tx +
    • >>   EndReadFrame +
    • >>   CheckFrameReceived +
    • >>   ProcessEthBroadcastFrame +
    • >>   ProcessEthIAFrame +
    • >>   TCPHandleRetransmission +
    • >>   TCPStopTimer +
    • >>   TCPHandleTimeout +
    • >>   PrepareTCP_FRAME +
    • >>   SendFrame2 +
    • >>   PrepareTCP_DATA_FRAME +
    • >>   SendFrame1 +
    • >>   IsBroadcast +
    • >>   TCPStartRetryTimer +
    +
    [Called By]
    • >>   main +
    + +

    SwapBytes (Thumb, 12 bytes, Stack size 0 bytes, tcpip.o(.text)) +

    [Called By]

    • >>   ReadFrameBE_EMAC +
    + +

    TCPClockHandler (ARM, 64 bytes, Stack size 8 bytes, tcpip.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = TCPClockHandler +
    +
    [Address Reference Count : 1]
    • tcpip.o(.text) +
    +

    write_PHY (Thumb, 32 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   Init_EMAC +
    + +

    read_PHY (Thumb, 42 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   Init_EMAC +
    + +

    rx_descr_init (Thumb, 60 bytes, Stack size 12 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = rx_descr_init +
    +
    [Called By]
    • >>   Init_EMAC +
    + +

    tx_descr_init (Thumb, 60 bytes, Stack size 8 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = tx_descr_init +
    +
    [Called By]
    • >>   Init_EMAC +
    + +

    Init_EMAC (Thumb, 318 bytes, Stack size 20 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = Init_EMAC ⇒ rx_descr_init +
    +
    [Calls]
    • >>   tx_descr_init +
    • >>   rx_descr_init +
    • >>   read_PHY +
    • >>   write_PHY +
    +
    [Called By]
    • >>   TCPLowLevelInit +
    + +

    ReadFrame_EMAC (Thumb, 12 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   DummyReadFrame_EMAC +
    • >>   CopyFromFrame_EMAC +
    + +

    ReadFrameBE_EMAC (Thumb, 22 bytes, Stack size 8 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = ReadFrameBE_EMAC +
    +
    [Calls]
    • >>   SwapBytes +
    +
    [Called By]
    • >>   ProcessEthBroadcastFrame +
    • >>   ProcessEthIAFrame +
    • >>   ProcessICMPFrame +
    • >>   ProcessTCPFrame +
    + +

    CopyFromFrame_EMAC (Thumb, 38 bytes, Stack size 8 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = CopyFromFrame_EMAC +
    +
    [Calls]
    • >>   ReadFrame_EMAC +
    +
    [Called By]
    • >>   ProcessEthBroadcastFrame +
    • >>   ProcessEthIAFrame +
    • >>   PrepareICMP_ECHO_REPLY +
    • >>   ProcessTCPFrame +
    • >>   IsBroadcast +
    + +

    DummyReadFrame_EMAC (Thumb, 24 bytes, Stack size 4 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = DummyReadFrame_EMAC +
    +
    [Calls]
    • >>   ReadFrame_EMAC +
    +
    [Called By]
    • >>   ProcessEthBroadcastFrame +
    • >>   ProcessTCPFrame +
    + +

    StartReadFrame (Thumb, 32 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   IsBroadcast +
    + +

    EndReadFrame (Thumb, 16 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   DoNetworkStuff +
    + +

    CheckFrameReceived (Thumb, 18 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   DoNetworkStuff +
    + +

    RequestSend (Thumb, 32 bytes, Stack size 4 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = RequestSend +
    +
    [Called By]
    • >>   DoNetworkStuff +
    + +

    Rdy4Tx (Thumb, 4 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   DoNetworkStuff +
    + +

    WriteFrame_EMAC (Thumb, 12 bytes, Stack size 0 bytes, emac.o(.text)) +

    [Called By]

    • >>   CopyToFrame_EMAC +
    + +

    CopyToFrame_EMAC (Thumb, 50 bytes, Stack size 12 bytes, emac.o(.text)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = CopyToFrame_EMAC +
    +
    [Calls]
    • >>   WriteFrame_EMAC +
    +
    [Called By]
    • >>   SendFrame2 +
    • >>   SendFrame1 +
    + +

    __ARM_switch8 (ARM, 24 bytes, Stack size 0 bytes, switch8.o(.text)) +

    [Called By]

    • >>   ProcessTCPFrame (via Veneer) +
    • >>   TCPHandleRetransmission (via Veneer) +
    • >>   DoNetworkStuff (via Veneer) +
    + +

    __rt_switch8 (ARM, 0 bytes, Stack size 0 bytes, switch8.o(.text), UNUSED) + +

    __aeabi_uidiv (Thumb, 0 bytes, Stack size 8 bytes, uidiv.o(.text), UNUSED) + +

    __aeabi_uidivmod (Thumb, 40 bytes, Stack size 8 bytes, uidiv.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = __aeabi_uidivmod +
    +
    [Called By]
    • >>   _printf_core +
    • >>   GetAD0Val +
    + +

    __aeabi_memcpy (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text)) +

    [Called By]

    • >>   PrepareARP_ANSWER +
    • >>   PrepareICMP_ECHO_REPLY +
    • >>   ProcessTCPFrame +
    • >>   PrepareTCP_FRAME +
    • >>   PrepareTCP_DATA_FRAME +
    • >>   PrepareARP_REQUEST +
    • >>   HTTPServer +
    • >>   InsertDynamicValues +
    + +

    __aeabi_memcpy4 (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED) + +

    __aeabi_memcpy8 (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED) + +

    __aeabi_memset (Thumb, 16 bytes, Stack size 0 bytes, memseta.o(.text)) +

    [Called By]

    • >>   _memset_wrapper +
    • >>   __aeabi_memclr +
    • >>   PrepareARP_REQUEST +
    + +

    __aeabi_memset4 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    __aeabi_memset8 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    __aeabi_memclr (Thumb, 4 bytes, Stack size 0 bytes, memseta.o(.text)) +

    [Calls]

    • >>   __aeabi_memset +
    +
    [Called By]
    • >>   PrepareARP_REQUEST +
    + +

    __aeabi_memclr4 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    __aeabi_memclr8 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    _memset_wrapper (Thumb, 24 bytes, Stack size 8 bytes, memseta.o(.text), UNUSED) +

    [Calls]

    • >>   __aeabi_memset +
    + +

    memcmp (Thumb, 28 bytes, Stack size 8 bytes, memcmp.o(.text)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = memcmp +
    +
    [Called By]
    • >>   ProcessEthBroadcastFrame +
    • >>   ProcessEthIAFrame +
    • >>   ProcessTCPFrame +
    + +

    __ARM_call_via_r0 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __call_via_r0 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r1 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __call_via_r1 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r2 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) +

    [Called By]

    • >>   _printf_core +
    + +

    __call_via_r2 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r3 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text)) +

    [Called By]

    • >>   __init +
    + +

    __call_via_r3 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r4 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __call_via_r4 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r5 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __call_via_r5 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r6 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) +

    [Called By]

    • >>   _printf_pre_padding +
    • >>   _printf_post_padding +
    + +

    __call_via_r6 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __ARM_call_via_r7 (Thumb, 2 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __call_via_r7 (Thumb, 0 bytes, Stack size unknown bytes, callvia.o(.text), UNUSED) + +

    __init (Thumb, 26 bytes, Stack size 0 bytes, init.o(.text)) +

    [Calls]

    • >>   __call_main +
    • >>   __ARM_call_via_r3 +
    +
    [Called By]
    • >>   __main (via Veneer) +
    + +

    __scatterload_rt2 (Thumb, 0 bytes, Stack size 0 bytes, init.o(.text), UNUSED) + +

    __0sprintf_6 (Thumb, 36 bytes, Stack size 24 bytes, printf6.o(i.__0sprintf_6), UNUSED) +

    [Calls]

    • >>   _sputc +
    • >>   _printf_core +
    + +

    __1sprintf (Thumb, 0 bytes, Stack size 24 bytes, printf6.o(i.__0sprintf_6)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = __1sprintf +
    +
    [Called By]
    • >>   InsertDynamicValues +
    + +

    __scatterload_copy (ARM, 24 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_copy), UNUSED) +

    [Calls]

    • >>   __scatterload_copy +
    +
    [Called By]
    • >>   __scatterload_copy +
    + +

    __scatterload_null (ARM, 4 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_null), UNUSED) + +

    __scatterload_zeroinit (ARM, 24 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_zeroinit), UNUSED) +

    +

    +Local Symbols +

    +

    Undef_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   Undef_Handler +
    +
    [Called By]
    • >>   Undef_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    SWI_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   SWI_Handler +
    +
    [Called By]
    • >>   SWI_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    PAbt_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   PAbt_Handler +
    +
    [Called By]
    • >>   PAbt_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    DAbt_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   DAbt_Handler +
    +
    [Called By]
    • >>   DAbt_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    IRQ_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   IRQ_Handler +
    +
    [Called By]
    • >>   IRQ_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    FIQ_Handler (ARM, 4 bytes, Stack size unknown bytes, lpc2300.o(RESET)) +

    [Calls]

    • >>   FIQ_Handler +
    +
    [Called By]
    • >>   FIQ_Handler +
    +
    [Address Reference Count : 1]
    • lpc2300.o(RESET) +
    +

    _printf_core (Thumb, 790 bytes, Stack size 96 bytes, printf6.o(i._printf_core), UNUSED) +

    [Calls]

    • >>   _printf_pre_padding +
    • >>   _printf_post_padding +
    • >>   __aeabi_uidivmod +
    • >>   __ARM_call_via_r2 +
    +
    [Called By]
    • >>   __0sprintf_6 +
    + +

    _printf_post_padding (Thumb, 38 bytes, Stack size 24 bytes, printf6.o(i._printf_post_padding), UNUSED) +

    [Calls]

    • >>   __ARM_call_via_r6 +
    +
    [Called By]
    • >>   _printf_core +
    + +

    _printf_pre_padding (Thumb, 48 bytes, Stack size 40 bytes, printf6.o(i._printf_pre_padding), UNUSED) +

    [Calls]

    • >>   __ARM_call_via_r6 +
    +
    [Called By]
    • >>   _printf_core +
    + +

    _sputc (Thumb, 10 bytes, Stack size 0 bytes, printf6.o(i._sputc)) +

    [Called By]

    • >>   __0sprintf_6 +
    +
    [Address Reference Count : 1]
    • printf6.o(i.__0sprintf_6) +

    +

    +Undefined Global Symbols +


    Index: /webserver/example/EasyWEB/Objects/easyweb.lnp =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.lnp (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.lnp (revision 9) @@ -0,0 +1,4 @@ +".\objects\easyweb.o" ".\objects\tcpip.o" ".\objects\emac.o" ".\objects\retarget.o" ".\objects\lpc2300.o" --library_type=microlib --device DARMP --strict --scatter ".\Objects\easyweb.sct" +--autoat --summary_stderr --info summarysizes --map --xref --callgraph --symbols +--info sizes --info totals --info unused --info veneers + --list ".\Listing\easyweb.map" -o ".\Objects\easyweb.axf" Index: /webserver/example/EasyWEB/Objects/easyweb.sct =================================================================== --- /webserver/example/EasyWEB/Objects/easyweb.sct (revision 9) +++ /webserver/example/EasyWEB/Objects/easyweb.sct (revision 9) @@ -0,0 +1,15 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x00000000 0x00080000 { ; load region size_region + ER_IROM1 0x00000000 0x00080000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x40000000 0x00008000 { ; RW data + .ANY (+RW +ZI) + } +} + Index: /webserver/example/EasyWEB/Objects/emac.d =================================================================== --- /webserver/example/EasyWEB/Objects/emac.d (revision 9) +++ /webserver/example/EasyWEB/Objects/emac.d (revision 9) @@ -0,0 +1,4 @@ +.\Objects\emac.o: EMAC.c +.\Objects\emac.o: EMAC.h +.\Objects\emac.o: tcpip.h +.\Objects\emac.o: C:\Keil\ARM\INC\Philips\LPC23xx.h Index: /webserver/example/EasyWEB/EMAC.h =================================================================== --- /webserver/example/EasyWEB/EMAC.h (revision 9) +++ /webserver/example/EasyWEB/EMAC.h (revision 9) @@ -0,0 +1,315 @@ +/*---------------------------------------------------------------------------- + * LPC2378 Ethernet Definitions + *---------------------------------------------------------------------------- + * Name: EMAC.H + * Purpose: Philips LPC2378 EMAC hardware definitions + *---------------------------------------------------------------------------- + * Copyright (c) 2006 KEIL - An ARM Company. All rights reserved. + *---------------------------------------------------------------------------*/ + +#ifndef __EMAC_H +#define __EMAC_H + +#define MYMAC_1 0x00 /* our ethernet (MAC) address */ +#define MYMAC_2 0x30 /* (MUST be unique in LAN!) */ +#define MYMAC_3 0x6C +#define MYMAC_4 0x00 +#define MYMAC_5 0x00 +#define MYMAC_6 0x02 + +/* EMAC Memory Buffer configuration for 16K Ethernet RAM. */ +#define NUM_RX_FRAG 4 /* Num.of RX Fragments 4*1536= 6.0kB */ +#define NUM_TX_FRAG 3 /* Num.of TX Fragments 3*1536= 4.6kB */ +#define ETH_FRAG_SIZE 1536 /* Packet Fragment size 1536 Bytes */ + +#define ETH_MAX_FLEN 1536 /* Max. Ethernet Frame Size */ + +/* EMAC variables located in 16K Ethernet SRAM */ +#define RX_DESC_BASE 0x7FE00000 +#define RX_STAT_BASE (RX_DESC_BASE + NUM_RX_FRAG*8) +#define TX_DESC_BASE (RX_STAT_BASE + NUM_RX_FRAG*8) +#define TX_STAT_BASE (TX_DESC_BASE + NUM_TX_FRAG*8) +#define RX_BUF_BASE (TX_STAT_BASE + NUM_TX_FRAG*4) +#define TX_BUF_BASE (RX_BUF_BASE + NUM_RX_FRAG*ETH_FRAG_SIZE) + +/* RX and TX descriptor and status definitions. */ +#define RX_DESC_PACKET(i) (*(unsigned int *)(RX_DESC_BASE + 8*i)) +#define RX_DESC_CTRL(i) (*(unsigned int *)(RX_DESC_BASE+4 + 8*i)) +#define RX_STAT_INFO(i) (*(unsigned int *)(RX_STAT_BASE + 8*i)) +#define RX_STAT_HASHCRC(i) (*(unsigned int *)(RX_STAT_BASE+4 + 8*i)) +#define TX_DESC_PACKET(i) (*(unsigned int *)(TX_DESC_BASE + 8*i)) +#define TX_DESC_CTRL(i) (*(unsigned int *)(TX_DESC_BASE+4 + 8*i)) +#define TX_STAT_INFO(i) (*(unsigned int *)(TX_STAT_BASE + 4*i)) +#define RX_BUF(i) (RX_BUF_BASE + ETH_FRAG_SIZE*i) +#define TX_BUF(i) (TX_BUF_BASE + ETH_FRAG_SIZE*i) + +/* MAC Configuration Register 1 */ +#define MAC1_REC_EN 0x00000001 /* Receive Enable */ +#define MAC1_PASS_ALL 0x00000002 /* Pass All Receive Frames */ +#define MAC1_RX_FLOWC 0x00000004 /* RX Flow Control */ +#define MAC1_TX_FLOWC 0x00000008 /* TX Flow Control */ +#define MAC1_LOOPB 0x00000010 /* Loop Back Mode */ +#define MAC1_RES_TX 0x00000100 /* Reset TX Logic */ +#define MAC1_RES_MCS_TX 0x00000200 /* Reset MAC TX Control Sublayer */ +#define MAC1_RES_RX 0x00000400 /* Reset RX Logic */ +#define MAC1_RES_MCS_RX 0x00000800 /* Reset MAC RX Control Sublayer */ +#define MAC1_SIM_RES 0x00004000 /* Simulation Reset */ +#define MAC1_SOFT_RES 0x00008000 /* Soft Reset MAC */ + +/* MAC Configuration Register 2 */ +#define MAC2_FULL_DUP 0x00000001 /* Full Duplex Mode */ +#define MAC2_FRM_LEN_CHK 0x00000002 /* Frame Length Checking */ +#define MAC2_HUGE_FRM_EN 0x00000004 /* Huge Frame Enable */ +#define MAC2_DLY_CRC 0x00000008 /* Delayed CRC Mode */ +#define MAC2_CRC_EN 0x00000010 /* Append CRC to every Frame */ +#define MAC2_PAD_EN 0x00000020 /* Pad all Short Frames */ +#define MAC2_VLAN_PAD_EN 0x00000040 /* VLAN Pad Enable */ +#define MAC2_ADET_PAD_EN 0x00000080 /* Auto Detect Pad Enable */ +#define MAC2_PPREAM_ENF 0x00000100 /* Pure Preamble Enforcement */ +#define MAC2_LPREAM_ENF 0x00000200 /* Long Preamble Enforcement */ +#define MAC2_NO_BACKOFF 0x00001000 /* No Backoff Algorithm */ +#define MAC2_BACK_PRESSURE 0x00002000 /* Backoff Presurre / No Backoff */ +#define MAC2_EXCESS_DEF 0x00004000 /* Excess Defer */ + +/* Back-to-Back Inter-Packet-Gap Register */ +#define IPGT_FULL_DUP 0x00000015 /* Recommended value for Full Duplex */ +#define IPGT_HALF_DUP 0x00000012 /* Recommended value for Half Duplex */ + +/* Non Back-to-Back Inter-Packet-Gap Register */ +#define IPGR_DEF 0x00000012 /* Recommended value */ + +/* Collision Window/Retry Register */ +#define CLRT_DEF 0x0000370F /* Default value */ + +/* PHY Support Register */ +#define SUPP_SPEED 0x00000100 /* Reduced MII Logic Current Speed */ +#define SUPP_RES_RMII 0x00000800 /* Reset Reduced MII Logic */ + +/* Test Register */ +#define TEST_SHCUT_PQUANTA 0x00000001 /* Shortcut Pause Quanta */ +#define TEST_TST_PAUSE 0x00000002 /* Test Pause */ +#define TEST_TST_BACKP 0x00000004 /* Test Back Pressure */ + +/* MII Management Configuration Register */ +#define MCFG_SCAN_INC 0x00000001 /* Scan Increment PHY Address */ +#define MCFG_SUPP_PREAM 0x00000002 /* Suppress Preamble */ +#define MCFG_CLK_SEL 0x0000001C /* Clock Select Mask */ +#define MCFG_RES_MII 0x00008000 /* Reset MII Management Hardware */ + +/* MII Management Command Register */ +#define MCMD_READ 0x00000001 /* MII Read */ +#define MCMD_SCAN 0x00000002 /* MII Scan continuously */ + +#define MII_WR_TOUT 0x00050000 /* MII Write timeout count */ +#define MII_RD_TOUT 0x00050000 /* MII Read timeout count */ + +/* MII Management Address Register */ +#define MADR_REG_ADR 0x0000001F /* MII Register Address Mask */ +#define MADR_PHY_ADR 0x00001F00 /* PHY Address Mask */ + +/* MII Management Indicators Register */ +#define MIND_BUSY 0x00000001 /* MII is Busy */ +#define MIND_SCAN 0x00000002 /* MII Scanning in Progress */ +#define MIND_NOT_VAL 0x00000004 /* MII Read Data not valid */ +#define MIND_MII_LINK_FAIL 0x00000008 /* MII Link Failed */ + +/* Command Register */ +#define CR_RX_EN 0x00000001 /* Enable Receive */ +#define CR_TX_EN 0x00000002 /* Enable Transmit */ +#define CR_REG_RES 0x00000008 /* Reset Host Registers */ +#define CR_TX_RES 0x00000010 /* Reset Transmit Datapath */ +#define CR_RX_RES 0x00000020 /* Reset Receive Datapath */ +#define CR_PASS_RUNT_FRM 0x00000040 /* Pass Runt Frames */ +#define CR_PASS_RX_FILT 0x00000080 /* Pass RX Filter */ +#define CR_TX_FLOW_CTRL 0x00000100 /* TX Flow Control */ +#define CR_RMII 0x00000200 /* Reduced MII Interface */ +#define CR_FULL_DUP 0x00000400 /* Full Duplex */ + +/* Status Register */ +#define SR_RX_EN 0x00000001 /* Enable Receive */ +#define SR_TX_EN 0x00000002 /* Enable Transmit */ + +/* Transmit Status Vector 0 Register */ +#define TSV0_CRC_ERR 0x00000001 /* CRC error */ +#define TSV0_LEN_CHKERR 0x00000002 /* Length Check Error */ +#define TSV0_LEN_OUTRNG 0x00000004 /* Length Out of Range */ +#define TSV0_DONE 0x00000008 /* Tramsmission Completed */ +#define TSV0_MCAST 0x00000010 /* Multicast Destination */ +#define TSV0_BCAST 0x00000020 /* Broadcast Destination */ +#define TSV0_PKT_DEFER 0x00000040 /* Packet Deferred */ +#define TSV0_EXC_DEFER 0x00000080 /* Excessive Packet Deferral */ +#define TSV0_EXC_COLL 0x00000100 /* Excessive Collision */ +#define TSV0_LATE_COLL 0x00000200 /* Late Collision Occured */ +#define TSV0_GIANT 0x00000400 /* Giant Frame */ +#define TSV0_UNDERRUN 0x00000800 /* Buffer Underrun */ +#define TSV0_BYTES 0x0FFFF000 /* Total Bytes Transferred */ +#define TSV0_CTRL_FRAME 0x10000000 /* Control Frame */ +#define TSV0_PAUSE 0x20000000 /* Pause Frame */ +#define TSV0_BACK_PRESS 0x40000000 /* Backpressure Method Applied */ +#define TSV0_VLAN 0x80000000 /* VLAN Frame */ + +/* Transmit Status Vector 1 Register */ +#define TSV1_BYTE_CNT 0x0000FFFF /* Transmit Byte Count */ +#define TSV1_COLL_CNT 0x000F0000 /* Transmit Collision Count */ + +/* Receive Status Vector Register */ +#define RSV_BYTE_CNT 0x0000FFFF /* Receive Byte Count */ +#define RSV_PKT_IGNORED 0x00010000 /* Packet Previously Ignored */ +#define RSV_RXDV_SEEN 0x00020000 /* RXDV Event Previously Seen */ +#define RSV_CARR_SEEN 0x00040000 /* Carrier Event Previously Seen */ +#define RSV_REC_CODEV 0x00080000 /* Receive Code Violation */ +#define RSV_CRC_ERR 0x00100000 /* CRC Error */ +#define RSV_LEN_CHKERR 0x00200000 /* Length Check Error */ +#define RSV_LEN_OUTRNG 0x00400000 /* Length Out of Range */ +#define RSV_REC_OK 0x00800000 /* Frame Received OK */ +#define RSV_MCAST 0x01000000 /* Multicast Frame */ +#define RSV_BCAST 0x02000000 /* Broadcast Frame */ +#define RSV_DRIB_NIBB 0x04000000 /* Dribble Nibble */ +#define RSV_CTRL_FRAME 0x08000000 /* Control Frame */ +#define RSV_PAUSE 0x10000000 /* Pause Frame */ +#define RSV_UNSUPP_OPC 0x20000000 /* Unsupported Opcode */ +#define RSV_VLAN 0x40000000 /* VLAN Frame */ + +/* Flow Control Counter Register */ +#define FCC_MIRR_CNT 0x0000FFFF /* Mirror Counter */ +#define FCC_PAUSE_TIM 0xFFFF0000 /* Pause Timer */ + +/* Flow Control Status Register */ +#define FCS_MIRR_CNT 0x0000FFFF /* Mirror Counter Current */ + +/* Receive Filter Control Register */ +#define RFC_UCAST_EN 0x00000001 /* Accept Unicast Frames Enable */ +#define RFC_BCAST_EN 0x00000002 /* Accept Broadcast Frames Enable */ +#define RFC_MCAST_EN 0x00000004 /* Accept Multicast Frames Enable */ +#define RFC_UCAST_HASH_EN 0x00000008 /* Accept Unicast Hash Filter Frames */ +#define RFC_MCAST_HASH_EN 0x00000010 /* Accept Multicast Hash Filter Fram.*/ +#define RFC_PERFECT_EN 0x00000020 /* Accept Perfect Match Enable */ +#define RFC_MAGP_WOL_EN 0x00001000 /* Magic Packet Filter WoL Enable */ +#define RFC_PFILT_WOL_EN 0x00002000 /* Perfect Filter WoL Enable */ + +/* Receive Filter WoL Status/Clear Registers */ +#define WOL_UCAST 0x00000001 /* Unicast Frame caused WoL */ +#define WOL_BCAST 0x00000002 /* Broadcast Frame caused WoL */ +#define WOL_MCAST 0x00000004 /* Multicast Frame caused WoL */ +#define WOL_UCAST_HASH 0x00000008 /* Unicast Hash Filter Frame WoL */ +#define WOL_MCAST_HASH 0x00000010 /* Multicast Hash Filter Frame WoL */ +#define WOL_PERFECT 0x00000020 /* Perfect Filter WoL */ +#define WOL_RX_FILTER 0x00000080 /* RX Filter caused WoL */ +#define WOL_MAG_PACKET 0x00000100 /* Magic Packet Filter caused WoL */ + +/* Interrupt Status/Enable/Clear/Set Registers */ +#define INT_RX_OVERRUN 0x00000001 /* Overrun Error in RX Queue */ +#define INT_RX_ERR 0x00000002 /* Receive Error */ +#define INT_RX_FIN 0x00000004 /* RX Finished Process Descriptors */ +#define INT_RX_DONE 0x00000008 /* Receive Done */ +#define INT_TX_UNDERRUN 0x00000010 /* Transmit Underrun */ +#define INT_TX_ERR 0x00000020 /* Transmit Error */ +#define INT_TX_FIN 0x00000040 /* TX Finished Process Descriptors */ +#define INT_TX_DONE 0x00000080 /* Transmit Done */ +#define INT_SOFT_INT 0x00001000 /* Software Triggered Interrupt */ +#define INT_WAKEUP 0x00002000 /* Wakeup Event Interrupt */ + +/* Power Down Register */ +#define PD_POWER_DOWN 0x80000000 /* Power Down MAC */ + +/* RX Descriptor Control Word */ +#define RCTRL_SIZE 0x000007FF /* Buffer size mask */ +#define RCTRL_INT 0x80000000 /* Generate RxDone Interrupt */ + +/* RX Status Hash CRC Word */ +#define RHASH_SA 0x000001FF /* Hash CRC for Source Address */ +#define RHASH_DA 0x001FF000 /* Hash CRC for Destination Address */ + +/* RX Status Information Word */ +#define RINFO_SIZE 0x000007FF /* Data size in bytes */ +#define RINFO_CTRL_FRAME 0x00040000 /* Control Frame */ +#define RINFO_VLAN 0x00080000 /* VLAN Frame */ +#define RINFO_FAIL_FILT 0x00100000 /* RX Filter Failed */ +#define RINFO_MCAST 0x00200000 /* Multicast Frame */ +#define RINFO_BCAST 0x00400000 /* Broadcast Frame */ +#define RINFO_CRC_ERR 0x00800000 /* CRC Error in Frame */ +#define RINFO_SYM_ERR 0x01000000 /* Symbol Error from PHY */ +#define RINFO_LEN_ERR 0x02000000 /* Length Error */ +#define RINFO_RANGE_ERR 0x04000000 /* Range Error (exceeded max. size) */ +#define RINFO_ALIGN_ERR 0x08000000 /* Alignment Error */ +#define RINFO_OVERRUN 0x10000000 /* Receive overrun */ +#define RINFO_NO_DESCR 0x20000000 /* No new Descriptor available */ +#define RINFO_LAST_FLAG 0x40000000 /* Last Fragment in Frame */ +#define RINFO_ERR 0x80000000 /* Error Occured (OR of all errors) */ + +#define RINFO_ERR_MASK (RINFO_FAIL_FILT | RINFO_CRC_ERR | RINFO_SYM_ERR | \ + RINFO_LEN_ERR | RINFO_ALIGN_ERR | RINFO_OVERRUN) + +/* TX Descriptor Control Word */ +#define TCTRL_SIZE 0x000007FF /* Size of data buffer in bytes */ +#define TCTRL_OVERRIDE 0x04000000 /* Override Default MAC Registers */ +#define TCTRL_HUGE 0x08000000 /* Enable Huge Frame */ +#define TCTRL_PAD 0x10000000 /* Pad short Frames to 64 bytes */ +#define TCTRL_CRC 0x20000000 /* Append a hardware CRC to Frame */ +#define TCTRL_LAST 0x40000000 /* Last Descriptor for TX Frame */ +#define TCTRL_INT 0x80000000 /* Generate TxDone Interrupt */ + +/* TX Status Information Word */ +#define TINFO_COL_CNT 0x01E00000 /* Collision Count */ +#define TINFO_DEFER 0x02000000 /* Packet Deferred (not an error) */ +#define TINFO_EXCESS_DEF 0x04000000 /* Excessive Deferral */ +#define TINFO_EXCESS_COL 0x08000000 /* Excessive Collision */ +#define TINFO_LATE_COL 0x10000000 /* Late Collision Occured */ +#define TINFO_UNDERRUN 0x20000000 /* Transmit Underrun */ +#define TINFO_NO_DESCR 0x40000000 /* No new Descriptor available */ +#define TINFO_ERR 0x80000000 /* Error Occured (OR of all errors) */ + +/* ENET Device Revision ID */ +#define OLD_EMAC_MODULE_ID 0x39022000 /* Rev. ID for first rev '-' */ + +/* DP83848C PHY Registers */ +#define PHY_REG_BMCR 0x00 /* Basic Mode Control Register */ +#define PHY_REG_BMSR 0x01 /* Basic Mode Status Register */ +#define PHY_REG_IDR1 0x02 /* PHY Identifier 1 */ +#define PHY_REG_IDR2 0x03 /* PHY Identifier 2 */ +#define PHY_REG_ANAR 0x04 /* Auto-Negotiation Advertisement */ +#define PHY_REG_ANLPAR 0x05 /* Auto-Neg. Link Partner Abitily */ +#define PHY_REG_ANER 0x06 /* Auto-Neg. Expansion Register */ +#define PHY_REG_ANNPTR 0x07 /* Auto-Neg. Next Page TX */ + +/* PHY Extended Registers */ +#define PHY_REG_STS 0x10 /* Status Register */ +#define PHY_REG_MICR 0x11 /* MII Interrupt Control Register */ +#define PHY_REG_MISR 0x12 /* MII Interrupt Status Register */ +#define PHY_REG_FCSCR 0x14 /* False Carrier Sense Counter */ +#define PHY_REG_RECR 0x15 /* Receive Error Counter */ +#define PHY_REG_PCSR 0x16 /* PCS Sublayer Config. and Status */ +#define PHY_REG_RBR 0x17 /* RMII and Bypass Register */ +#define PHY_REG_LEDCR 0x18 /* LED Direct Control Register */ +#define PHY_REG_PHYCR 0x19 /* PHY Control Register */ +#define PHY_REG_10BTSCR 0x1A /* 10Base-T Status/Control Register */ +#define PHY_REG_CDCTRL1 0x1B /* CD Test Control and BIST Extens. */ +#define PHY_REG_EDCR 0x1D /* Energy Detect Control Register */ + +#define PHY_FULLD_100M 0x2100 /* Full Duplex 100Mbit */ +#define PHY_HALFD_100M 0x2000 /* Half Duplex 100Mbit */ +#define PHY_FULLD_10M 0x0100 /* Full Duplex 10Mbit */ +#define PHY_HALFD_10M 0x0000 /* Half Duplex 10MBit */ +#define PHY_AUTO_NEG 0x3000 /* Select Auto Negotiation */ + +#define DP83848C_DEF_ADR 0x0100 /* Default PHY device address */ +#define DP83848C_ID 0x20005C90 /* PHY Identifier */ + +// prototypes +void Init_EMAC(void); +unsigned short ReadFrameBE_EMAC(void); +void CopyToFrame_EMAC(void *Source, unsigned int Size); +void CopyFromFrame_EMAC(void *Dest, unsigned short Size); +void DummyReadFrame_EMAC(unsigned short Size); +unsigned short StartReadFrame(void); +void EndReadFrame(void); +unsigned int CheckFrameReceived(void); +void RequestSend(unsigned short FrameSize); +unsigned int Rdy4Tx(void); + +#endif + +/*---------------------------------------------------------------------------- + * end of file + *---------------------------------------------------------------------------*/ + Index: /webserver/example/EasyWEB/easyweb_MCB2300.dep =================================================================== --- /webserver/example/EasyWEB/easyweb_MCB2300.dep (revision 9) +++ /webserver/example/EasyWEB/easyweb_MCB2300.dep (revision 9) @@ -0,0 +1,25 @@ +Dependencies for Project 'easyweb', Target 'MCB2300': (DO NOT MODIFY !) +F (.\webpage.html)(0x4769ED0F)() +F (.\easyweb.c)(0x4769F929)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\easyweb.o" --depend ".\Objects\easyweb.d") +I (C:\Keil\ARM\RV31\INC\stdlib.h)(0x463F2D32) +I (C:\Keil\ARM\RV31\INC\stdio.h)(0x463F2D32) +I (C:\Keil\ARM\RV31\INC\string.h)(0x463F2D32) +I (easyweb.h)(0x476A10CB) +I (EMAC.h)(0x4769E107) +I (tcpip.h)(0x4769E63B) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E6476A) +I (webpage.h)(0x476A126D) +F (.\tcpip.c)(0x4769F929)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\tcpip.o" --depend ".\Objects\tcpip.d") +I (tcpip.h)(0x4769E63B) +I (EMAC.h)(0x4769E107) +I (C:\Keil\ARM\RV31\INC\string.h)(0x463F2D32) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E6476A) +F (.\EMAC.c)(0x476A126D)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\emac.o" --depend ".\Objects\emac.d") +I (EMAC.h)(0x4769E107) +I (tcpip.h)(0x4769E63B) +I (C:\Keil\ARM\INC\Philips\LPC23xx.h)(0x46E6476A) +F (.\Retarget.c)(0x46E6477E)( --thumb -c --device DARMP -D__MICROLIB -g -O3 --apcs=interwork -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\retarget.o" --depend ".\Objects\retarget.d") +I (C:\Keil\ARM\RV31\INC\rt_misc.h)(0x463F2D32) +F (.\LPC2300.s)(0x46E6477E)(--device DARMP -g --apcs=interwork --pd "__MICROLIB SETA 1" -I "C:\Keil\ARM\INC\Philips" -o ".\Objects\LPC2300.o") +F (.\tcpip.h)(0x4769E63B)() +F (.\Abstract.txt)(0x46E6477E)() Index: /webserver/example/EasyWEB/Retarget.c =================================================================== --- /webserver/example/EasyWEB/Retarget.c (revision 9) +++ /webserver/example/EasyWEB/Retarget.c (revision 9) @@ -0,0 +1,21 @@ +/******************************************************************************/ +/* RETARGET.C: 'Retarget' layer for target-dependent low level functions */ +/******************************************************************************/ +/* This file is part of the uVision/ARM development tools. */ +/* Copyright (c) 2005-2006 Keil Software. All rights reserved. */ +/* This software may only be used under the terms of a valid, current, */ +/* end user licence from KEIL for a compatible version of KEIL software */ +/* development tools. Nothing else gives you the right to use this software. */ +/******************************************************************************/ + +#include + +#pragma import(__use_no_semihosting_swi) + +void _ttywrch(int ch) { + // Not used (No Output) +} + +void _sys_exit(int return_code) { +label: goto label; /* endless loop */ +} Index: /webserver/example/EasyWEB/webpage.h =================================================================== --- /webserver/example/EasyWEB/webpage.h (revision 9) +++ /webserver/example/EasyWEB/webpage.h (revision 9) @@ -0,0 +1,58 @@ +const unsigned char WebSide[] = { +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"easyWEB - dynamic Webside\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"

    \r\n" +"Hello World! From CP-JR ARM7 LPC2368 \r\n" +"

    \r\n" +"\r\n" +"

    \r\n" +"This is a dynamic website hosted by the embedded Webserver \r\n" +"easyWEB.\r\n" +"

    \r\n" +"\r\n" +"

    \r\n" +"Hardware:\r\n" +"

    \r\n" +"\r\n" +"
      \r\n" +"
    • CP-JR ARM7 LPC2368 Board From ETT CO.,LTD
    • \r\n" +"
    • Run 48 MHz, 512KB Flash, 32 KB SRAM
    • \r\n" +"
    • Embedded EMAC Ethernet Controller
    • \r\n" +"
    \r\n" +"\r\n" +"

    \r\n" +"ADC0(P0.23) Input :\r\n" +"

    \r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"
    \r\n" +"\r\n" +"\r\n" +"
     
    \r\n" +"
    \r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n" +"
    0V0.5V1V1.5V2V2.5V3V
    \r\n" +"\r\n" +"\r\n" +"\r\n" +"\r\n"}; Index: /webserver/example/EasyWEB/tcpip.c =================================================================== --- /webserver/example/EasyWEB/tcpip.c (revision 9) +++ /webserver/example/EasyWEB/tcpip.c (revision 9) @@ -0,0 +1,968 @@ +/****************************************************************** + ***** ***** + ***** Name: tcpip.c ***** + ***** Ver.: 1.0 ***** + ***** Date: 07/05/2001 ***** + ***** Auth: Andreas Dannenberg ***** + ***** HTWK Leipzig ***** + ***** university of applied sciences ***** + ***** Germany ***** + ***** Func: implements the TCP/IP-stack and provides a ***** + ***** simple API to the user ***** + ***** ***** + ******************************************************************/ + +#include "tcpip.h" +#include "EMAC.h" +#include +#include + +const unsigned char MyMAC[6] = // "M1-M2-M3-M4-M5-M6" +{ + MYMAC_1, MYMAC_2, MYMAC_3, + MYMAC_4, MYMAC_5, MYMAC_6 +}; + +// easyWEB-API function +// initalizes the LAN-controller, reset flags, starts timer-ISR + +void TCPLowLevelInit(void) +{ +// Keil: Timer 0 is used for TCP retransmission control + T0MR0 = 3144000; // 262mSec + T0MCR = 3; // Interrupt and Reset on MR0 + T0TCR = 1; // Timer0 Enable + VICVectAddr4 = (unsigned int)TCPClockHandler; // set interrupt vector in 4 + VICIntEnable = 0x00000010; // Enable Timer0 Interrupt + + Init_EMAC(); + TransmitControl = 0; + TCPFlags = 0; + TCPStateMachine = CLOSED; + SocketStatus = 0; +} + +// easyWEB-API function +// does a passive open (listen on 'MyIP:TCPLocalPort' for an incoming +// connection) + +void TCPPassiveOpen(void) +{ + if (TCPStateMachine == CLOSED) + { + TCPFlags &= ~TCP_ACTIVE_OPEN; // let's do a passive open! + TCPStateMachine = LISTENING; + SocketStatus = SOCK_ACTIVE; // reset, socket now active + } +} + +// easyWEB-API function +// does an active open (tries to establish a connection between +// 'MyIP:TCPLocalPort' and 'RemoteIP:TCPRemotePort') + +void TCPActiveOpen(void) +{ + if ((TCPStateMachine == CLOSED) || (TCPStateMachine == LISTENING)) + { + TCPFlags |= TCP_ACTIVE_OPEN; // let's do an active open! + TCPFlags &= ~IP_ADDR_RESOLVED; // we haven't opponents MAC yet + + PrepareARP_REQUEST(); // ask for MAC by sending a broadcast + LastFrameSent = ARP_REQUEST; + TCPStartRetryTimer(); + SocketStatus = SOCK_ACTIVE; // reset, socket now active + } +} + +// easyWEB-API function +// closes an open connection + +void TCPClose(void) +{ + switch (TCPStateMachine) + { + case LISTENING : + case SYN_SENT : + { + TCPStateMachine = CLOSED; + TCPFlags = 0; + SocketStatus = 0; + break; + } + case SYN_RECD : + case ESTABLISHED : + { + TCPFlags |= TCP_CLOSE_REQUESTED; + break; + } + } +} + +// easyWEB-API function +// releases the receive-buffer and allows easyWEB to store new data +// NOTE: rx-buffer MUST be released periodically, else the other TCP +// get no ACKs for the data it sent + +void TCPReleaseRxBuffer(void) +{ + SocketStatus &= ~SOCK_DATA_AVAILABLE; +} + +// easyWEB-API function +// transmitts data stored in 'TCP_TX_BUF' +// NOTE: * number of bytes to transmit must have been written to 'TCPTxDataCount' +// * data-count MUST NOT exceed 'MAX_TCP_TX_DATA_SIZE' + +void TCPTransmitTxBuffer(void) +{ + if ((TCPStateMachine == ESTABLISHED) || (TCPStateMachine == CLOSE_WAIT)) + if (SocketStatus & SOCK_TX_BUF_RELEASED) + { + SocketStatus &= ~SOCK_TX_BUF_RELEASED; // occupy tx-buffer + TCPUNASeqNr += TCPTxDataCount; // advance UNA + + TxFrame1Size = ETH_HEADER_SIZE + IP_HEADER_SIZE + TCP_HEADER_SIZE + TCPTxDataCount; + TransmitControl |= SEND_FRAME1; + + LastFrameSent = TCP_DATA_FRAME; + TCPStartRetryTimer(); + } +} + +// Reads the length of the received ethernet frame and checks if the +// destination address is a broadcast message or not +unsigned int IsBroadcast(void) { + unsigned short RecdDestMAC[3]; // 48 bit MAC + + RecdFrameLength = StartReadFrame(); + + CopyFromFrame_EMAC(&RecdDestMAC, 6); // receive DA to see if it was a broadcast + CopyFromFrame_EMAC(&RecdFrameMAC, 6); // store SA (for our answer) + + if ((RecdDestMAC[0] == 0xFFFF) && + (RecdDestMAC[1] == 0xFFFF) && + (RecdDestMAC[2] == 0xFFFF)) { + return(1); + } else { + return (0); + } +} + + +// easyWEB's 'main()'-function +// must be called from user program periodically (the often - the better) +// handles network, TCP/IP-stack and user events + +void DoNetworkStuff(void) +{ + if (CheckFrameReceived()) // Packet received + { + if (IsBroadcast()) { + ProcessEthBroadcastFrame(); + } else { + ProcessEthIAFrame(); + } + EndReadFrame(); // release buffer in ethernet controller + + // Active Process Frame Status // + //LED2_OFF(); // Status Frame Process Ready + //FIO3SET = 0x04000000; // OFF LED2 + } + + if (TCPFlags & TCP_TIMER_RUNNING) + if (TCPFlags & TIMER_TYPE_RETRY) + { + if (TCPTimer > RETRY_TIMEOUT) + { + TCPRestartTimer(); // set a new timeout + + if (RetryCounter) + { + TCPHandleRetransmission(); // resend last frame + RetryCounter--; + } + else + { + TCPStopTimer(); + TCPHandleTimeout(); + } + } + } + else if (TCPTimer > FIN_TIMEOUT) + { + TCPStateMachine = CLOSED; + TCPFlags = 0; // reset all flags, stop retransmission... + SocketStatus &= SOCK_DATA_AVAILABLE; // clear all flags but data available + } + + switch (TCPStateMachine) + { + case CLOSED : + case LISTENING : + { + if (TCPFlags & TCP_ACTIVE_OPEN) // stack has to open a connection? + if (TCPFlags & IP_ADDR_RESOLVED) // IP resolved? + if (!(TransmitControl & SEND_FRAME2)) // buffer free? + { + TCPSeqNr = ((unsigned long)ISNGenHigh << 16) | (T0TC & 0xFFFF); // Keil: changed from TAR to T0TC; + // set local ISN + TCPUNASeqNr = TCPSeqNr; + TCPAckNr = 0; // we don't know what to ACK! + TCPUNASeqNr++; // count SYN as a byte + PrepareTCP_FRAME(TCP_CODE_SYN); // send SYN frame + LastFrameSent = TCP_SYN_FRAME; + TCPStartRetryTimer(); // we NEED a retry-timeout + TCPStateMachine = SYN_SENT; + } + break; + } + case SYN_RECD : + case ESTABLISHED : + { + if (TCPFlags & TCP_CLOSE_REQUESTED) // user has user initated a close? + if (!(TransmitControl & (SEND_FRAME2 | SEND_FRAME1))) // buffers free? + if (TCPSeqNr == TCPUNASeqNr) // all data ACKed? + { + TCPUNASeqNr++; + PrepareTCP_FRAME(TCP_CODE_FIN | TCP_CODE_ACK); + LastFrameSent = TCP_FIN_FRAME; + TCPStartRetryTimer(); + TCPStateMachine = FIN_WAIT_1; + } + break; + } + case CLOSE_WAIT : + { + if (!(TransmitControl & (SEND_FRAME2 | SEND_FRAME1))) // buffers free? + if (TCPSeqNr == TCPUNASeqNr) // all data ACKed? + { + TCPUNASeqNr++; // count FIN as a byte + PrepareTCP_FRAME(TCP_CODE_FIN | TCP_CODE_ACK); // we NEED a retry-timeout + LastFrameSent = TCP_FIN_FRAME; // time to say goodbye... + TCPStartRetryTimer(); + TCPStateMachine = LAST_ACK; + } + break; + } + } + + if (TransmitControl & SEND_FRAME2) + { + RequestSend(TxFrame2Size); + + if (Rdy4Tx()) // NOTE: when using a very fast MCU, maybe + SendFrame2(); // the EMAC isn't ready yet, include + else { // a kind of timer or counter here + TCPStateMachine = CLOSED; + SocketStatus = SOCK_ERR_ETHERNET; // indicate an error to user + TCPFlags = 0; // clear all flags, stop timers etc. + } + + TransmitControl &= ~SEND_FRAME2; // clear tx-flag + } + + if (TransmitControl & SEND_FRAME1) + { + PrepareTCP_DATA_FRAME(); // build frame w/ actual SEQ, ACK.... + RequestSend(TxFrame1Size); + + if (Rdy4Tx()) // EMAC ready to accept our frame? + SendFrame1(); // (see note above) + else { + TCPStateMachine = CLOSED; + SocketStatus = SOCK_ERR_ETHERNET; // indicate an error to user + TCPFlags = 0; // clear all flags, stop timers etc. + } + + TransmitControl &= ~SEND_FRAME1; // clear tx-flag + } +} + +// easyWEB internal function +// handles an incoming broadcast frame + +void ProcessEthBroadcastFrame(void) +{ + unsigned short TargetIP[2]; + + if (ReadFrameBE_EMAC() == FRAME_ARP) // get frame type, check for ARP + if (ReadFrameBE_EMAC() == HARDW_ETH10) // Ethernet frame + if (ReadFrameBE_EMAC() == FRAME_IP) // check protocol + if (ReadFrameBE_EMAC() == IP_HLEN_PLEN) // check HLEN, PLEN + if (ReadFrameBE_EMAC() == OP_ARP_REQUEST) + { + DummyReadFrame_EMAC(6); // ignore sender's hardware address + CopyFromFrame_EMAC(&RecdFrameIP, 4); // read sender's protocol address + DummyReadFrame_EMAC(6); // ignore target's hardware address + CopyFromFrame_EMAC(&TargetIP, 4); // read target's protocol address + if (!memcmp(&MyIP, &TargetIP, 4)) // is it for us? + PrepareARP_ANSWER(); // yes->create ARP_ANSWER frame + } +} + +// easyWEB internal function +// handles an incoming frame that passed EMAC's address filter +// (individual addressed = IA) + +void ProcessEthIAFrame(void) +{ + unsigned short TargetIP[2]; + unsigned char ProtocolType; + + switch (ReadFrameBE_EMAC()) // get frame type + { + case FRAME_ARP : // check for ARP + { + if ((TCPFlags & (TCP_ACTIVE_OPEN | IP_ADDR_RESOLVED)) == TCP_ACTIVE_OPEN) + if (ReadFrameBE_EMAC() == HARDW_ETH10) // check for the right prot. etc. + if (ReadFrameBE_EMAC() == FRAME_IP) + if (ReadFrameBE_EMAC() == IP_HLEN_PLEN) + if (ReadFrameBE_EMAC() == OP_ARP_ANSWER) + { + TCPStopTimer(); // OK, now we've the MAC we wanted ;-) + CopyFromFrame_EMAC(&RemoteMAC, 6); // extract opponents MAC + TCPFlags |= IP_ADDR_RESOLVED; + } + break; + } + case FRAME_IP : // check for IP-type + { + if ((ReadFrameBE_EMAC() & 0xFF00 ) == IP_VER_IHL) // IPv4, IHL=5 (20 Bytes Header) + { // ignore Type Of Service + RecdIPFrameLength = ReadFrameBE_EMAC(); // get IP frame's length + ReadFrameBE_EMAC(); // ignore identification + + if (!(ReadFrameBE_EMAC() & (IP_FLAG_MOREFRAG | IP_FRAGOFS_MASK))) // only unfragm. frames + { + ProtocolType = ReadFrameBE_EMAC() & 0xFF; // get protocol, ignore TTL + ReadFrameBE_EMAC(); // ignore checksum + CopyFromFrame_EMAC(&RecdFrameIP, 4); // get source IP + CopyFromFrame_EMAC(&TargetIP, 4); // get destination IP + + if (!memcmp(&MyIP, &TargetIP, 4)) // is it for us? + switch (ProtocolType) { + case PROT_ICMP : { ProcessICMPFrame(); break; } + case PROT_TCP : { ProcessTCPFrame(); break; } + case PROT_UDP : break; // not implemented! + } + } + } + break; + } + } +} + +// easyWEB internal function +// we've just rec'd an ICMP-frame (Internet Control Message Protocol) +// check what to do and branch to the appropriate sub-function + +void ProcessICMPFrame(void) +{ + unsigned short ICMPTypeAndCode; + + ICMPTypeAndCode = ReadFrameBE_EMAC(); // get Message Type and Code + ReadFrameBE_EMAC(); // ignore ICMP checksum + + switch (ICMPTypeAndCode >> 8) { // check type + case ICMP_ECHO : // is echo request? + { + PrepareICMP_ECHO_REPLY(); // echo as much as we can... + break; + } + } +} + +// easyWEB internal function +// we've just rec'd an TCP-frame (Transmission Control Protocol) +// this function mainly implements the TCP state machine according to RFC793 + +void ProcessTCPFrame(void) +{ + unsigned short TCPSegSourcePort; // segment's source port + unsigned short TCPSegDestPort; // segment's destination port + unsigned long TCPSegSeq; // segment's sequence number + unsigned long TCPSegAck; // segment's acknowledge number + unsigned short TCPCode; // TCP code and header length + unsigned char TCPHeaderSize; // real TCP header length + unsigned short NrOfDataBytes; // real number of data + + TCPSegSourcePort = ReadFrameBE_EMAC(); // get ports + TCPSegDestPort = ReadFrameBE_EMAC(); + + if (TCPSegDestPort != TCPLocalPort) return; // drop segment if port doesn't match + + TCPSegSeq = (unsigned long)ReadFrameBE_EMAC() << 16; // get segment sequence nr. + TCPSegSeq |= ReadFrameBE_EMAC(); + + TCPSegAck = (unsigned long)ReadFrameBE_EMAC() << 16; // get segment acknowledge nr. + TCPSegAck |= ReadFrameBE_EMAC(); + + TCPCode = ReadFrameBE_EMAC(); // get control bits, header length... + + TCPHeaderSize = (TCPCode & DATA_OFS_MASK) >> 10; // header length in bytes + NrOfDataBytes = RecdIPFrameLength - IP_HEADER_SIZE - TCPHeaderSize; // seg. text length + + if (NrOfDataBytes > MAX_TCP_RX_DATA_SIZE) return; // packet too large for us :...-( + + if (TCPHeaderSize > TCP_HEADER_SIZE) // ignore options if any + DummyReadFrame_EMAC(TCPHeaderSize - TCP_HEADER_SIZE); + + switch (TCPStateMachine) // implement the TCP state machine + { + case CLOSED : + { + if (!(TCPCode & TCP_CODE_RST)) + { + TCPRemotePort = TCPSegSourcePort; + memcpy(&RemoteMAC, &RecdFrameMAC, 6); // save opponents MAC and IP + memcpy(&RemoteIP, &RecdFrameIP, 4); // for later use + + if (TCPCode & TCP_CODE_ACK) // make the reset sequence + { // acceptable to the other + TCPSeqNr = TCPSegAck; // TCP + PrepareTCP_FRAME(TCP_CODE_RST); + } + else + { + TCPSeqNr = 0; + TCPAckNr = TCPSegSeq + NrOfDataBytes; + if (TCPCode & (TCP_CODE_SYN | TCP_CODE_FIN)) TCPAckNr++; + PrepareTCP_FRAME(TCP_CODE_RST | TCP_CODE_ACK); + } + } + break; + } + case LISTENING : + { + if (!(TCPCode & TCP_CODE_RST)) // ignore segment containing RST + { + TCPRemotePort = TCPSegSourcePort; + memcpy(&RemoteMAC, &RecdFrameMAC, 6); // save opponents MAC and IP + memcpy(&RemoteIP, &RecdFrameIP, 4); // for later use + + if (TCPCode & TCP_CODE_ACK) // reset a bad + { // acknowledgement + TCPSeqNr = TCPSegAck; + PrepareTCP_FRAME(TCP_CODE_RST); + } + else if (TCPCode & TCP_CODE_SYN) + { + TCPAckNr = TCPSegSeq + 1; // get remote ISN, next byte we expect + TCPSeqNr = ((unsigned long)ISNGenHigh << 16) | (T0TC & 0xFFFF); // Keil: changed from TAR to T0TC; + // set local ISN + TCPUNASeqNr = TCPSeqNr + 1; // one byte out -> increase by one + PrepareTCP_FRAME(TCP_CODE_SYN | TCP_CODE_ACK); + LastFrameSent = TCP_SYN_ACK_FRAME; + TCPStartRetryTimer(); + TCPStateMachine = SYN_RECD; + } + } + break; + } + case SYN_SENT : + { + if (memcmp(&RemoteIP, &RecdFrameIP, 4)) break; // drop segment if its IP doesn't belong + // to current session + + if (TCPSegSourcePort != TCPRemotePort) break; // drop segment if port doesn't match + + if (TCPCode & TCP_CODE_ACK) // ACK field significant? + if (TCPSegAck != TCPUNASeqNr) // is our ISN ACKed? + { + if (!(TCPCode & TCP_CODE_RST)) + { + TCPSeqNr = TCPSegAck; + PrepareTCP_FRAME(TCP_CODE_RST); + } + break; // drop segment + } + + if (TCPCode & TCP_CODE_RST) // RST?? + { + if (TCPCode & TCP_CODE_ACK) // if ACK was acceptable, reset + { // connection + TCPStateMachine = CLOSED; + TCPFlags = 0; // reset all flags, stop retransmission... + SocketStatus = SOCK_ERR_CONN_RESET; + } + break; // drop segment + } + + if (TCPCode & TCP_CODE_SYN) // SYN?? + { + TCPAckNr = TCPSegSeq; // get opponents ISN + TCPAckNr++; // inc. by one... + + if (TCPCode & TCP_CODE_ACK) + { + TCPStopTimer(); // stop retransmission, other TCP got our SYN + TCPSeqNr = TCPUNASeqNr; // advance our sequence number + + PrepareTCP_FRAME(TCP_CODE_ACK); // ACK this ISN + TCPStateMachine = ESTABLISHED; + SocketStatus |= SOCK_CONNECTED; + SocketStatus |= SOCK_TX_BUF_RELEASED; // user may send data now :-) + } + else + { + TCPStopTimer(); + PrepareTCP_FRAME(TCP_CODE_SYN | TCP_CODE_ACK); // our SYN isn't ACKed yet, + LastFrameSent = TCP_SYN_ACK_FRAME; // now continue with sending + TCPStartRetryTimer(); // SYN_ACK frames + TCPStateMachine = SYN_RECD; + } + } + break; + } + default : + { + if (memcmp(&RemoteIP, &RecdFrameIP, 4)) break; // drop segment if IP doesn't belong + // to current session + + if (TCPSegSourcePort != TCPRemotePort) break; // drop segment if port doesn't match + + if (TCPSegSeq != TCPAckNr) break; // drop if it's not the segment we expect + + if (TCPCode & TCP_CODE_RST) // RST?? + { + TCPStateMachine = CLOSED; // close the state machine + TCPFlags = 0; // reset all flags, stop retransmission... + SocketStatus = SOCK_ERR_CONN_RESET; // indicate an error to user + break; + } + + if (TCPCode & TCP_CODE_SYN) // SYN?? + { + PrepareTCP_FRAME(TCP_CODE_RST); // is NOT allowed here! send a reset, + TCPStateMachine = CLOSED; // close connection... + TCPFlags = 0; // reset all flags, stop retransmission... + SocketStatus = SOCK_ERR_REMOTE; // fatal error! + break; // ...and drop the frame + } + + if (!(TCPCode & TCP_CODE_ACK)) break; // drop segment if the ACK bit is off + + if (TCPSegAck == TCPUNASeqNr) // is our last data sent ACKed? + { + TCPStopTimer(); // stop retransmission + TCPSeqNr = TCPUNASeqNr; // advance our sequence number + + switch (TCPStateMachine) // change state if necessary + { + case SYN_RECD : // ACK of our SYN? + { + TCPStateMachine = ESTABLISHED; // user may send data now :-) + SocketStatus |= SOCK_CONNECTED; + break; + } + case FIN_WAIT_1 : { TCPStateMachine = FIN_WAIT_2; break; } // ACK of our FIN? + case CLOSING : { TCPStateMachine = TIME_WAIT; break; } // ACK of our FIN? + case LAST_ACK : // ACK of our FIN? + { + TCPStateMachine = CLOSED; + TCPFlags = 0; // reset all flags, stop retransmission... + SocketStatus &= SOCK_DATA_AVAILABLE; // clear all flags but data available + break; + } + case TIME_WAIT : + { + PrepareTCP_FRAME(TCP_CODE_ACK); // ACK a retransmission of remote FIN + TCPRestartTimer(); // restart TIME_WAIT timeout + break; + } + } + + if (TCPStateMachine == ESTABLISHED) // if true, give the frame buffer back + SocketStatus |= SOCK_TX_BUF_RELEASED; // to user + } + + if ((TCPStateMachine == ESTABLISHED) || (TCPStateMachine == FIN_WAIT_1) || (TCPStateMachine == FIN_WAIT_2)) + if (NrOfDataBytes) // data available? + if (!(SocketStatus & SOCK_DATA_AVAILABLE)) // rx data-buffer empty? + { + DummyReadFrame_EMAC(6); // ignore window, checksum, urgent pointer + CopyFromFrame_EMAC(RxTCPBuffer, NrOfDataBytes);// fetch data and + TCPRxDataCount = NrOfDataBytes; // ...tell the user... + SocketStatus |= SOCK_DATA_AVAILABLE; // indicate the new data to user + TCPAckNr += NrOfDataBytes; + PrepareTCP_FRAME(TCP_CODE_ACK); // ACK rec'd data + } + + if (TCPCode & TCP_CODE_FIN) // FIN?? + { + switch (TCPStateMachine) + { + case SYN_RECD : + case ESTABLISHED : + { + TCPStateMachine = CLOSE_WAIT; + break; + } + case FIN_WAIT_1 : + { // if our FIN was ACKed, we automatically + TCPStateMachine = CLOSING; // enter FIN_WAIT_2 (look above) and therefore + SocketStatus &= ~SOCK_CONNECTED; // TIME_WAIT + break; + } + case FIN_WAIT_2 : + { + TCPStartTimeWaitTimer(); + TCPStateMachine = TIME_WAIT; + SocketStatus &= ~SOCK_CONNECTED; + break; + } + case TIME_WAIT : + { + TCPRestartTimer(); + break; + } + } + TCPAckNr++; // ACK remote's FIN flag + PrepareTCP_FRAME(TCP_CODE_ACK); + } + } + } +} + +// easyWEB internal function +// prepares the TxFrame2-buffer to send an ARP-request + +void PrepareARP_REQUEST(void) +{ + // Ethernet + memset(&TxFrame2[ETH_DA_OFS], (char)0xFF, 6); // we don't know opposites MAC! + memcpy(&TxFrame2[ETH_SA_OFS], &MyMAC, 6); + *(unsigned short *)&TxFrame2[ETH_TYPE_OFS] = SWAPB(FRAME_ARP); + + // ARP + *(unsigned short *)&TxFrame2[ARP_HARDW_OFS] = SWAPB(HARDW_ETH10); + *(unsigned short *)&TxFrame2[ARP_PROT_OFS] = SWAPB(FRAME_IP); + *(unsigned short *)&TxFrame2[ARP_HLEN_PLEN_OFS] = SWAPB(IP_HLEN_PLEN); + *(unsigned short *)&TxFrame2[ARP_OPCODE_OFS] = SWAPB(OP_ARP_REQUEST); + memcpy(&TxFrame2[ARP_SENDER_HA_OFS], &MyMAC, 6); + memcpy(&TxFrame2[ARP_SENDER_IP_OFS], &MyIP, 4); + memset(&TxFrame2[ARP_TARGET_HA_OFS], 0x00, 6); // we don't know opposites MAC! + + if (((RemoteIP[0] ^ MyIP[0]) & SubnetMask[0]) || ((RemoteIP[1] ^ MyIP[1]) & SubnetMask[1])) + memcpy(&TxFrame2[ARP_TARGET_IP_OFS], &GatewayIP, 4); // IP not in subnet, use gateway + else + memcpy(&TxFrame2[ARP_TARGET_IP_OFS], &RemoteIP, 4); // other IP is next to us... + + TxFrame2Size = ETH_HEADER_SIZE + ARP_FRAME_SIZE; + TransmitControl |= SEND_FRAME2; +} + +// easyWEB internal function +// prepares the TxFrame2-buffer to send an ARP-answer (reply) + +void PrepareARP_ANSWER(void) +{ + // Ethernet + memcpy(&TxFrame2[ETH_DA_OFS], &RecdFrameMAC, 6); + memcpy(&TxFrame2[ETH_SA_OFS], &MyMAC, 6); + *(unsigned short *)&TxFrame2[ETH_TYPE_OFS] = SWAPB(FRAME_ARP); + + // ARP + *(unsigned short *)&TxFrame2[ARP_HARDW_OFS] = SWAPB(HARDW_ETH10); + *(unsigned short *)&TxFrame2[ARP_PROT_OFS] = SWAPB(FRAME_IP); + *(unsigned short *)&TxFrame2[ARP_HLEN_PLEN_OFS] = SWAPB(IP_HLEN_PLEN); + *(unsigned short *)&TxFrame2[ARP_OPCODE_OFS] = SWAPB(OP_ARP_ANSWER); + memcpy(&TxFrame2[ARP_SENDER_HA_OFS], &MyMAC, 6); + memcpy(&TxFrame2[ARP_SENDER_IP_OFS], &MyIP, 4); + memcpy(&TxFrame2[ARP_TARGET_HA_OFS], &RecdFrameMAC, 6); + memcpy(&TxFrame2[ARP_TARGET_IP_OFS], &RecdFrameIP, 4); + + TxFrame2Size = ETH_HEADER_SIZE + ARP_FRAME_SIZE; + TransmitControl |= SEND_FRAME2; +} + +// easyWEB internal function +// prepares the TxFrame2-buffer to send an ICMP-echo-reply + +void PrepareICMP_ECHO_REPLY(void) +{ + unsigned short ICMPDataCount; + + if (RecdIPFrameLength > MAX_ETH_TX_DATA_SIZE) // don't overload TX-buffer + ICMPDataCount = MAX_ETH_TX_DATA_SIZE - IP_HEADER_SIZE - ICMP_HEADER_SIZE; + else + ICMPDataCount = RecdIPFrameLength - IP_HEADER_SIZE - ICMP_HEADER_SIZE; + + // Ethernet + memcpy(&TxFrame2[ETH_DA_OFS], &RecdFrameMAC, 6); + memcpy(&TxFrame2[ETH_SA_OFS], &MyMAC, 6); + *(unsigned short *)&TxFrame2[ETH_TYPE_OFS] = SWAPB(FRAME_IP); + + // IP + *(unsigned short *)&TxFrame2[IP_VER_IHL_TOS_OFS] = SWAPB(IP_VER_IHL); + WriteWBE(&TxFrame2[IP_TOTAL_LENGTH_OFS], IP_HEADER_SIZE + ICMP_HEADER_SIZE + ICMPDataCount); + *(unsigned short *)&TxFrame2[IP_IDENT_OFS] = 0; + *(unsigned short *)&TxFrame2[IP_FLAGS_FRAG_OFS] = 0; + *(unsigned short *)&TxFrame2[IP_TTL_PROT_OFS] = SWAPB((DEFAULT_TTL << 8) | PROT_ICMP); + *(unsigned short *)&TxFrame2[IP_HEAD_CHKSUM_OFS] = 0; + memcpy(&TxFrame2[IP_SOURCE_OFS], &MyIP, 4); + memcpy(&TxFrame2[IP_DESTINATION_OFS], &RecdFrameIP, 4); + *(unsigned short *)&TxFrame2[IP_HEAD_CHKSUM_OFS] = CalcChecksum(&TxFrame2[IP_VER_IHL_TOS_OFS], IP_HEADER_SIZE, 0); + + // ICMP + *(unsigned short *)&TxFrame2[ICMP_TYPE_CODE_OFS] = SWAPB(ICMP_ECHO_REPLY << 8); + *(unsigned short *)&TxFrame2[ICMP_CHKSUM_OFS] = 0; // initialize checksum field + + CopyFromFrame_EMAC(&TxFrame2[ICMP_DATA_OFS], ICMPDataCount); // get data to echo... + *(unsigned short *)&TxFrame2[ICMP_CHKSUM_OFS] = CalcChecksum(&TxFrame2[IP_DATA_OFS], ICMPDataCount + ICMP_HEADER_SIZE, 0); + + TxFrame2Size = ETH_HEADER_SIZE + IP_HEADER_SIZE + ICMP_HEADER_SIZE + ICMPDataCount; + TransmitControl |= SEND_FRAME2; +} + +// easyWEB internal function +// prepares the TxFrame2-buffer to send a general TCP frame +// the TCPCode-field is passed as an argument + +void PrepareTCP_FRAME(unsigned short TCPCode) +{ + // Ethernet + memcpy(&TxFrame2[ETH_DA_OFS], &RemoteMAC, 6); + memcpy(&TxFrame2[ETH_SA_OFS], &MyMAC, 6); + *(unsigned short *)&TxFrame2[ETH_TYPE_OFS] = SWAPB(FRAME_IP); + + // IP + *(unsigned short *)&TxFrame2[IP_VER_IHL_TOS_OFS] = SWAPB(IP_VER_IHL | IP_TOS_D); + + if (TCPCode & TCP_CODE_SYN) // if SYN, we want to use the MSS option + *(unsigned short *)&TxFrame2[IP_TOTAL_LENGTH_OFS] = SWAPB(IP_HEADER_SIZE + TCP_HEADER_SIZE + TCP_OPT_MSS_SIZE); + else + *(unsigned short *)&TxFrame2[IP_TOTAL_LENGTH_OFS] = SWAPB(IP_HEADER_SIZE + TCP_HEADER_SIZE); + + *(unsigned short *)&TxFrame2[IP_IDENT_OFS] = 0; + *(unsigned short *)&TxFrame2[IP_FLAGS_FRAG_OFS] = 0; + *(unsigned short *)&TxFrame2[IP_TTL_PROT_OFS] = SWAPB((DEFAULT_TTL << 8) | PROT_TCP); + *(unsigned short *)&TxFrame2[IP_HEAD_CHKSUM_OFS] = 0; + memcpy(&TxFrame2[IP_SOURCE_OFS], &MyIP, 4); + memcpy(&TxFrame2[IP_DESTINATION_OFS], &RemoteIP, 4); + *(unsigned short *)&TxFrame2[IP_HEAD_CHKSUM_OFS] = CalcChecksum(&TxFrame2[IP_VER_IHL_TOS_OFS], IP_HEADER_SIZE, 0); + + // TCP + WriteWBE(&TxFrame2[TCP_SRCPORT_OFS], TCPLocalPort); + WriteWBE(&TxFrame2[TCP_DESTPORT_OFS], TCPRemotePort); + + WriteDWBE(&TxFrame2[TCP_SEQNR_OFS], TCPSeqNr); + WriteDWBE(&TxFrame2[TCP_ACKNR_OFS], TCPAckNr); + + *(unsigned short *)&TxFrame2[TCP_WINDOW_OFS] = SWAPB(MAX_TCP_RX_DATA_SIZE); // data bytes to accept + *(unsigned short *)&TxFrame2[TCP_CHKSUM_OFS] = 0; // initalize checksum + *(unsigned short *)&TxFrame2[TCP_URGENT_OFS] = 0; + + if (TCPCode & TCP_CODE_SYN) // if SYN, we want to use the MSS option + { + *(unsigned short *)&TxFrame2[TCP_DATA_CODE_OFS] = SWAPB(0x6000 | TCPCode); // TCP header length = 24 + *(unsigned short *)&TxFrame2[TCP_DATA_OFS] = SWAPB(TCP_OPT_MSS); // MSS option + *(unsigned short *)&TxFrame2[TCP_DATA_OFS + 2] = SWAPB(MAX_TCP_RX_DATA_SIZE);// max. length of TCP-data we accept + *(unsigned short *)&TxFrame2[TCP_CHKSUM_OFS] = CalcChecksum(&TxFrame2[TCP_SRCPORT_OFS], TCP_HEADER_SIZE + TCP_OPT_MSS_SIZE, 1); + TxFrame2Size = ETH_HEADER_SIZE + IP_HEADER_SIZE + TCP_HEADER_SIZE + TCP_OPT_MSS_SIZE; + } + else + { + *(unsigned short *)&TxFrame2[TCP_DATA_CODE_OFS] = SWAPB(0x5000 | TCPCode); // TCP header length = 20 + *(unsigned short *)&TxFrame2[TCP_CHKSUM_OFS] = CalcChecksum(&TxFrame2[TCP_SRCPORT_OFS], TCP_HEADER_SIZE, 1); + TxFrame2Size = ETH_HEADER_SIZE + IP_HEADER_SIZE + TCP_HEADER_SIZE; + } + + TransmitControl |= SEND_FRAME2; +} + +// easyWEB internal function +// prepares the TxFrame1-buffer to send a payload-packet + +void PrepareTCP_DATA_FRAME(void) +{ + // Ethernet + memcpy(&TxFrame1[ETH_DA_OFS], &RemoteMAC, 6); + memcpy(&TxFrame1[ETH_SA_OFS], &MyMAC, 6); + *(unsigned short *)&TxFrame1[ETH_TYPE_OFS] = SWAPB(FRAME_IP); + + // IP + *(unsigned short *)&TxFrame1[IP_VER_IHL_TOS_OFS] = SWAPB(IP_VER_IHL | IP_TOS_D); + WriteWBE(&TxFrame1[IP_TOTAL_LENGTH_OFS], IP_HEADER_SIZE + TCP_HEADER_SIZE + TCPTxDataCount); + *(unsigned short *)&TxFrame1[IP_IDENT_OFS] = 0; + *(unsigned short *)&TxFrame1[IP_FLAGS_FRAG_OFS] = 0; + *(unsigned short *)&TxFrame1[IP_TTL_PROT_OFS] = SWAPB((DEFAULT_TTL << 8) | PROT_TCP); + *(unsigned short *)&TxFrame1[IP_HEAD_CHKSUM_OFS] = 0; + memcpy(&TxFrame1[IP_SOURCE_OFS], &MyIP, 4); + memcpy(&TxFrame1[IP_DESTINATION_OFS], &RemoteIP, 4); + *(unsigned short *)&TxFrame1[IP_HEAD_CHKSUM_OFS] = CalcChecksum(&TxFrame1[IP_VER_IHL_TOS_OFS], IP_HEADER_SIZE, 0); + + // TCP + WriteWBE(&TxFrame1[TCP_SRCPORT_OFS], TCPLocalPort); + WriteWBE(&TxFrame1[TCP_DESTPORT_OFS], TCPRemotePort); + + WriteDWBE(&TxFrame1[TCP_SEQNR_OFS], TCPSeqNr); + WriteDWBE(&TxFrame1[TCP_ACKNR_OFS], TCPAckNr); + *(unsigned short *)&TxFrame1[TCP_DATA_CODE_OFS] = SWAPB(0x5000 | TCP_CODE_ACK); // TCP header length = 20 + *(unsigned short *)&TxFrame1[TCP_WINDOW_OFS] = SWAPB(MAX_TCP_RX_DATA_SIZE); // data bytes to accept + *(unsigned short *)&TxFrame1[TCP_CHKSUM_OFS] = 0; + *(unsigned short *)&TxFrame1[TCP_URGENT_OFS] = 0; + *(unsigned short *)&TxFrame1[TCP_CHKSUM_OFS] = CalcChecksum(&TxFrame1[TCP_SRCPORT_OFS], TCP_HEADER_SIZE + TCPTxDataCount, 1); +} + +// easyWEB internal function +// calculates the TCP/IP checksum. if 'IsTCP != 0', the TCP pseudo-header +// will be included. + +unsigned short CalcChecksum(void *Start, unsigned short Count, unsigned char IsTCP) +{ + unsigned long Sum = 0; + unsigned short * piStart; // Keil: Pointer added to correct expression + + if (IsTCP) { // if we've a TCP frame... + Sum += MyIP[0]; // ...include TCP pseudo-header + Sum += MyIP[1]; + Sum += RemoteIP[0]; + Sum += RemoteIP[1]; + Sum += SwapBytes(Count); // TCP header length plus data length + Sum += SWAPB(PROT_TCP); + } + + piStart = Start; // Keil: Line added + while (Count > 1) { // sum words +// Sum += *((unsigned short *)Start)++; // Keil: Line replaced with following line + Sum += *piStart++; + Count -= 2; + } + + if (Count) // add left-over byte, if any +// Sum += *(unsigned char *)Start; // Keil: Line replaced with following line + Sum += *(unsigned char *)piStart; + + while (Sum >> 16) // fold 32-bit sum to 16 bits + Sum = (Sum & 0xFFFF) + (Sum >> 16); + + return ~Sum; +} + +// easyWEB internal function +// starts the timer as a retry-timer (used for retransmission-timeout) + +void TCPStartRetryTimer(void) +{ + TCPTimer = 0; + RetryCounter = MAX_RETRYS; + TCPFlags |= TCP_TIMER_RUNNING; + TCPFlags |= TIMER_TYPE_RETRY; +} + +// easyWEB internal function +// starts the timer as a 'TIME_WAIT'-timer (used to finish a TCP-session) + +void TCPStartTimeWaitTimer(void) +{ + TCPTimer = 0; + TCPFlags |= TCP_TIMER_RUNNING; + TCPFlags &= ~TIMER_TYPE_RETRY; +} + +// easyWEB internal function +// restarts the timer + +void TCPRestartTimer(void) +{ + TCPTimer = 0; +} + +// easyWEB internal function +// stopps the timer + +void TCPStopTimer(void) +{ + TCPFlags &= ~TCP_TIMER_RUNNING; +} + +// easyWEB internal function +// if a retransmission-timeout occured, check which packet +// to resend. + +void TCPHandleRetransmission(void) +{ + switch (LastFrameSent) + { + case ARP_REQUEST : { PrepareARP_REQUEST(); break; } + case TCP_SYN_FRAME : { PrepareTCP_FRAME(TCP_CODE_SYN); break; } + case TCP_SYN_ACK_FRAME : { PrepareTCP_FRAME(TCP_CODE_SYN | TCP_CODE_ACK); break; } + case TCP_FIN_FRAME : { PrepareTCP_FRAME(TCP_CODE_FIN | TCP_CODE_ACK); break; } + case TCP_DATA_FRAME : { TransmitControl |= SEND_FRAME1; break; } + } +} + +// easyWEB internal function +// if all retransmissions failed, close connection and indicate an error + +void TCPHandleTimeout(void) +{ + TCPStateMachine = CLOSED; + + if ((TCPFlags & (TCP_ACTIVE_OPEN | IP_ADDR_RESOLVED)) == TCP_ACTIVE_OPEN) + SocketStatus = SOCK_ERR_ARP_TIMEOUT; // indicate an error to user + else + SocketStatus = SOCK_ERR_TCP_TIMEOUT; + + TCPFlags = 0; // clear all flags +} + + +// easyWEB internal function +// function executed every 0.210s by the CPU. used for the +// inital sequence number generator (ISN) and the TCP-timer +void TCPClockHandler(void) __irq // Keil: interrupt service routine for timer 0 +{ + ISNGenHigh++; // upper 16 bits of initial sequence number + TCPTimer++; // timer for retransmissions + T0IR = 1; // Clear interrupt flag + VICVectAddr = 0; // Acknowledge Interrupt +} + +// easyWEB internal function +// transfers the contents of 'TxFrame1'-Buffer to the EMAC + +void SendFrame1(void) +{ + CopyToFrame_EMAC(TxFrame1, TxFrame1Size); +} + +// easyWEB internal function +// transfers the contents of 'TxFrame2'-Buffer to the EMAC + +void SendFrame2(void) +{ + CopyToFrame_EMAC(TxFrame2, TxFrame2Size); +} + +// easyWEB internal function +// help function to write a WORD in big-endian byte-order +// to MCU-memory + +void WriteWBE(unsigned char *Add, unsigned short Data) +{ + *Add++ = Data >> 8; + *Add = (char)Data; +} + +// easyWEB internal function +// help function to write a DWORD in big-endian byte-order +// to MCU-memory + +void WriteDWBE(unsigned char *Add, unsigned long Data) +{ + *Add++ = Data >> 24; + *Add++ = Data >> 16; + *Add++ = Data >> 8; + *Add = (char)Data; +} + +// easyWEB internal function +// help function to swap the byte order of a WORD + +unsigned short SwapBytes(unsigned short Data) +{ + return (Data >> 8) | (Data << 8); +} + Index: /webserver/example/EasyWEB/easyweb.Opt =================================================================== --- /webserver/example/EasyWEB/easyweb.Opt (revision 9) +++ /webserver/example/EasyWEB/easyweb.Opt (revision 9) @@ -0,0 +1,50 @@ +### uVision2 Project, (C) Keil Software +### Do not modify ! + + cExt (*.c) + aExt (*.a*; *.src) + oExt (*.obj) + lExt (*.lib) + tExt (*.txt) + pExt (*.plm) + CppX (*.cpp) + DaveTm { 0,0,0,0,0,0,0,0 } + +Target (LPC2368), 0x0004 // Tools: 'ARM-ADS' +GRPOPT 1,(HTML Source),1,0,0 +GRPOPT 2,(C Source Files),1,0,0 +GRPOPT 3,(Configuration Files),1,0,0 +GRPOPT 4,(Documentation),1,0,0 + +OPTFFF 1,1,7,50331648,0,32,32,0,<.\webpage.html> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,0,0,0,0,169,2,0,0,66,1,0,0 } +OPTFFF 2,2,1,1023410176,0,19,19,0,<.\easyweb.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,110,0,0,0,145,0,0,0,23,3,0,0,211,1,0,0 } +OPTFFF 2,3,1,1593835520,0,67,67,0,<.\tcpip.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,22,0,0,0,29,0,0,0,191,2,0,0,95,1,0,0 } +OPTFFF 2,4,1,67108864,0,353,353,0,<.\EMAC.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,44,0,0,0,58,0,0,0,213,2,0,0,124,1,0,0 } +OPTFFF 2,5,1,0,0,1,1,0,<.\Retarget.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,132,0,0,0,132,0,0,0,40,3,0,0,229,1,0,0 } +OPTFFF 3,6,2,0,0,0,0,0,<.\LPC2300.s> +OPTFFF 3,7,5,486539266,0,1,1,0,<.\tcpip.h> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,66,0,0,0,87,0,0,0,235,2,0,0,153,1,0,0 } +OPTFFF 4,8,5,603979776,0,1,11,0,<.\Abstract.txt> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,1,0,0,0,127,2,0,0,3,2,0,0 } + + +TARGOPT 1, (LPC2368) + ADSCLK=12000000 + OPTTT 1,1,1,0 + OPTHX 1,65535,0,0,0 + OPTLX 79,66,8,<.\Listing\> + OPTOX 16 + OPTLT 1,1,1,0,1,1,0,1,0,0,0,0 + OPTXL 1,1,1,1,1,1,1,0,0 + OPTFL 1,0,1 + OPTAX 8 + OPTBL 0,(Data Sheet) + OPTBL 1,(User Manual) + OPTDL (SARM.DLL)(-cLPC236x)(DARMP.DLL)(-pLPC2368)(SARM.DLL)()(TARMP.DLL)(-pLPC2368) + OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()() + OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(153=-1,-1,-1,-1,0)(154=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(145=-1,-1,-1,-1,0)(147=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(149=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(137=-1,-1,-1,-1,0)(138=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(146=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(141=-1,-1,-1,-1,0)(142=-1,-1,-1,-1,0)(143=-1,-1,-1,-1,0)(144=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)) + OPTKEY 0,(ARMDBGFLAGS)() + OPTKEY 0,(UL2ARM)(-U88812345 -O7 -S2 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO15 -FD40000000 -FC800 -FN1 -FF0LPC_IAP2_512 -FS00 -FL07D000) + OPTDF 0x80 + OPTLE <> + OPTLC <> +EndOpt + Index: /webserver/example/EasyWEB/tcpip.h =================================================================== --- /webserver/example/EasyWEB/tcpip.h (revision 9) +++ /webserver/example/EasyWEB/tcpip.h (revision 9) @@ -0,0 +1,306 @@ +/****************************************************************** + ***** ***** + ***** Name: tcpip.h ***** + ***** Ver.: 1.0 ***** + ***** Date: 07/05/2001 ***** + ***** Auth: Andreas Dannenberg ***** + ***** HTWK Leipzig ***** + ***** university of applied sciences ***** + ***** Germany ***** + ***** Func: header-file for tcpip.c ***** + ***** ***** + ******************************************************************/ + +#ifndef __TCPIP_H +#define __TCPIP_H + +// easyWEB-stack definitions +#define MYIP_1 192 // our internet protocol (IP) address +#define MYIP_2 168 +#define MYIP_3 1 +#define MYIP_4 100 + +#define SUBMASK_1 255 // subnet mask +#define SUBMASK_2 255 +#define SUBMASK_3 255 +#define SUBMASK_4 0 + +#define GWIP_1 192 // standard gateway (used if remote +#define GWIP_2 168 // IP is no part of our subnet) +#define GWIP_3 1 +#define GWIP_4 1 + +#define RETRY_TIMEOUT 8 // wait max. 8 x 262ms for an ACK (about 2 sec.) +#define FIN_TIMEOUT 2 // max. time to wait for an ACK of a FIN + // before closing TCP state-machine (about 0.5 s) +#define MAX_RETRYS 4 // nr. of resendings before reset conn. + // total nr. of transmissions = MAX_RETRYS + 1 + +#define MAX_TCP_TX_DATA_SIZE 512 // max. outgoing TCP data size (even!) +#define MAX_TCP_RX_DATA_SIZE 256 // max. incoming TCP data size (even!) + // (increasing the buffer-size dramatically + // increases the transfer-speed!) + +#define MAX_ETH_TX_DATA_SIZE 60 // 2nd buffer, used for ARP, ICMP, TCP (even!) + // enough to echo 32 byte via ICMP + +#define DEFAULT_TTL 64 // Time To Live sent with packets + +// Ethernet network layer definitions +#define ETH_DA_OFS 0 // Destination MAC address (48 Bit) +#define ETH_SA_OFS 6 // Source MAC address (48 Bit) +#define ETH_TYPE_OFS 12 // Type field (16 Bit) +#define ETH_DATA_OFS 14 // Frame Data +#define ETH_HEADER_SIZE 14 + +#define FRAME_ARP 0x0806 // frame types (stored in Type/Length field) +#define FRAME_IP 0x0800 + +// IPv4 layer definitions +#define IP_VER_IHL_TOS_OFS ETH_DATA_OFS + 0 // Version, Header Length, Type of Service +#define IP_TOTAL_LENGTH_OFS ETH_DATA_OFS + 2 // IP Frame's Total Length +#define IP_IDENT_OFS ETH_DATA_OFS + 4 // Identifying Value +#define IP_FLAGS_FRAG_OFS ETH_DATA_OFS + 6 // Flags and Fragment Offset +#define IP_TTL_PROT_OFS ETH_DATA_OFS + 8 // Frame's Time to Live, Protocol +#define IP_HEAD_CHKSUM_OFS ETH_DATA_OFS + 10 // IP Frame's Header Checksum +#define IP_SOURCE_OFS ETH_DATA_OFS + 12 // Source Address (32 Bit) +#define IP_DESTINATION_OFS ETH_DATA_OFS + 16 // Destination Address (32 Bit) +#define IP_DATA_OFS ETH_DATA_OFS + 20 // Frame Data (if no options) +#define IP_HEADER_SIZE 20 // w/o options + +#define IP_VER_IHL 0x4500 // IPv4, Header Length = 5x32 bit +#define IP_TOS_D 0x0010 // TOS low delay +#define IP_TOS_T 0x0008 // TOS high throughput +#define IP_TOS_R 0x0004 // TOS high reliability + +#define IP_FLAG_DONTFRAG 0x4000 // don't fragment IP frame +#define IP_FLAG_MOREFRAG 0x2000 // more fragments available +#define IP_FRAGOFS_MASK 0x1FFF // indicates where this fragment belongs + +#define PROT_ICMP 1 // Internet Control Message Protocol +#define PROT_TCP 6 // Transmission Control Protocol +#define PROT_UDP 17 // User Datagram Protocol + +// ARP definitions +#define ARP_HARDW_OFS ETH_DATA_OFS + 0 // Hardware address type +#define ARP_PROT_OFS ETH_DATA_OFS + 2 // Protocol +#define ARP_HLEN_PLEN_OFS ETH_DATA_OFS + 4 // byte length of each hardw. / prot. address +#define ARP_OPCODE_OFS ETH_DATA_OFS + 6 // Opcode +#define ARP_SENDER_HA_OFS ETH_DATA_OFS + 8 // Hardw. address of sender of this packet +#define ARP_SENDER_IP_OFS ETH_DATA_OFS + 14 // IP address of sender +#define ARP_TARGET_HA_OFS ETH_DATA_OFS + 18 // Hardw. address of target of this packet +#define ARP_TARGET_IP_OFS ETH_DATA_OFS + 24 // IP address of target +#define ARP_FRAME_SIZE 28 + +#define HARDW_ETH10 1 // hardware-type 10Mbps Ethernet +#define IP_HLEN_PLEN 0x0604 // MAC = 6 byte long, IP = 4 byte long +#define OP_ARP_REQUEST 1 // operations for ARP-frames +#define OP_ARP_ANSWER 2 + +// ICMP definitions +#define ICMP_TYPE_CODE_OFS IP_DATA_OFS + 0 // type of message +#define ICMP_CHKSUM_OFS IP_DATA_OFS + 2 // checksum of ICMP-message (16 bit) +#define ICMP_DATA_OFS IP_DATA_OFS + 4 +#define ICMP_HEADER_SIZE 4 + +#define ICMP_ECHO 8 // message is an echo request +#define ICMP_ECHO_REPLY 0 // message is an echo reply + +// TCP layer definitions +#define TCP_SRCPORT_OFS IP_DATA_OFS + 0 // Source Port (16 bit) +#define TCP_DESTPORT_OFS IP_DATA_OFS + 2 // Destination Port (16 bit) +#define TCP_SEQNR_OFS IP_DATA_OFS + 4 // Sequence Number (32 bit) +#define TCP_ACKNR_OFS IP_DATA_OFS + 8 // Acknowledge Number (32 bit) +#define TCP_DATA_CODE_OFS IP_DATA_OFS + 12 // Data Offset and Control Bits (16 bit) +#define TCP_WINDOW_OFS IP_DATA_OFS + 14 // Window Size (16 bit) +#define TCP_CHKSUM_OFS IP_DATA_OFS + 16 // Checksum Field (16 bit) +#define TCP_URGENT_OFS IP_DATA_OFS + 18 // Urgent Pointer (16 bit) +#define TCP_DATA_OFS IP_DATA_OFS + 20 // Frame Data (if no options) +#define TCP_HEADER_SIZE 20 // size w/o options + +#define DATA_OFS_MASK 0xF000 // number of 32 bit words in the TCP Header + +#define TCP_CODE_FIN 0x0001 +#define TCP_CODE_SYN 0x0002 +#define TCP_CODE_RST 0x0004 +#define TCP_CODE_PSH 0x0008 +#define TCP_CODE_ACK 0x0010 +#define TCP_CODE_URG 0x0020 + +#define TCP_OPT_MSS 0x0204 // Type 2, Option Length 4 (Max. Segment Size) +#define TCP_OPT_MSS_SIZE 4 + +// define some TCP standard-ports, useful for testing... +#define TCP_PORT_ECHO 7 // echo +#define TCP_PORT_DISCARD 9 // discard +#define TCP_PORT_DAYTIME 13 // daytime +#define TCP_PORT_QOTD 17 // quote of the day +#define TCP_PORT_CHARGEN 19 // character generator +#define TCP_PORT_HTTP 80 // word wide web HTTP + +// macros +#define SWAPB(Word) ((unsigned short)((Word) << 8) | ((Word) >> 8)) + // convert little <-> big endian + +// typedefs +typedef enum { // states of the TCP-state machine + CLOSED, // according to RFC793 + LISTENING, + SYN_SENT, + SYN_RECD, + ESTABLISHED, + FIN_WAIT_1, + FIN_WAIT_2, + CLOSE_WAIT, + CLOSING, + LAST_ACK, + TIME_WAIT +} TTCPStateMachine; + +typedef enum { // type of last frame sent. used + ARP_REQUEST, // for retransmissions + TCP_SYN_FRAME, + TCP_SYN_ACK_FRAME, + TCP_FIN_FRAME, + TCP_DATA_FRAME +} TLastFrameSent; + +// constants +#ifdef extern // Keil: declarations for modular programming +const unsigned short MyIP[] = // "MYIP1.MYIP2.MYIP3.MYIP4" +{ + MYIP_1 + (MYIP_2 << 8), // use 'unsigned int' to + MYIP_3 + (MYIP_4 << 8) // achieve word alignment +}; + +const unsigned short SubnetMask[] = // "SUBMASK1.SUBMASK2.SUBMASK3.SUBMASK4" +{ + SUBMASK_1 + (SUBMASK_2 << 8), // use 'unsigned int' to + SUBMASK_3 + (SUBMASK_4 << 8) // achieve word alignment +}; + +const unsigned short GatewayIP[] = // "GWIP1.GWIP2.GWIP3.GWIP4" +{ + GWIP_1 + (GWIP_2 << 8), // use 'unsigned int' to + GWIP_3 + (GWIP_4 << 8) // achieve word alignment +}; +#else +extern const unsigned short MyIP[2]; // "MYIP1.MYIP2.MYIP3.MYIP4" +extern const unsigned short SubnetMask[2]; // "SUBMASK1.SUBMASK2.SUBMASK3.SUBMASK4" +extern const unsigned short GatewayIP[2]; // "GWIP1.GWIP2.GWIP3.GWIP4" +extern const unsigned char MyMAC[6]; // "M1-M2-M3-M4-M5-M6" +#endif + +// easyWEB's internal variables +extern TTCPStateMachine TCPStateMachine; // perhaps the most important var at all ;-) +extern TLastFrameSent LastFrameSent; // retransmission type + +extern unsigned short ISNGenHigh; // upper word of our Initial Sequence Number +extern unsigned long TCPSeqNr; // next sequence number to send +extern unsigned long TCPUNASeqNr; // last unaknowledged sequence number + // incremented AFTER sending data +extern unsigned long TCPAckNr; // next seq to receive and ack to send + // incremented AFTER receiving data +extern unsigned char TCPTimer; // inc'd each 262ms +extern unsigned char RetryCounter; // nr. of retransmissions + +// properties of the just received frame +extern unsigned short RecdFrameLength; // EMAC reported frame length +extern unsigned short RecdFrameMAC[3]; // 48 bit MAC +extern unsigned short RecdFrameIP[2]; // 32 bit IP +extern unsigned short RecdIPFrameLength; // 16 bit IP packet length + +// the next 3 buffers must be word-aligned! +// (here the 'RecdIPFrameLength' above does that) +extern unsigned short _TxFrame1[(ETH_HEADER_SIZE + IP_HEADER_SIZE + TCP_HEADER_SIZE + MAX_TCP_TX_DATA_SIZE)/2]; +extern unsigned short _TxFrame2[(ETH_HEADER_SIZE + MAX_ETH_TX_DATA_SIZE)/2]; +extern unsigned short _RxTCPBuffer[MAX_TCP_RX_DATA_SIZE/2]; // space for incoming TCP-data +#define TxFrame1 ((unsigned char *)_TxFrame1) +#define TxFrame2 ((unsigned char *)_TxFrame2) +#define RxTCPBuffer ((unsigned char *)_RxTCPBuffer) + +extern unsigned short TxFrame1Size; // bytes to send in TxFrame1 +extern unsigned char TxFrame2Size; // bytes to send in TxFrame2 + +extern unsigned char TransmitControl; +#define SEND_FRAME1 0x01 +#define SEND_FRAME2 0x02 + +extern unsigned char TCPFlags; +#define TCP_ACTIVE_OPEN 0x01 // easyWEB shall initiate a connection +#define IP_ADDR_RESOLVED 0x02 // IP sucessfully resolved to MAC +#define TCP_TIMER_RUNNING 0x04 +#define TIMER_TYPE_RETRY 0x08 +#define TCP_CLOSE_REQUESTED 0x10 + +// prototypes +void DoNetworkStuff(void); + +// Handlers for incoming frames +void ProcessEthBroadcastFrame(void); +void ProcessEthIAFrame(void); +void ProcessICMPFrame(void); +void ProcessTCPFrame(void); + +// fill TX-buffers +void PrepareARP_REQUEST(void); +void PrepareARP_ANSWER(void); +void PrepareICMP_ECHO_REPLY(void); +void PrepareTCP_FRAME(unsigned short TCPCode); +void PrepareTCP_DATA_FRAME(void); + +// general help functions +void SendFrame1(void); +void SendFrame2(void); +void TCPStartRetryTimer(void); +void TCPStartTimeWaitTimer(void); +void TCPRestartTimer(void); +void TCPStopTimer(void); +void TCPHandleRetransmission(void); +void TCPHandleTimeout(void); +unsigned short CalcChecksum(void *Start, unsigned short Count, unsigned char IsTCP); + +// functions to work with big-endian numbers +unsigned short SwapBytes(unsigned short Data); +void WriteWBE(unsigned char *Add, unsigned short Data); +void WriteDWBE(unsigned char *Add, unsigned long Data); + +// easyWEB-API functions +void TCPLowLevelInit(void); // setup timer, LAN-controller, flags... +void TCPPassiveOpen(void); // listen for a connection +void TCPActiveOpen(void); // open connection +void TCPClose(void); // close connection +void TCPReleaseRxBuffer(void); // indicate to discard rec'd packet +void TCPTransmitTxBuffer(void); // initiate transfer after TxBuffer is filled +void TCPClockHandler(void) __irq; // Keil: interrupt service routine for timer 0 + +// easyWEB-API global vars and flags +extern unsigned short TCPRxDataCount; // nr. of bytes rec'd +extern unsigned short TCPTxDataCount; // nr. of bytes to send + +extern unsigned short TCPLocalPort; // TCP ports +extern unsigned short TCPRemotePort; + +extern unsigned short RemoteMAC[3]; // MAC and IP of current TCP-session +extern unsigned short RemoteIP[2]; + +extern unsigned char SocketStatus; +#define SOCK_ACTIVE 0x01 // state machine NOT closed +#define SOCK_CONNECTED 0x02 // user may send & receive data +#define SOCK_DATA_AVAILABLE 0x04 // new data available +#define SOCK_TX_BUF_RELEASED 0x08 // user may fill buffer + +#define SOCK_ERROR_MASK 0xF0 // bit-mask to check for errors +#define SOCK_ERR_OK 0x00 // no error +#define SOCK_ERR_ARP_TIMEOUT 0x10 // timeout waiting for an ARP-REPLY +#define SOCK_ERR_TCP_TIMEOUT 0x20 // timeout waiting for an ACK +#define SOCK_ERR_CONN_RESET 0x30 // connection was reset by the other TCP +#define SOCK_ERR_REMOTE 0x40 // remote TCP caused fatal error +#define SOCK_ERR_ETHERNET 0x50 // network interface error (timeout) + +// easyWEB-API buffer-pointers +#define TCP_TX_BUF ((unsigned char *)TxFrame1 + ETH_HEADER_SIZE + IP_HEADER_SIZE + TCP_HEADER_SIZE) +#define TCP_RX_BUF ((unsigned char *)RxTCPBuffer) + +#endif + Index: /webserver/example/EasyWEB/Listing/easyweb.map =================================================================== --- /webserver/example/EasyWEB/Listing/easyweb.map (revision 9) +++ /webserver/example/EasyWEB/Listing/easyweb.map (revision 9) @@ -0,0 +1,760 @@ +ARM Linker, RVCT3.1 [Build 919] for uVision [Lite64] + +================================================================================ + +Section Cross References + + easyweb.o(.text) refers to uidiv.o(.text) for __aeabi_uidivmod + easyweb.o(.text) refers to printf6.o(i.__0sprintf_6) for __1sprintf + easyweb.o(.text) refers to memcpya.o(.text) for __aeabi_memcpy + easyweb.o(.text) refers to tcpip.o(.text) for TCPReleaseRxBuffer + easyweb.o(.text) refers to easyweb.o(.data) for .data + easyweb.o(.text) refers to easyweb.o(.bss) for .bss + easyweb.o(.text) refers to easyweb.o(.constdata) for .constdata + easyweb.o(.text) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.constdata) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.bss) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.constdata) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.constdata) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.constdata) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.bss) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.bss) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + easyweb.o(.data) refers (Special) to stubs.o(c$$printf_stubs) for _printf_int_dec + tcpip.o(.text) refers to emac.o(.text) for Init_EMAC + tcpip.o(.text) refers to memseta.o(.text) for __aeabi_memset + tcpip.o(.text) refers to memcpya.o(.text) for __aeabi_memcpy + tcpip.o(.text) refers to tcpip.o(.text) for TCPClockHandler + tcpip.o(.text) refers to easyweb.o(.data) for TransmitControl + tcpip.o(.text) refers to easyweb.o(.data) for TCPFlags + tcpip.o(.text) refers to easyweb.o(.data) for TCPStateMachine + tcpip.o(.text) refers to easyweb.o(.data) for SocketStatus + tcpip.o(.text) refers to easyweb.o(.data) for TCPTimer + tcpip.o(.text) refers to easyweb.o(.data) for RetryCounter + tcpip.o(.text) refers to easyweb.o(.bss) for _TxFrame2 + tcpip.o(.text) refers to tcpip.o(.constdata) for .constdata + tcpip.o(.text) refers to easyweb.o(.constdata) for MyIP + tcpip.o(.text) refers to easyweb.o(.data) for RemoteIP + tcpip.o(.text) refers to easyweb.o(.constdata) for SubnetMask + tcpip.o(.text) refers to easyweb.o(.constdata) for GatewayIP + tcpip.o(.text) refers to easyweb.o(.data) for TxFrame2Size + tcpip.o(.text) refers to easyweb.o(.data) for LastFrameSent + tcpip.o(.text) refers to easyweb.o(.data) for TCPUNASeqNr + tcpip.o(.text) refers to easyweb.o(.data) for TxFrame1Size + tcpip.o(.text) refers to easyweb.o(.data) for RecdFrameLength + tcpip.o(.text) refers to easyweb.o(.data) for RecdFrameMAC + tcpip.o(.text) refers to easyweb.o(.bss) for _TxFrame1 + tcpip.o(.text) refers to easyweb.o(.data) for RemoteMAC + tcpip.o(.text) refers to easyweb.o(.data) for TCPRemotePort + tcpip.o(.text) refers to easyweb.o(.data) for TCPSeqNr + tcpip.o(.text) refers to easyweb.o(.data) for TCPAckNr + tcpip.o(.text) refers to switch8.o(.text) for __ARM_switch8 + tcpip.o(.text) refers to memcmp.o(.text) for memcmp + tcpip.o(.text) refers to easyweb.o(.data) for RecdIPFrameLength + tcpip.o(.text) refers to easyweb.o(.data) for RecdFrameIP + tcpip.o(.text) refers to easyweb.o(.data) for ISNGenHigh + tcpip.o(.text) refers to easyweb.o(.bss) for _RxTCPBuffer + tcpip.o(.text) refers to easyweb.o(.data) for TCPRxDataCount + tcpip.o(.text) refers to easyweb.o(.data) for ISNGenHigh + tcpip.o(.text) refers to easyweb.o(.data) for TCPTimer + emac.o(.text) refers to tcpip.o(.text) for SwapBytes + emac.o(.text) refers to emac.o(.data) for .data + lpc2300.o(RESET) refers to lpc2300.o(STACK) for Stack_Top + lpc2300.o(RESET) refers to entry.o($$startup$$) for __main + entry.o($$startup$$) refers to init.o(.text) for __init + entry.o($$startup$$) refers to lpc2300.o(STACK) for __initial_sp + printfb.o(i.__0fprintf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0fprintf_bare) refers to fputc.o(.text) for fputc + printfb.o(i.__0vfprintf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0vfprintf_bare) refers to fputc.o(.text) for fputc + printfb.o(i.__0printf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0printf_bare) refers to fputc.o(.text) for fputc + printfb.o(i.__0printf_bare) refers to stdout.o(.data) for __stdout + printfb.o(i.__0vprintf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0vprintf_bare) refers to fputc.o(.text) for fputc + printfb.o(i.__0vprintf_bare) refers to stdout.o(.data) for __stdout + printfb.o(i.__0sprintf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0sprintf_bare) refers to printfb.o(i._sputc) for _sputc + printfb.o(i.__0vsprintf_bare) refers to printfb.o(i._printf_core) for _printf_core + printfb.o(i.__0vsprintf_bare) refers to printfb.o(i._sputc) for _sputc + printfb.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r6 + printf0.o(i.__0fprintf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0fprintf_0) refers to fputc.o(.text) for fputc + printf0.o(i.__0vfprintf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0vfprintf_0) refers to fputc.o(.text) for fputc + printf0.o(i.__0printf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0printf_0) refers to fputc.o(.text) for fputc + printf0.o(i.__0printf_0) refers to stdout.o(.data) for __stdout + printf0.o(i.__0vprintf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0vprintf_0) refers to fputc.o(.text) for fputc + printf0.o(i.__0vprintf_0) refers to stdout.o(.data) for __stdout + printf0.o(i.__0sprintf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0sprintf_0) refers to printf0.o(i._sputc) for _sputc + printf0.o(i.__0vsprintf_0) refers to printf0.o(i._printf_core) for _printf_core + printf0.o(i.__0vsprintf_0) refers to printf0.o(i._sputc) for _sputc + printf0.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r6 + printf1.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod + printf1.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf1.o(i.__0fprintf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0fprintf_1) refers to fputc.o(.text) for fputc + printf1.o(i.__0vfprintf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0vfprintf_1) refers to fputc.o(.text) for fputc + printf1.o(i.__0printf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0printf_1) refers to stdout.o(.data) for __stdout + printf1.o(i.__0printf_1) refers to fputc.o(.text) for fputc + printf1.o(i.__0vprintf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0vprintf_1) refers to stdout.o(.data) for __stdout + printf1.o(i.__0vprintf_1) refers to fputc.o(.text) for fputc + printf1.o(i.__0sprintf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0sprintf_1) refers to printf1.o(i._sputc) for _sputc + printf1.o(i.__0vsprintf_1) refers to printf1.o(i._printf_core) for _printf_core + printf1.o(i.__0vsprintf_1) refers to printf1.o(i._sputc) for _sputc + printf2.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf2.o(i.__0fprintf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0fprintf_2) refers to fputc.o(.text) for fputc + printf2.o(i.__0vfprintf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0vfprintf_2) refers to fputc.o(.text) for fputc + printf2.o(i.__0printf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0printf_2) refers to stdout.o(.data) for __stdout + printf2.o(i.__0printf_2) refers to fputc.o(.text) for fputc + printf2.o(i.__0vprintf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0vprintf_2) refers to stdout.o(.data) for __stdout + printf2.o(i.__0vprintf_2) refers to fputc.o(.text) for fputc + printf2.o(i.__0sprintf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0sprintf_2) refers to printf2.o(i._sputc) for _sputc + printf2.o(i.__0vsprintf_2) refers to printf2.o(i._printf_core) for _printf_core + printf2.o(i.__0vsprintf_2) refers to printf2.o(i._sputc) for _sputc + printf3.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf3.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod + printf3.o(i.__0fprintf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0fprintf_3) refers to fputc.o(.text) for fputc + printf3.o(i.__0vfprintf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0vfprintf_3) refers to fputc.o(.text) for fputc + printf3.o(i.__0printf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0printf_3) refers to stdout.o(.data) for __stdout + printf3.o(i.__0printf_3) refers to fputc.o(.text) for fputc + printf3.o(i.__0vprintf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0vprintf_3) refers to stdout.o(.data) for __stdout + printf3.o(i.__0vprintf_3) refers to fputc.o(.text) for fputc + printf3.o(i.__0sprintf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0sprintf_3) refers to printf3.o(i._sputc) for _sputc + printf3.o(i.__0vsprintf_3) refers to printf3.o(i._printf_core) for _printf_core + printf3.o(i.__0vsprintf_3) refers to printf3.o(i._sputc) for _sputc + printf4.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf4.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod + printf4.o(i.__0fprintf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0fprintf_4) refers to fputc.o(.text) for fputc + printf4.o(i.__0vfprintf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0vfprintf_4) refers to fputc.o(.text) for fputc + printf4.o(i.__0printf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0printf_4) refers to stdout.o(.data) for __stdout + printf4.o(i.__0printf_4) refers to fputc.o(.text) for fputc + printf4.o(i.__0vprintf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0vprintf_4) refers to stdout.o(.data) for __stdout + printf4.o(i.__0vprintf_4) refers to fputc.o(.text) for fputc + printf4.o(i.__0sprintf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0sprintf_4) refers to printf4.o(i._sputc) for _sputc + printf4.o(i.__0vsprintf_4) refers to printf4.o(i._printf_core) for _printf_core + printf4.o(i.__0vsprintf_4) refers to printf4.o(i._sputc) for _sputc + printf5.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf5.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod + printf5.o(i.__0fprintf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0fprintf_5) refers to fputc.o(.text) for fputc + printf5.o(i.__0vfprintf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0vfprintf_5) refers to fputc.o(.text) for fputc + printf5.o(i.__0printf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0printf_5) refers to stdout.o(.data) for __stdout + printf5.o(i.__0printf_5) refers to fputc.o(.text) for fputc + printf5.o(i.__0vprintf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0vprintf_5) refers to stdout.o(.data) for __stdout + printf5.o(i.__0vprintf_5) refers to fputc.o(.text) for fputc + printf5.o(i.__0sprintf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0sprintf_5) refers to printf5.o(i._sputc) for _sputc + printf5.o(i.__0vsprintf_5) refers to printf5.o(i._printf_core) for _printf_core + printf5.o(i.__0vsprintf_5) refers to printf5.o(i._sputc) for _sputc + printf6.o(i._printf_core) refers to printf6.o(i._printf_pre_padding) for _printf_pre_padding + printf6.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf6.o(i._printf_core) refers to printf6.o(i._printf_post_padding) for _printf_post_padding + printf6.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod + printf6.o(i.__0fprintf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0fprintf_6) refers to fputc.o(.text) for fputc + printf6.o(i.__0vfprintf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0vfprintf_6) refers to fputc.o(.text) for fputc + printf6.o(i.__0printf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0printf_6) refers to stdout.o(.data) for __stdout + printf6.o(i.__0printf_6) refers to fputc.o(.text) for fputc + printf6.o(i.__0vprintf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0vprintf_6) refers to stdout.o(.data) for __stdout + printf6.o(i.__0vprintf_6) refers to fputc.o(.text) for fputc + printf6.o(i.__0sprintf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0sprintf_6) refers to printf6.o(i._sputc) for _sputc + printf6.o(i.__0vsprintf_6) refers to printf6.o(i._printf_core) for _printf_core + printf6.o(i.__0vsprintf_6) refers to printf6.o(i._sputc) for _sputc + printf6.o(i._printf_pre_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printf6.o(i._printf_post_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printf7.o(i._printf_core) refers to printf7.o(i._printf_pre_padding) for _printf_pre_padding + printf7.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf7.o(i._printf_core) refers to printf7.o(i._printf_post_padding) for _printf_post_padding + printf7.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod + printf7.o(i.__0fprintf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0fprintf_7) refers to fputc.o(.text) for fputc + printf7.o(i.__0vfprintf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0vfprintf_7) refers to fputc.o(.text) for fputc + printf7.o(i.__0printf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0printf_7) refers to stdout.o(.data) for __stdout + printf7.o(i.__0printf_7) refers to fputc.o(.text) for fputc + printf7.o(i.__0vprintf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0vprintf_7) refers to stdout.o(.data) for __stdout + printf7.o(i.__0vprintf_7) refers to fputc.o(.text) for fputc + printf7.o(i.__0sprintf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0sprintf_7) refers to printf7.o(i._sputc) for _sputc + printf7.o(i.__0vsprintf_7) refers to printf7.o(i._printf_core) for _printf_core + printf7.o(i.__0vsprintf_7) refers to printf7.o(i._sputc) for _sputc + printf7.o(i._printf_pre_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printf7.o(i._printf_post_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printf8.o(i._printf_core) refers to printf8.o(i._printf_pre_padding) for _printf_pre_padding + printf8.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printf8.o(i._printf_core) refers to printf8.o(i._printf_post_padding) for _printf_post_padding + printf8.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod + printf8.o(i.__0fprintf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0fprintf_8) refers to fputc.o(.text) for fputc + printf8.o(i.__0vfprintf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0vfprintf_8) refers to fputc.o(.text) for fputc + printf8.o(i.__0printf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0printf_8) refers to stdout.o(.data) for __stdout + printf8.o(i.__0printf_8) refers to fputc.o(.text) for fputc + printf8.o(i.__0vprintf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0vprintf_8) refers to stdout.o(.data) for __stdout + printf8.o(i.__0vprintf_8) refers to fputc.o(.text) for fputc + printf8.o(i.__0sprintf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0sprintf_8) refers to printf8.o(i._sputc) for _sputc + printf8.o(i.__0vsprintf_8) refers to printf8.o(i._printf_core) for _printf_core + printf8.o(i.__0vsprintf_8) refers to printf8.o(i._sputc) for _sputc + printf8.o(i._printf_pre_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printf8.o(i._printf_post_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printfa.o(i._fp_digits) refers to dmul.o(.text) for __aeabi_dmul + printfa.o(i._fp_digits) refers to ddiv.o(.text) for __aeabi_ddiv + printfa.o(i._fp_digits) refers to cdrcmple.o(.text) for __aeabi_cdrcmple + printfa.o(i._fp_digits) refers to dadd.o(.text) for __aeabi_dadd + printfa.o(i._fp_digits) refers to dfixull.o(.text) for __aeabi_d2ulz + printfa.o(i._fp_digits) refers to uldiv.o(.text) for __aeabi_uldivmod + printfa.o(i._fp_digits) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i._printf_core) refers to printfa.o(i._printf_pre_padding) for _printf_pre_padding + printfa.o(i._printf_core) refers to callvia.o(.text) for __ARM_call_via_r2 + printfa.o(i._printf_core) refers to printfa.o(i._printf_post_padding) for _printf_post_padding + printfa.o(i._printf_core) refers to uldiv.o(.text) for __aeabi_uldivmod + printfa.o(i._printf_core) refers to printfa.o(i._fp_digits) for _fp_digits + printfa.o(i._printf_core) refers to uidiv.o(.text) for __aeabi_uidivmod + printfa.o(i._printf_core) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0fprintf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0fprintf) refers to fputc.o(.text) for fputc + printfa.o(i.__0fprintf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0vfprintf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0vfprintf) refers to fputc.o(.text) for fputc + printfa.o(i.__0vfprintf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0printf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0printf) refers to stdout.o(.data) for __stdout + printfa.o(i.__0printf) refers to fputc.o(.text) for fputc + printfa.o(i.__0printf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0vprintf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0vprintf) refers to stdout.o(.data) for __stdout + printfa.o(i.__0vprintf) refers to fputc.o(.text) for fputc + printfa.o(i.__0vprintf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0sprintf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0sprintf) refers to printfa.o(i._sputc) for _sputc + printfa.o(i.__0sprintf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i.__0vsprintf) refers to printfa.o(i._printf_core) for _printf_core + printfa.o(i.__0vsprintf) refers to printfa.o(i._sputc) for _sputc + printfa.o(i.__0vsprintf) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i._printf_pre_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printfa.o(i._printf_pre_padding) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i._printf_post_padding) refers to callvia.o(.text) for __ARM_call_via_r6 + printfa.o(i._printf_post_padding) refers (Special) to iusefp.o(.text) for __I_use_fp + printfa.o(i._sputc) refers (Special) to iusefp.o(.text) for __I_use_fp + init.o(.text) refers to callvia.o(.text) for __ARM_call_via_r3 + init.o(.text) refers to init.o(.emb_text) for __call_main + init.o(.text) refers to easyweb.o(.text) for main + fputc.o(.text) refers (Special) to iusesemip.o(.text) for __I_use_semihosting_fputc + uldiv.o(.text) refers to llushr.o(.text) for __aeabi_llsr + uldiv.o(.text) refers to llshl.o(.text) for __aeabi_llsl + dadd.o(.text) refers to llushr.o(.text) for __aeabi_llsr + dadd.o(.text) refers to llshl.o(.text) for __aeabi_llsl + dadd.o(.text) refers to depilogue.o(.text) for _double_epilogue + dadd.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + dmul.o(.text) refers to depilogue.o(.text) for _double_epilogue + dmul.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + ddiv.o(.text) refers to depilogue.o(.text) for _double_epilogue + ddiv.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + dfixull.o(.text) refers to llushr.o(.text) for __aeabi_llsr + dfixull.o(.text) refers to llshl.o(.text) for __aeabi_llsl + dfixull.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + cdrcmple.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + depilogue.o(.text) refers (Special) to iusefp.o(.text) for __I_use_fp + + +================================================================================ + +Removing Unused input sections from the image. + + Removing retarget.o(.text), (4 bytes). + Removing lpc2300.o(HEAP), (0 bytes). + +2 unused section(s) (total 4 bytes) removed from the image. + +================================================================================ + +Adding Veneers to the image + + Adding AT veneer (8 bytes, Inline) for call to '__init' from entry.o($$startup$$). + Adding TA veneer (4 bytes, Inline) for call to '__ARM_switch8' from tcpip.o(.text). + +2 Veneer(s) (total 12 bytes) added to the image. + +================================================================================ + +Image Symbol Table + + Local Symbols + + Symbol Name Value Ov Type Size Object(Section) + + RESET 0x00000000 Section 356 lpc2300.o(RESET) + ../../microlib/division.c 0x00000000 Number 0 uldiv.o ABSOLUTE + ../../microlib/division.c 0x00000000 Number 0 uidiv.o ABSOLUTE + ../../microlib/fpadd.c 0x00000000 Number 0 dadd.o ABSOLUTE + ../../microlib/fpdiv.c 0x00000000 Number 0 ddiv.o ABSOLUTE + ../../microlib/fpepilogue.c 0x00000000 Number 0 depilogue.o ABSOLUTE + ../../microlib/fpfix.c 0x00000000 Number 0 dfixull.o ABSOLUTE + ../../microlib/fpmul.c 0x00000000 Number 0 dmul.o ABSOLUTE + ../../microlib/init/entry.s 0x00000000 Number 0 entry.o ABSOLUTE + ../../microlib/init/handlers.c 0x00000000 Number 0 handlers.o ABSOLUTE + ../../microlib/init/init.c 0x00000000 Number 0 init.o ABSOLUTE + ../../microlib/longlong.c 0x00000000 Number 0 llushr.o ABSOLUTE + ../../microlib/longlong.c 0x00000000 Number 0 llshl.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printfa.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf8.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf7.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf6.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf5.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf4.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf2.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf3.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf1.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printf0.o ABSOLUTE + ../../microlib/printf/printf.c 0x00000000 Number 0 printfb.o ABSOLUTE + ../../microlib/printf/stubs.s 0x00000000 Number 0 stubs.o ABSOLUTE + ../../microlib/stdio/fputc.c 0x00000000 Number 0 fputc.o ABSOLUTE + ../../microlib/stdio/streams.c 0x00000000 Number 0 stdout.o ABSOLUTE + ../../microlib/string/memcmp.c 0x00000000 Number 0 memcmp.o ABSOLUTE + ../../microlib/string/memcpy.c 0x00000000 Number 0 memcpyb.o ABSOLUTE + ../../microlib/string/memcpy.c 0x00000000 Number 0 memcpya.o ABSOLUTE + ../../microlib/string/memset.c 0x00000000 Number 0 memseta.o ABSOLUTE + ../../microlib/stubs.s 0x00000000 Number 0 useno.o ABSOLUTE + ../../microlib/stubs.s 0x00000000 Number 0 iusesemip.o ABSOLUTE + ../../microlib/stubs.s 0x00000000 Number 0 iusefp.o ABSOLUTE + ../../unhosted.s 0x00000000 Number 0 callvia.o ABSOLUTE + ../../unhosted.s 0x00000000 Number 0 switch8.o ABSOLUTE + EMAC.c 0x00000000 Number 0 emac.o ABSOLUTE + LPC2300.s 0x00000000 Number 0 lpc2300.o ABSOLUTE + Retarget.c 0x00000000 Number 0 retarget.o ABSOLUTE + cdrcmple.s 0x00000000 Number 0 cdrcmple.o ABSOLUTE + dc.s 0x00000000 Number 0 dc.o ABSOLUTE + easyweb.c 0x00000000 Number 0 easyweb.o ABSOLUTE + tcpip.c 0x00000000 Number 0 tcpip.o ABSOLUTE + Undef_Handler 0x00000040 ARM Code 4 lpc2300.o(RESET) + SWI_Handler 0x00000044 ARM Code 4 lpc2300.o(RESET) + PAbt_Handler 0x00000048 ARM Code 4 lpc2300.o(RESET) + DAbt_Handler 0x0000004c ARM Code 4 lpc2300.o(RESET) + IRQ_Handler 0x00000050 ARM Code 4 lpc2300.o(RESET) + FIQ_Handler 0x00000054 ARM Code 4 lpc2300.o(RESET) + $$startup$$ 0x00000164 Section 12 entry.o($$startup$$) + .emb_text 0x00000170 Section 2 init.o(.emb_text) + .text 0x00000174 Section 420 easyweb.o(.text) + .text 0x00000318 Section 3236 tcpip.o(.text) + .text 0x00000fbc Section 76 tcpip.o(.text) + .text 0x00001008 Section 836 emac.o(.text) + .text 0x00001350 Section 24 switch8.o(.text) + .text 0x00001368 Section 40 uidiv.o(.text) + .text 0x00001390 Section 36 memcpya.o(.text) + .text 0x000013b4 Section 44 memseta.o(.text) + .text 0x000013e0 Section 28 memcmp.o(.text) + .text 0x000013fc Section 16 callvia.o(.text) + .text 0x00001414 Section 40 init.o(.text) + c$$printf_stubs 0x0000143c Number 0 stubs.o(c$$printf_stubs) + i.__0sprintf_6 0x0000143c Section 40 printf6.o(i.__0sprintf_6) + i.__scatterload_copy 0x00001464 Section 24 handlers.o(i.__scatterload_copy) + i.__scatterload_null 0x0000147c Section 4 handlers.o(i.__scatterload_null) + i.__scatterload_zeroinit 0x00001480 Section 24 handlers.o(i.__scatterload_zeroinit) + i._printf_core 0x00001498 Section 796 printf6.o(i._printf_core) + _printf_core 0x00001499 Thumb Code 790 printf6.o(i._printf_core) + i._printf_post_padding 0x000017b4 Section 38 printf6.o(i._printf_post_padding) + _printf_post_padding 0x000017b5 Thumb Code 38 printf6.o(i._printf_post_padding) + i._printf_pre_padding 0x000017da Section 48 printf6.o(i._printf_pre_padding) + _printf_pre_padding 0x000017db Thumb Code 48 printf6.o(i._printf_pre_padding) + i._sputc 0x0000180a Section 10 printf6.o(i._sputc) + _sputc 0x0000180b Thumb Code 10 printf6.o(i._sputc) + .constdata 0x00001814 Section 1150 easyweb.o(.constdata) + .constdata 0x00001c92 Section 4 easyweb.o(.constdata) + .constdata 0x00001c96 Section 4 easyweb.o(.constdata) + .constdata 0x00001c9a Section 4 easyweb.o(.constdata) + .constdata 0x00001c9e Section 6 tcpip.o(.constdata) + .data 0x40000000 Section 16 easyweb.o(.data) + .data 0x40000010 Section 1 easyweb.o(.data) + .data 0x40000011 Section 1 easyweb.o(.data) + .data 0x40000012 Section 2 easyweb.o(.data) + .data 0x40000014 Section 4 easyweb.o(.data) + .data 0x40000018 Section 4 easyweb.o(.data) + .data 0x4000001c Section 4 easyweb.o(.data) + .data 0x40000020 Section 1 easyweb.o(.data) + .data 0x40000021 Section 1 easyweb.o(.data) + .data 0x40000022 Section 2 easyweb.o(.data) + .data 0x40000024 Section 6 easyweb.o(.data) + .data 0x4000002a Section 4 easyweb.o(.data) + .data 0x4000002e Section 2 easyweb.o(.data) + .data 0x40000030 Section 2 easyweb.o(.data) + .data 0x40000032 Section 1 easyweb.o(.data) + .data 0x40000033 Section 1 easyweb.o(.data) + .data 0x40000034 Section 1 easyweb.o(.data) + .data 0x40000036 Section 2 easyweb.o(.data) + .data 0x40000038 Section 2 easyweb.o(.data) + .data 0x4000003a Section 6 easyweb.o(.data) + .data 0x40000040 Section 4 easyweb.o(.data) + .data 0x40000044 Section 8 emac.o(.data) + rptr 0x40000044 Data 4 emac.o(.data) + tptr 0x40000048 Data 4 emac.o(.data) + .bss 0x4000004c Section 566 easyweb.o(.bss) + .bss 0x40000282 Section 74 easyweb.o(.bss) + .bss 0x400002cc Section 256 easyweb.o(.bss) + STACK 0x400003d0 Section 1288 lpc2300.o(STACK) + Stack_Top 0x400008d8 Number 0 lpc2300.o(STACK) + + Global Symbols + + Symbol Name Value Ov Type Size Object(Section) + + BuildAttributes$$THM_ISAv1$ARM_ISAv4$M$S$PE$A:L22$X:L11$S22$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OSPACE$EBA8$MICROLIB$REQ8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE + __ARM_use_no_argv 0x00000000 Number 0 easyweb.o ABSOLUTE + __use_no_errno 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_exception_handling 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_fp 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_heap 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_heap_region 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_semihosting 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_semihosting_swi 0x00000000 Number 0 useno.o ABSOLUTE + __use_no_signal_handling 0x00000000 Number 0 useno.o ABSOLUTE + __decompress - Undefined Weak Reference + Reset_Handler 0x00000058 ARM Code 0 lpc2300.o(RESET) + __main 0x00000164 ARM Code 8 entry.o($$startup$$) + __call_main 0x00000171 Thumb Code 2 init.o(.emb_text) + GetAD0Val 0x00000175 Thumb Code 38 easyweb.o(.text) + InsertDynamicValues 0x0000019b Thumb Code 82 easyweb.o(.text) + HTTPServer 0x000001ed Thumb Code 190 easyweb.o(.text) + main 0x000002ab Thumb Code 70 easyweb.o(.text) + TCPLowLevelInit 0x00000319 Thumb Code 56 tcpip.o(.text) + TCPPassiveOpen 0x00000351 Thumb Code 26 tcpip.o(.text) + TCPStartRetryTimer 0x0000036b Thumb Code 30 tcpip.o(.text) + PrepareARP_REQUEST 0x00000389 Thumb Code 146 tcpip.o(.text) + TCPActiveOpen 0x0000041b Thumb Code 52 tcpip.o(.text) + TCPClose 0x0000044f Thumb Code 42 tcpip.o(.text) + TCPReleaseRxBuffer 0x00000479 Thumb Code 12 tcpip.o(.text) + TCPTransmitTxBuffer 0x00000485 Thumb Code 64 tcpip.o(.text) + IsBroadcast 0x000004c5 Thumb Code 60 tcpip.o(.text) + SendFrame1 0x00000501 Thumb Code 14 tcpip.o(.text) + CalcChecksum 0x0000050f Thumb Code 94 tcpip.o(.text) + WriteDWBE 0x0000056d Thumb Code 16 tcpip.o(.text) + WriteWBE 0x0000057d Thumb Code 8 tcpip.o(.text) + PrepareTCP_DATA_FRAME 0x00000585 Thumb Code 182 tcpip.o(.text) + SendFrame2 0x0000063b Thumb Code 14 tcpip.o(.text) + PrepareTCP_FRAME 0x00000649 Thumb Code 374 tcpip.o(.text) + TCPHandleTimeout 0x000007bf Thumb Code 32 tcpip.o(.text) + TCPStopTimer 0x000007df Thumb Code 12 tcpip.o(.text) + TCPHandleRetransmission 0x000007eb Thumb Code 52 tcpip.o(.text) + TCPRestartTimer 0x0000081f Thumb Code 8 tcpip.o(.text) + TCPStartTimeWaitTimer 0x00000827 Thumb Code 26 tcpip.o(.text) + ProcessTCPFrame 0x00000841 Thumb Code 752 tcpip.o(.text) + PrepareICMP_ECHO_REPLY 0x00000b31 Thumb Code 260 tcpip.o(.text) + ProcessICMPFrame 0x00000c35 Thumb Code 24 tcpip.o(.text) + ProcessEthIAFrame 0x00000c4d Thumb Code 182 tcpip.o(.text) + PrepareARP_ANSWER 0x00000d03 Thumb Code 112 tcpip.o(.text) + ProcessEthBroadcastFrame 0x00000d73 Thumb Code 102 tcpip.o(.text) + DoNetworkStuff 0x00000dd9 Thumb Code 376 tcpip.o(.text) + SwapBytes 0x00000f51 Thumb Code 12 tcpip.o(.text) + TCPClockHandler 0x00000fbc ARM Code 64 tcpip.o(.text) + write_PHY 0x00001009 Thumb Code 32 emac.o(.text) + read_PHY 0x00001029 Thumb Code 42 emac.o(.text) + rx_descr_init 0x00001053 Thumb Code 60 emac.o(.text) + tx_descr_init 0x0000108f Thumb Code 60 emac.o(.text) + Init_EMAC 0x000010cb Thumb Code 318 emac.o(.text) + ReadFrame_EMAC 0x00001209 Thumb Code 12 emac.o(.text) + ReadFrameBE_EMAC 0x00001215 Thumb Code 22 emac.o(.text) + CopyFromFrame_EMAC 0x0000122b Thumb Code 38 emac.o(.text) + DummyReadFrame_EMAC 0x00001251 Thumb Code 24 emac.o(.text) + StartReadFrame 0x00001269 Thumb Code 32 emac.o(.text) + EndReadFrame 0x00001289 Thumb Code 16 emac.o(.text) + CheckFrameReceived 0x00001299 Thumb Code 18 emac.o(.text) + RequestSend 0x000012ab Thumb Code 32 emac.o(.text) + Rdy4Tx 0x000012cb Thumb Code 4 emac.o(.text) + WriteFrame_EMAC 0x000012cf Thumb Code 12 emac.o(.text) + CopyToFrame_EMAC 0x000012db Thumb Code 50 emac.o(.text) + Inline Thumb to ARM Veneer to __ARM_switch8 0x0000134d Thumb Code 0 switch8.o(.text) + __ARM_switch8 0x00001350 ARM Code 24 switch8.o(.text) + __rt_switch8 0x00001350 ARM Code 0 switch8.o(.text) + __aeabi_uidiv 0x00001369 Thumb Code 0 uidiv.o(.text) + __aeabi_uidivmod 0x00001369 Thumb Code 40 uidiv.o(.text) + __aeabi_memcpy 0x00001391 Thumb Code 36 memcpya.o(.text) + __aeabi_memcpy4 0x00001391 Thumb Code 0 memcpya.o(.text) + __aeabi_memcpy8 0x00001391 Thumb Code 0 memcpya.o(.text) + __aeabi_memset 0x000013b5 Thumb Code 16 memseta.o(.text) + __aeabi_memset4 0x000013b5 Thumb Code 0 memseta.o(.text) + __aeabi_memset8 0x000013b5 Thumb Code 0 memseta.o(.text) + __aeabi_memclr 0x000013c5 Thumb Code 4 memseta.o(.text) + __aeabi_memclr4 0x000013c5 Thumb Code 0 memseta.o(.text) + __aeabi_memclr8 0x000013c5 Thumb Code 0 memseta.o(.text) + _memset_wrapper 0x000013c9 Thumb Code 24 memseta.o(.text) + memcmp 0x000013e1 Thumb Code 28 memcmp.o(.text) + __ARM_call_via_r0 0x000013fd Thumb Code 2 callvia.o(.text) + __call_via_r0 0x000013fd Thumb Code 0 callvia.o(.text) + __ARM_call_via_r1 0x000013ff Thumb Code 2 callvia.o(.text) + __call_via_r1 0x000013ff Thumb Code 0 callvia.o(.text) + __ARM_call_via_r2 0x00001401 Thumb Code 2 callvia.o(.text) + __call_via_r2 0x00001401 Thumb Code 0 callvia.o(.text) + __ARM_call_via_r3 0x00001403 Thumb Code 2 callvia.o(.text) + __call_via_r3 0x00001403 Thumb Code 0 callvia.o(.text) + __ARM_call_via_r4 0x00001405 Thumb Code 2 callvia.o(.text) + __call_via_r4 0x00001405 Thumb Code 0 callvia.o(.text) + __ARM_call_via_r5 0x00001407 Thumb Code 2 callvia.o(.text) + __call_via_r5 0x00001407 Thumb Code 0 callvia.o(.text) + __ARM_call_via_r6 0x00001409 Thumb Code 2 callvia.o(.text) + __call_via_r6 0x00001409 Thumb Code 0 callvia.o(.text) + __ARM_call_via_r7 0x0000140b Thumb Code 2 callvia.o(.text) + __call_via_r7 0x0000140b Thumb Code 0 callvia.o(.text) + Inline ARM to Thumb Veneer to __init 0x0000140c ARM Code 0 init.o(.text) + __init 0x00001415 Thumb Code 26 init.o(.text) + __scatterload_rt2 0x00001415 Thumb Code 0 init.o(.text) + __0sprintf_6 0x0000143d Thumb Code 36 printf6.o(i.__0sprintf_6) + __1sprintf 0x0000143d Thumb Code 0 printf6.o(i.__0sprintf_6) + _printf_charcount 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_fp_dec 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_fp_hex 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_int_dec 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_longlong_dec 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_longlong_hex 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_longlong_oct 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_mbtowc 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_percent 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_pre_padding 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_return_value 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_sizespec 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_str 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_truncate_signed 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_truncate_unsigned 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_wc 0x0000143c Number 0 stubs.o(c$$printf_stubs) + _printf_wctomb 0x0000143c Number 0 stubs.o(c$$printf_stubs) + __scatterload_copy 0x00001464 ARM Code 24 handlers.o(i.__scatterload_copy) + __scatterload_null 0x0000147c ARM Code 4 handlers.o(i.__scatterload_null) + __scatterload_zeroinit 0x00001480 ARM Code 24 handlers.o(i.__scatterload_zeroinit) + GetResponse 0x00001814 Data 45 easyweb.o(.constdata) + WebSide 0x00001841 Data 1105 easyweb.o(.constdata) + MyIP 0x00001c92 Data 4 easyweb.o(.constdata) + SubnetMask 0x00001c96 Data 4 easyweb.o(.constdata) + GatewayIP 0x00001c9a Data 4 easyweb.o(.constdata) + MyMAC 0x00001c9e Data 6 tcpip.o(.constdata) + Region$$Table$$Base 0x00001ca4 Number 0 anon$$obj.o(Region$$Table) + Region$$Table$$Limit 0x00001cc4 Number 0 anon$$obj.o(Region$$Table) + HTTPStatus 0x40000000 Data 1 easyweb.o(.data) + SocketStatus 0x40000001 Data 1 easyweb.o(.data) + TCPTxDataCount 0x40000002 Data 2 easyweb.o(.data) + TCPLocalPort 0x40000004 Data 2 easyweb.o(.data) + PWebSide 0x40000008 Data 4 easyweb.o(.data) + HTTPBytesToSend 0x4000000c Data 4 easyweb.o(.data) + TCPStateMachine 0x40000010 Data 1 easyweb.o(.data) + LastFrameSent 0x40000011 Data 1 easyweb.o(.data) + ISNGenHigh 0x40000012 Data 2 easyweb.o(.data) + TCPSeqNr 0x40000014 Data 4 easyweb.o(.data) + TCPUNASeqNr 0x40000018 Data 4 easyweb.o(.data) + TCPAckNr 0x4000001c Data 4 easyweb.o(.data) + TCPTimer 0x40000020 Data 1 easyweb.o(.data) + RetryCounter 0x40000021 Data 1 easyweb.o(.data) + RecdFrameLength 0x40000022 Data 2 easyweb.o(.data) + RecdFrameMAC 0x40000024 Data 6 easyweb.o(.data) + RecdFrameIP 0x4000002a Data 4 easyweb.o(.data) + RecdIPFrameLength 0x4000002e Data 2 easyweb.o(.data) + TxFrame1Size 0x40000030 Data 2 easyweb.o(.data) + TxFrame2Size 0x40000032 Data 1 easyweb.o(.data) + TransmitControl 0x40000033 Data 1 easyweb.o(.data) + TCPFlags 0x40000034 Data 1 easyweb.o(.data) + TCPRxDataCount 0x40000036 Data 2 easyweb.o(.data) + TCPRemotePort 0x40000038 Data 2 easyweb.o(.data) + RemoteMAC 0x4000003a Data 6 easyweb.o(.data) + RemoteIP 0x40000040 Data 4 easyweb.o(.data) + _TxFrame1 0x4000004c Data 566 easyweb.o(.bss) + _TxFrame2 0x40000282 Data 74 easyweb.o(.bss) + _RxTCPBuffer 0x400002cc Data 256 easyweb.o(.bss) + __initial_sp 0x400007d0 Data 264 lpc2300.o(STACK) + + +================================================================================ + +Memory Map of the image + + Image Entry point : 0x00000164 + + Load Region LR_IROM1 (Base: 0x00000000, Size: 0x00001d10, Max: 0x00080000, ABSOLUTE) + + Execution Region ER_IROM1 (Base: 0x00000000, Size: 0x00001cc4, Max: 0x00080000, ABSOLUTE) + + Base Addr Size Type Attr Idx E Section Name Object + + 0x00000000 0x00000164 Code RO 133 RESET lpc2300.o + 0x00000164 0x0000000c Code RO 139 * $$startup$$ entry.o(mc_t.l) + 0x00000170 0x00000002 Code RO 350 .emb_text init.o(mc_t.l) + 0x00000172 0x00000002 PAD + 0x00000174 0x000001a4 Code RO 1 .text easyweb.o + 0x00000318 0x00000ca4 Code RO 69 .text tcpip.o + 0x00000fbc 0x0000004c Code RO 70 .text tcpip.o + 0x00001008 0x00000344 Code RO 97 .text emac.o + 0x0000134c 0x00000004 Ven RO 137 .text switch8.o(h_t.l) + 0x00001350 0x00000018 Code RO 137 .text switch8.o(h_t.l) + 0x00001368 0x00000028 Code RO 143 .text uidiv.o(mc_t.l) + 0x00001390 0x00000024 Code RO 145 .text memcpya.o(mc_t.l) + 0x000013b4 0x0000002c Code RO 147 .text memseta.o(mc_t.l) + 0x000013e0 0x0000001c Code RO 149 .text memcmp.o(mc_t.l) + 0x000013fc 0x00000010 Code RO 348 .text callvia.o(h_t.l) + 0x0000140c 0x00000008 Ven RO 349 .text init.o(mc_t.l) + 0x00001414 0x00000028 Code RO 349 .text init.o(mc_t.l) + 0x0000143c 0x00000000 Code RO 347 c$$printf_stubs stubs.o(mc_t.l) + 0x0000143c 0x00000028 Code RO 270 i.__0sprintf_6 printf6.o(mc_t.l) + 0x00001464 0x00000018 Code RO 377 i.__scatterload_copy handlers.o(mc_t.l) + 0x0000147c 0x00000004 Code RO 379 i.__scatterload_null handlers.o(mc_t.l) + 0x00001480 0x00000018 Code RO 378 i.__scatterload_zeroinit handlers.o(mc_t.l) + 0x00001498 0x0000031c Code RO 265 i._printf_core printf6.o(mc_t.l) + 0x000017b4 0x00000026 Code RO 273 i._printf_post_padding printf6.o(mc_t.l) + 0x000017da 0x00000030 Code RO 272 i._printf_pre_padding printf6.o(mc_t.l) + 0x0000180a 0x0000000a Code RO 274 i._sputc printf6.o(mc_t.l) + 0x00001814 0x0000047e Data RO 3 .constdata easyweb.o + 0x00001c92 0x00000004 Data RO 5 .constdata easyweb.o + 0x00001c96 0x00000004 Data RO 6 .constdata easyweb.o + 0x00001c9a 0x00000004 Data RO 7 .constdata easyweb.o + 0x00001c9e 0x00000006 Data RO 71 .constdata tcpip.o + 0x00001ca4 0x00000020 Data RO 376 Region$$Table anon$$obj.o + + + Execution Region RW_IRAM1 (Base: 0x40000000, Size: 0x000008d8, Max: 0x00008000, ABSOLUTE) + + Base Addr Size Type Attr Idx E Section Name Object + + 0x40000000 0x00000010 Data RW 2 .data easyweb.o + 0x40000010 0x00000001 Data RW 8 .data easyweb.o + 0x40000011 0x00000001 Data RW 9 .data easyweb.o + 0x40000012 0x00000002 Data RW 10 .data easyweb.o + 0x40000014 0x00000004 Data RW 11 .data easyweb.o + 0x40000018 0x00000004 Data RW 12 .data easyweb.o + 0x4000001c 0x00000004 Data RW 13 .data easyweb.o + 0x40000020 0x00000001 Data RW 14 .data easyweb.o + 0x40000021 0x00000001 Data RW 15 .data easyweb.o + 0x40000022 0x00000002 Data RW 16 .data easyweb.o + 0x40000024 0x00000006 Data RW 17 .data easyweb.o + 0x4000002a 0x00000004 Data RW 18 .data easyweb.o + 0x4000002e 0x00000002 Data RW 19 .data easyweb.o + 0x40000030 0x00000002 Data RW 22 .data easyweb.o + 0x40000032 0x00000001 Data RW 23 .data easyweb.o + 0x40000033 0x00000001 Data RW 24 .data easyweb.o + 0x40000034 0x00000001 Data RW 25 .data easyweb.o + 0x40000035 0x00000001 PAD + 0x40000036 0x00000002 Data RW 26 .data easyweb.o + 0x40000038 0x00000002 Data RW 27 .data easyweb.o + 0x4000003a 0x00000006 Data RW 28 .data easyweb.o + 0x40000040 0x00000004 Data RW 29 .data easyweb.o + 0x40000044 0x00000008 Data RW 98 .data emac.o + 0x4000004c 0x00000236 Zero RW 4 .bss easyweb.o + 0x40000282 0x0000004a Zero RW 20 .bss easyweb.o + 0x400002cc 0x00000100 Zero RW 21 .bss easyweb.o + 0x400003cc 0x00000004 PAD + 0x400003d0 0x00000508 Zero RW 131 STACK lpc2300.o + + +================================================================================ + +Image component sizes + + + Code (inc. data) RO Data RW Data ZI Data Debug Object Name + + 420 40 1162 67 896 9903 easyweb.o + 836 64 0 8 0 3459 emac.o + 356 48 0 0 1288 265 lpc2300.o + 3312 372 6 0 0 7428 tcpip.o + + ------------------------------------------------------------------------ + 4924 524 1200 76 2188 21056 Object Totals + 0 0 32 0 0 0 (incl. Generated) + 0 0 0 1 4 1 (incl. Padding) + + ------------------------------------------------------------------------ + + Code (inc. data) RO Data RW Data ZI Data Debug Library Member Name + + 16 0 0 0 0 0 callvia.o + 12 4 0 0 0 0 entry.o + 52 0 0 0 0 0 handlers.o + 50 14 0 0 0 0 init.o + 28 0 0 0 0 0 memcmp.o + 36 0 0 0 0 0 memcpya.o + 44 0 0 0 0 0 memseta.o + 932 10 0 0 0 0 printf6.o + 0 0 0 0 0 0 stubs.o + 28 0 0 0 0 0 switch8.o + 40 0 0 0 0 0 uidiv.o + + ------------------------------------------------------------------------ + 1240 28 0 0 0 0 Library Totals + 2 0 0 0 0 0 (incl. Padding) + + ------------------------------------------------------------------------ + + Code (inc. data) RO Data RW Data ZI Data Debug Library Name + + 44 0 0 0 0 0 h_t.l + 1194 28 0 0 0 0 mc_t.l + + ------------------------------------------------------------------------ + 1240 28 0 0 0 0 Library Totals + + ------------------------------------------------------------------------ + +================================================================================ + + + Code (inc. data) RO Data RW Data ZI Data Debug + + 6164 552 1200 76 2188 21056 Grand Totals + 6164 552 1200 76 2188 21056 ELF Image Totals + 6164 552 1200 76 0 0 ROM Totals + +================================================================================ + + Total RO Size (Code + RO Data) 7364 ( 7.19kB) + Total RW Size (RW Data + ZI Data) 2264 ( 2.21kB) + Total ROM Size (Code + RO Data + RW Data) 7440 ( 7.27kB) + +================================================================================ + Index: /webserver/example/EasyWEB/easyweb.Uv2 =================================================================== --- /webserver/example/EasyWEB/easyweb.Uv2 (revision 9) +++ /webserver/example/EasyWEB/easyweb.Uv2 (revision 9) @@ -0,0 +1,122 @@ +### uVision2 Project, (C) Keil Software +### Do not modify ! + +Target (LPC2368), 0x0004 // Tools: 'ARM-ADS' + +Group (HTML Source) +Group (C Source Files) +Group (Configuration Files) +Group (Documentation) + +File 1,7,<.\webpage.html> +File 2,1,<.\easyweb.c> +File 2,1,<.\tcpip.c> +File 2,1,<.\EMAC.c> +File 2,1,<.\Retarget.c> +File 3,2,<.\LPC2300.s> +File 3,5,<.\tcpip.h> +File 4,5,<.\Abstract.txt> + + +Options 1,0,0 // Target 'LPC2368' + Device (LPC2368) + Vendor (NXP (founded by Philips)) + Cpu (IRAM(0x40000000-0x40007FFF) IRAM2(0x7FD00000-0x7FD01FFF) IROM(0-0x7FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI)) + FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 38400 1)) + StupF ("STARTUP\Philips\LPC2300.s" ("Philips LPC2300 Startup Code")) + FlashDR (UL2ARM(-U268761108 -O7 -S0 -C0 -FO15 -FD40000000 -FC800 -FN1 -FF0LPC_IAP2_512 -FS00 -FL07D000)) + DevID (4152) + Rgf (LPC23xx.H) + Mem () + C () + A () + RL () + OH () + DBC_IFX () + DBC_CMS () + DBC_AMS () + DBC_LMS () + UseEnv=0 + EnvBin () + EnvInc () + EnvLib () + EnvReg (ÿPhilips\) + OrgReg (ÿPhilips\) + TgStat=16 + OutDir (.\Objects\) + OutName (easyweb) + GenApp=1 + GenLib=0 + GenHex=1 + Debug=1 + Browse=0 + LstDir (.\Listing\) + HexSel=1 + MG32K=0 + TGMORE=0 + RunUsr 0 0 <> + RunUsr 1 0 <> + BrunUsr 0 0 <> + BrunUsr 1 0 <> + CrunUsr 0 0 <> + CrunUsr 1 0 <> + SVCSID <> + GLFLAGS=1790 + ADSFLGA { 242,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ACPUTYP (ARM7TDMI) + RVDEV () + ADSTFLGA { 0,12,16,18,99,4,0,66,0,0,0,0,0,0,0,0,0,0,0,0 } + OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + OCMADSIRAM { 0,0,0,0,64,0,128,0,0 } + OCMADSIROM { 1,0,0,0,0,0,0,8,0 } + OCMADSXRAM { 0,0,0,0,0,0,0,0,0 } + OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,128,0,0,0,0,0,208,127,0,32,0,0 } + RV_STAVEC () + ADSCCFLG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSCMISC () + ADSCDEFN () + ADSCUDEF () + ADSCINCD () + ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSAMISC () + ADSADEFN () + ADSAUDEF () + ADSAINCD () + PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IncBld=1 + AlwaysBuild=0 + GenAsm=0 + AsmAsm=0 + PublicsOnly=0 + StopCode=3 + CustArgs () + LibMods () + ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + ADSLDTA (0x00000000) + ADSLDDA (0x40000000) + ADSLDSC (.\Objects\easyweb.sct) + ADSLDIB () + ADSLDIC () + ADSLDMC () + ADSLDIF () + ADSLDDW () + OPTDL (SARM.DLL)(-cLPC236x)(DARMP.DLL)(-pLPC2368)(SARM.DLL)()(TARMP.DLL)(-pLPC2368) + OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()() + FLASH1 { 9,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + FLASH2 (BIN\UL2ARM.DLL) + FLASH3 (LPC210x_ISP.EXE ("#H" ^X $D COM1: 38400 1)) + FLASH4 () +EndOpt + +Options 1,1,1 // File 'webpage.html' + PropFld { 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + IncBld=2 + AlwaysBuild=2 + GenAsm=2 + AsmAsm=2 + PublicsOnly=2 + StopCode=11 + CustArgs (webconverter.exe webpage.html webpage.h) + LibMods () +EndOpt + Index: /webserver/example/EasyWEB/easyweb_Opt.Bak =================================================================== --- /webserver/example/EasyWEB/easyweb_Opt.Bak (revision 9) +++ /webserver/example/EasyWEB/easyweb_Opt.Bak (revision 9) @@ -0,0 +1,50 @@ +### uVision2 Project, (C) Keil Software +### Do not modify ! + + cExt (*.c) + aExt (*.a*; *.src) + oExt (*.obj) + lExt (*.lib) + tExt (*.txt) + pExt (*.plm) + CppX (*.cpp) + DaveTm { 0,0,0,0,0,0,0,0 } + +Target (LPC2368), 0x0004 // Tools: 'ARM-ADS' +GRPOPT 1,(HTML Source),1,0,0 +GRPOPT 2,(C Source Files),1,0,0 +GRPOPT 3,(Configuration Files),1,0,0 +GRPOPT 4,(Documentation),1,0,0 + +OPTFFF 1,1,7,50331648,0,32,32,0,<.\webpage.html> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,0,0,0,0,169,2,0,0,66,1,0,0 } +OPTFFF 2,2,1,1023410178,0,1,1,0,<.\easyweb.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,226,255,255,255,110,0,0,0,145,0,0,0,23,3,0,0,211,1,0,0 } +OPTFFF 2,3,1,1593835520,0,1,1,0,<.\tcpip.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,22,0,0,0,29,0,0,0,191,2,0,0,95,1,0,0 } +OPTFFF 2,4,1,67108864,0,353,353,0,<.\EMAC.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,44,0,0,0,58,0,0,0,213,2,0,0,124,1,0,0 } +OPTFFF 2,5,1,0,0,1,1,0,<.\Retarget.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,132,0,0,0,132,0,0,0,40,3,0,0,229,1,0,0 } +OPTFFF 3,6,2,0,0,0,0,0,<.\LPC2300.s> +OPTFFF 3,7,5,486539264,0,91,91,0,<.\tcpip.h> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,66,0,0,0,87,0,0,0,235,2,0,0,153,1,0,0 } +OPTFFF 4,8,5,603979776,0,1,11,0,<.\Abstract.txt> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,1,0,0,0,127,2,0,0,3,2,0,0 } + + +TARGOPT 1, (LPC2368) + ADSCLK=12000000 + OPTTT 1,1,1,0 + OPTHX 1,65535,0,0,0 + OPTLX 79,66,8,<.\Listing\> + OPTOX 16 + OPTLT 1,1,1,0,1,1,0,1,0,0,0,0 + OPTXL 1,1,1,1,1,1,1,0,0 + OPTFL 1,0,1 + OPTAX 8 + OPTBL 0,(Data Sheet) + OPTBL 1,(User Manual) + OPTDL (SARM.DLL)(-cLPC236x)(DARMP.DLL)(-pLPC2368)(SARM.DLL)()(TARMP.DLL)(-pLPC2368) + OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()() + OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(153=-1,-1,-1,-1,0)(154=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(145=-1,-1,-1,-1,0)(147=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(149=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(137=-1,-1,-1,-1,0)(138=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(146=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(141=-1,-1,-1,-1,0)(142=-1,-1,-1,-1,0)(143=-1,-1,-1,-1,0)(144=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0)) + OPTKEY 0,(ARMDBGFLAGS)() + OPTKEY 0,(UL2ARM)(-U88812345 -O7 -S2 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO15 -FD40000000 -FC800 -FN1 -FF0LPC_IAP2_512 -FS00 -FL07D000) + OPTDF 0x80 + OPTLE <> + OPTLC <> +EndOpt + Index: /webserver/example/EasyWEB/webpage.html =================================================================== --- /webserver/example/EasyWEB/webpage.html (revision 9) +++ /webserver/example/EasyWEB/webpage.html (revision 9) @@ -0,0 +1,56 @@ + + + + +easyWEB - dynamic Webside + + + + +

    +Hello World! From CP-JR ARM7 LPC2368 +

    + +

    +This is a dynamic website hosted by the embedded Webserver +easyWEB. +

    + +

    +Hardware: +

    + +
      +
    • CP-JR ARM7 LPC2368 Board From ETT CO.,LTD
    • +
    • Run 48 MHz, 512KB Flash, 32 KB SRAM
    • +
    • Embedded EMAC Ethernet Controller
    • +
    + +

    +ADC0(P0.23) Input : +

    + + + + + +
    + + +
     
    +
    + + + + + + + + + + + +
    0V0.5V1V1.5V2V2.5V3V
    + + +