LVGL使用外部SRAM程序异常

程序会死在lv_init里面,会是什么原因


void lv_mem_init(void)
{
#if LV_MEM_CUSTOM == 0

#if LV_MEM_ADR == 0
#ifdef LV_MEM_POOL_ALLOC
tlsf = lv_tlsf_create_with_pool((void *)LV_MEM_POOL_ALLOC(LV_MEM_SIZE), LV_MEM_SIZE);
#else
/Allocate a large array to store the dynamically allocated data/
static LV_ATTRIBUTE_LARGE_RAM_ARRAY MEM_UNIT work_mem_int[LV_MEM_SIZE / sizeof(MEM_UNIT)];// attribute((at(SDRAM_LVGL_BUF_ADDR)));
tlsf = lv_tlsf_create_with_pool((void *)work_mem_int, LV_MEM_SIZE);
#endif
#else
tlsf = lv_tlsf_create_with_pool((void *)LV_MEM_ADR, LV_MEM_SIZE);
#endif
#endif

#if LV_MEM_ADD_JUNK
LV_LOG_WARN(“LV_MEM_ADD_JUNK is enabled which makes LVGL much slower”);
#endif
}

这里的work_mem_int这个大数组能不能这样放在外部SRAM,如果使用内部ram是没问题的,但放在外部就会卡死在tlsf_assert(current && “free list cannot have a null entry”);