Hi, Sir,
Is there any limitation of the total object? As I found the lvg lib stop when I create a long list with 100 list_btn . How to improve it ?
Best Regards,
Hi, Sir,
Is there any limitation of the total object? As I found the lvg lib stop when I create a long list with 100 list_btn . How to improve it ?
Best Regards,
Are you doing this on an actual device or simulation? What do you mean when you say it stops?
100 button objects on one screen sounds a lot, why do you need so many?
Hi, TheGrovesy,
I am running on the real board and tracked it stop on the some where in the lv_list_add () function. And I am using the malloc for LV_MEM_CUSTOM_ALLOC. There are 100 setup memory item and need to list and edit them.
Best Regards,
@JamesJJ Try it on the simulator and see if it works. If it does, you are probably running out of heap space on your board.
Hi, embeddedt,
Many Thanks!
I also doubt the heap space size. But I have reserved 120k for it and how it can be used out?
If there have some memory cost data for each object to evaluate the memory cost.
Further test show that, if I use the SDRAM for LV_MEM_CUSTOM_ALLOC, it will reset after running some LV function. Any limitation on the SDRAM ? The SDRAM is also for the framebuffer and it must work!
Best Regards,
That’s something which is platform-specific and that you will have to debug yourself.
lv_mem_monitor
can provide you with information about how much memory has been used. You could try printing that out and see if it is filling up.
The memory cost an object depends on the MCU architecture (32/64 bit), compiler settings, LittlevGL settings, and the object type. But you can calculate with 100-150 bytes/object.
Hi, kisvegabor,
Many Thanks!
Yes the 100 list btn cost lots of sram. I was planning to put all memory to SDRAM. But it will automaticly reset the MCU. I am sure the SDRAM is correct driving as it is for the frame buffer and the memory alloc on SDRAM also function well . If there need some special configuration for SDRAM ?
Best Regards,
Again, that’s something which is platform-specific.
What do you mean by this? You mentioned that memory allocation and the framebuffer are already using SDRAM.
Hi, embeddedt,
It is very strange as my SDRAM memory alloc work fine in other place than replacing the mallco in lvg. So would you please to give me some advice on finding out the solution. I am using the stm32f746 disco board with 8M byte SDRAM.
Now I just place the framebuffer into the SDRAM and the others in SRAM. I want to place all of them into the SDRAM.
Best Regards,
Please describe the steps you’ve taken to move the heap allocation to SDRAM.
Are you using the demo project from GitHub?
Hi, embeddedt,
Many Thanks!
I found out the mistake. The right one should be as below in the lv_conf.h, and I missed the FRAMEBUFSIZE.
I am not really change the heap space, but change the lv_mem space to SDRAM.
I am running a dev6.0 version and following the example of it.
Best Regards,