Easyweb - EthernetTest does not comile

26 Jan 2010

Dear all,

the provided example for the easyweb implementation does not compile with the latest versions of the libraries.

I had some while back being using Version 11 of the mbed library but now with version 19 I have problems compiling. I'm not entirely sure its the mbed libary and I suspect the SFR registers that the software refere to are not vissible by the compiler. I have tried compiling for both LPC17xx and LPC23xx and changed the specific include <LPC23xx> to <LPC17xx> respectively but this does not help.

Has the compiler been upgraded since this example was first done ?

Can you provide me with a ZIP file of a working easyweb example that compiles so i can modify it for another aplication.

 

26 Jan 2010 . Edited: 26 Jan 2010

Hi David,

The mbed libraries now use the CMSIS defined structure names, rather than the old-style #define per register of early LPC2368 headers (as used in the early mbed beta).

This means you refer to the registers as found in http://mbed.org/projects/libraries/svn/mbed/trunk/LPC1768/LPC17xx.h. For example:

LPC_EMAC->MADR rather than old MAC_MADR
LPC_ADC->ADCR  rather than old AD0CR

The compiler hasn't changed, just this code is old (and very horrible! Easyweb was never pretty, and I think originally written for an 8-bit MCU :) Making these changes should make it work on a LCP2368 board at least (as much as easy web ever worked).

Simon

27 Jan 2010

I have converted the registers as indicated but have become stuck with the following translation.

LPC2300::vic_vector(4,TCPClockHandler, 0xf);                                       
LPC2300::vic_enable(4);

This relates to the setting up of the VIC at handl the TCPClockHandler interrupt
What is the new code i need to use to replace these two new lines.

The provided Keil MCB23xx project for easy web has these two lines instead

VICVectAddr4 = (unsigned int)TCPClockHandler;     // set interrupt vector in 4
VICIntEnable = 0x00000010;                                  // Enable Timer0 Interrupt                   

but these two lines do not compile either, as they too use the old non CMSIS compliant system.

What can i use to replace these two lines to setup the VIC correctly?

 

Best Regards

David Giles

 


   

 

27 Jan 2010

Hi David,

The functions you'll want will be:

void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
void NVIC_EnableIRQ(IRQn_Type IRQn);
It looks like this is using timer 0, so you'd want TIMER0_IRQn for IRQn

Simon

29 Jan 2010

I took a 1768 port by code_red and made it compile with the online compiler. I don't have cables to check it, but hopefully it will be useful for someone.

EasyWebCR