I want work_mem in function _lv_mem_init to be stored in SDRM.
I tried several methods but none of them worked. Either HardFault or memory allocation error
What MCU/Processor/Board and compiler are you using?
STM32F429
What LVGL version are you using?
V7.7.0
What do you want to achieve?
I want work_mem in function _lv_mem_init to be stored in SDRM.
2、I use the same method to put mem in SDRM but it doesn’t work。
uint32_t g_membase_SDRAM[MEM_SDRAM_MAX_SIZE] attribute((at(0XC0100000)));
work_mem = (uint8_t *)g_membase_SDRAM;
3、I try to define MEM_ADR 0XC0100000 or define MEM_ADR attribute((at(0XC0100000))) but it doesn’t work
First of all, you don’t need to modify lv_mem.c. There is a flag in lv_conf.h made for just this purpose.
Second of all, please test that the RAM at that address works normally first before trying to put LVGL things there. Perhaps this RAM is already being used by C library.
Sorry, but I don’t have the bandwidth at the moment to review individual projects.
I will ping @kisvegabor on this to see if he has any ideas, but this should be working without problems. The only logical explanation I see is that something else is using the memory or the memory is initialized improperly.