Arduino H7 Video with LVGL memory/buffer related issues

Aperta
#1,106 8 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@leonardocavagnis ci sta già lavorando.

Dal 22/1/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Hello!
It seems that there are some issues with memory/buffer management in Arduino H7 Video when using LVGL:

  • Arduino_H7_Video::begin() allocates buf1 of size (X * Y * 1B) of lv_color_t (3B/px), where LVLG examples suggest buffer of BYTES_PER_PIXEL elements, which would lead to memory usage reduction
    'static lv_color_t * buf1 = (lv_color_t*)malloc((width() * height() / 10));'
  • but to lv_display_set_buffers() it is passed only in fragment, because size is passed as X*Y/10 not sizeof(buf1), which creates buffer of size smaller that 1/10 of display resolution (which is recommended minimal size)
    lv_display_set_buffers(display, buf1, NULL, width() * height() / 10, LV_DISPLAY_RENDER_MODE_PARTIAL);
  • trying to pass correct bigger size causes a fail on Arduino Giga, probably during screen rotation (disabling rotation allows for passing bigger /correct buffer size without fail),
  • rotation inside lvgl_displayFlushing allocates buffer of X * Y * 4 inside internal RAM, which cannot success for Giga (trying to allocate 1.5MB when internal RAM is 1MB), additionally x4 factor is probably not needed - BYTES_PER_PIXEL would suffice
    rotated_buf = (uint8_t*)realloc(rotated_buf, w * h * 4);
Lingua principale
C
Stelle
411
Fork
229
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di arduino/ArduinoCore-mbed

Tutte le issue di arduino/ArduinoCore-mbed

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.