Dear Sir/mam
We have our custom lpc54618j512 board and i am trying to deploy emwin on that microcontroller but i am not able to assign GUI_ALLOC_AssignMemory((void*)MemoryBuff, GUI_NUMBYTES) in external ram. But with internal ram it is working fine But in internal ram we have a size constraint and we have not enabled the debugger on the board .Please help me to find the root cause and fix that without debugger .But we have one uart enabled using serial data transmission i arrived at the conclusion that once it is entering to GUI_ALLOC_AssignMemory() function program control is not coming out .Might be executing the hardfault routine.
Please help
Hi
I suppose that the GUI_ALLOC_AssignMemory((void*)MemoryBuff, GUI_NUMBYTES) api function allocates memory from heap.
As the following screenshot, you can allocate the heap from SDRAM. Furthermore, you have to initialize the SDRAM in the main() with the line BOARD_InitSDRAM();
Pls have a try.
Hope it can help you
BR
XiangJun Rong
Dear @xiangjun_rong
Thanks for your fast reply.
I tried out the solution what you have mentioned as per image but still it is hung there in GUI_ALLOC_AssignMemory((void*)MemoryBuff, GUI_NUMBYTES) api function only. Can you suggest any other possible solution .
Regards
Hi,
I do not know where the api function GUI_ALLOC_AssignMemory(); is? is it included in SDK package for LPC?
Anyway, as a workaround, I suppose you can declare a data pointer, for example
uint64_t *MemoryBuff;
MemoryBuff=(uint64_t)0xA0000_0000; //dependent the SDRAM chip select pin
Note that the low three bits 2:0 must be zero, so the pointer must be uint64_t type.
Hope it can help you
BR
XiangJun Rong