Hello, a long time after, i solved this problem. At begining, i work with RamPeriph32 first and using multiples ram regions for FreeRTOS on RamLoc64 and SDRAM32, it works but isn't the best solution, because with USB, ethernet doesn't work.
The solution it works at RamLoc64 with USB:
I analyzed all variables alloc at ram spaces and i done some changes it works good for my problem.
At file lpc17xx_40xx_emac.c is need to change the variable:
ALIGNED(8) lpc_enetdata_t lpc_enetdata;
change to:
__attribute__((section(".bss.$RamPeriph32"), aligned(8))) lpc_enetdata_t lpc_enetdata;
At file lwipopts.h comment or disable the follow variables:
//#define MEM_LIBC_MALLOC 1
#define MEMP_MEM_MALLOC 1
At file mem.c change:
u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
to:
u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT] __attribute__((section(".bss.$RamPeriph32")));
Note: this changes at files mem.c can cause other problems, because it is responsable for functions mem_alloc and other functions responsable for allocation of memory used by many other libraries.