How to debug a stack overflow error in a nRF5340

I am getting this error on the 7th time I perform an action:

[00:02:31.772,277] <err> lvgl: (151.772, +67506)         lv_mem_realloc: couldn't allocate memory       (in lv_mem.c line #211)
[00:02:31.772,521] <err> lvgl: (151.772, +0)     lv_mem_buf_get: Asserted at expression: buf != NULL (Out of memory, can't allocate a new buffer (increase your LV_MEM_SIZE/heap size))   (in lv_mem.c line #312)

I understand it's an lvgl error and could be specific to lvgl but I think, considering it's only happening on the 7th time I perform an action, that it's a memory problem someplace else. I was thinking being able to print the available RAM would help. Is there a way to do that? Is there a way to see what variables are in RAM?

I'm using Zephyr with the VSC connect add-in.

Parents
  • Hello,

    Please check which memory configs you have for LVGL in your .config file (located in build/zephyr/ for SDK v2.6.x and below, or build/<app name>/zephyr for SDK v2.7.0 and above).

    Below are the default configurations I got when I built the LVGL sample in SDK v2.7.0. Here it is using Zephyr heap and 16K. It would be interesting to know if you can run more iterations if you increase the mem pool size in your project configuration.

    Best regards,

    Vidar

Reply
  • Hello,

    Please check which memory configs you have for LVGL in your .config file (located in build/zephyr/ for SDK v2.6.x and below, or build/<app name>/zephyr for SDK v2.7.0 and above).

    Below are the default configurations I got when I built the LVGL sample in SDK v2.7.0. Here it is using Zephyr heap and 16K. It would be interesting to know if you can run more iterations if you increase the mem pool size in your project configuration.

    Best regards,

    Vidar

Children
Related