i developing smartwatch for my graduation project, developed a analog clock for the sleeping mode but, i have a problem on memory, i wrote before to the forum but, lv_mem_alloc() function give a error, how can i solve my problem ?
i saw this method at a websites; lv_color_t *cbuf = (lv_color_t*)lv_mem_alloc(LV_CANVAS_BUF_SIZE_TRUE_COLOR(272, 272));
Hi, you can use several methods like this
1.modify more large size => LV_MEM_SIZE (@lv_conf.h)
2.use static buffer => static lv_color_t color_buffer[…]
3.use malloc(…) (system memory is large enough, usually apply in simulation mode)
İ tried to compiling for stm32f7 disco on cube ide but ide again giving this error; .bss' will not fit in regionRAM’,
please can you answer on a video tutorial?
c:\st\stm32cubeide_1.0.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_126.96.36.199904181610\tools\arm-none-eabi\bin\ld.exe: stm32f746_disco_no_os.elf section .bss' will not fit in regionRAM’
c:\st\stm32cubeide_1.0.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_188.8.131.52904181610\tools\arm-none-eabi\bin\ld.exe: region `RAM’ overflowed by 81856 bytes
This my memory size; # define LV_MEM_SIZE (32U * 12000U)
and this my code for canvas buffer; lv_color_t *cbuf = (lv_color_t*)lv_mem_alloc(LV_CANVAS_BUF_SIZE_ALPHA_2BIT(272, 272));
i thinked change from LV_CANVAS_BUF_SIZE_TRUE_COLOR to LV_CANVAS_BUF_SIZE_ALPHA_2BIT, but my problem isnt solved, please help me !
i m working on this problem for 4 weeks and i dont get an answer to a great solution.
i tested simulation on visual studio, if memory size small from 32U * 12000U, returned error code, but memory alloc is bigger from 32U * 12000 then simulation working. i tried on cube ide and i debuged if memory alloc is smaller, ide can doing debug but send program to stm32f7 disco, drawing does not appear on the screen.İf memory alloc is bigger 32U * 12000U then cube ide dosnt compile, return error code.
This is completely normal, because the DISCO board has a lot less RAM than the simulator does.
Do you need to use the canvas to draw the watch face, or can you just create one or more custom objects? The canvas is very inefficient for this use case because you have to store the whole rendered object as a bitmap in memory, whereas a true LittlevGL object requires far less RAM.
i finded the real problem, i wasn’t think before, so visual studio definitions is different to cube ide definitions. And another problem i import lvgl in my object, but i include in screen library at same time.
the picture from my static clock dial