heinbali01 wrote on Friday, October 13, 2017:
just replace-merge the FreeRTOS+TCP files into the LPC1830 example
Right, remove the entire UDP stack, and include the +TCP stack.
I will attach the current driver for LPC18 here below ( see LPC18xx_2017_oct.zip
)
It is a zero-copy driver, so please add the following to your FreeRTOSIPConfig.h
#define ipconfigZERO_COPY_RX_DRIVER 1
#define ipconfigZERO_COPY_TX_DRIVER 1
A few parameters to tune are the following:
#define configNUM_RX_DESCRIPTORS 6
#define configNUM_TX_DESCRIPTORS 4
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 15
And later on, you may want to tune some TCP parameters, as describer here
The “quad” flash in the LPC18 that I used was a bit slow, and I placed some frequently-used functions in RAM:
#ifndef configPLACE_IN_SECTION_RAM
#define configPLACE_IN_SECTION_RAM __attribute__ ((section(".ramfunc")))
#endif
/* Move func() to RAM: */
configPLACE_IN_SECTION_RAM void func()
{
}
The .LD file contains the .ramfunc
entry, in the RamLoc96
section:
/* Main DATA section (RamLoc96) */
.data : ALIGN(4)
{
FILL(0xff)
_data = . ;
*(vtable)
*(.ramfunc*)
*(.data*)
. = ALIGN(4) ;
_edata = . ;
} > RamLoc96 AT>SPIFI_4MB
If you have a fast flash, there is no need to move code to RAM.
Good luck!