When using Compressed Font Files, my Arduino Giga crashes

I boiled the program to a simple sketch that prints the letter “A” and two seconds later it prints “AA” on the GIGA Display Shield. When I build my sketch using the uncompressed file and LV_USE_FONT_COMPRESSED as 0 the program runs as expected

But when i change the LV_USE_FONT_COMPRESSED to 1 and use the Compressed font file, I get the “Red Blinking Death” light flashing on my Arduino Giga R1 Wifi. please help.

Code to reproduce
…c

#include "Arduino_H7_Video.h"
#include "Arduino_GigaDisplayTouch.h"

//#ifdef LV_LVGL_H_INCLUDE_SIMPLE
    #include "lvgl.h"
//#else
//    #include "lvgl/lvgl.h"
//#endif

Arduino_H7_Video          Display(800, 480, GigaDisplayShield); /* Arduino_H7_Video Display(1024, 768, USBCVideo); */
Arduino_GigaDisplayTouch  TouchDetector;

#define DelayTime 2000
enum LoopModes {LoadingDatabase, ProcessingIncomingCall, Idle}; 
static lv_obj_t * ProgStatusMsg;
static lv_obj_t * SplashPage;
static lv_obj_t* ProgStatus;


void setup() {
  Serial.begin(115200);
  while (!Serial);  // wait for serial port to connect. Needed for native USB port only

  Display.begin();
  TouchDetector.begin();
  lv_init();

  lv_obj_t * screen = lv_screen_active();
  lv_obj_t * SplashPage = lv_obj_create(screen);
  lv_obj_set_size(SplashPage, lv_obj_get_width(screen), lv_obj_get_height(screen));

  ProgStatus = lv_label_create(SplashPage);

  lv_obj_set_pos(ProgStatus,0,0);

  LV_FONT_DECLARE(Hawaiian_Size40_4BPP);
  lv_obj_set_style_text_font(ProgStatus,&Hawaiian_Size40_4BPP, 0);

}

void loop() { 
  static enum LoopModes ProcessingMode = LoadingDatabase;
  static unsigned long time_now = 0;

  if(ProcessingMode == LoadingDatabase) {
      //lv_label_set_text_fmt
      lv_label_set_text(ProgStatus, "A");
      ProcessingMode = ProcessingIncomingCall;
  } else if(ProcessingMode == ProcessingIncomingCall) {
      lv_label_set_text(ProgStatus, "AA");
      ProcessingMode = Idle;
  }
  time_now = millis();
  while(millis() < time_now + DelayTime){
    lv_timer_handler();  /* Feed LVGL engine */
  }
}
 Compressed Font file defining only the letter "A"
...c

/*******************************************************************************

  • Size: 40 px
  • Bpp: 4
  • Opts: --bpp 4 --size 40 --stride 1 --align 1 --font Hawaiian Aloha BTN Bold2014.ttf --range 65 --format lvgl -o Hawaiian_Size40_4BPP.c
    ******************************************************************************/

#ifdef __has_include
#if __has_include(“lvgl.h”)
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
#define LV_LVGL_H_INCLUDE_SIMPLE
#endif
#endif
#endif

//#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include “lvgl.h”
//#else
// #include “lvgl/lvgl.h”
//#endif

#ifndef HAWAIIAN_SIZE40_4BPP
#define HAWAIIAN_SIZE40_4BPP 1
#endif

#if HAWAIIAN_SIZE40_4BPP

/*-----------------

  • BITMAPS
    ----------------/

/Store the image of the glyphs/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap = {
/* U+0041 “A” */
0x0, 0xf0, 0xd4, 0xc4, 0x69, 0x70, 0xf, 0xfe,
0x8, 0xa3, 0x3b, 0xe6, 0xf0, 0xf, 0xfe, 0x11,
0x80, 0x7b, 0x80, 0x3f, 0xfb, 0x6, 0x1, 0xe1,
0x0, 0xff, 0xe1, 0x8, 0x7, 0xbc, 0x3, 0xff,
0x82, 0x20, 0x1f, 0x10, 0x7, 0xff, 0x4, 0x80,
0x3e, 0x70, 0xf, 0xfe, 0xa, 0x80, 0x7c, 0x40,
0x1f, 0xfc, 0x1c, 0x0, 0x90, 0x3, 0x18, 0x7,
0xff, 0x1, 0xc0, 0x2e, 0x30, 0x9, 0x40, 0x3f,
0xe1, 0x20, 0x9, 0x6c, 0x2, 0xd0, 0xf, 0xf9,
0x0, 0x24, 0x5, 0x0, 0x90, 0x3, 0xfe, 0xf0,
0xb, 0x40, 0x88, 0x1, 0x18, 0x7, 0xf9, 0x0,
0x24, 0x0, 0x28, 0x5, 0x60, 0x1f, 0xc8, 0x20,
0x2, 0x20, 0x3, 0x0, 0x25, 0x0, 0xfe, 0xd0,
0x9, 0x0, 0x24, 0x0, 0x88, 0x80, 0x1f, 0x90,
0x2, 0xc0, 0xc, 0x60, 0x12, 0x80, 0x7c, 0x44,
0x0, 0x9c, 0x3, 0x20, 0x5, 0x60, 0x1f, 0x50,
0x6, 0xdf, 0xfc, 0xe0, 0x11, 0x88, 0x7, 0x94,
0x3, 0xff, 0x84, 0xe0, 0x1c, 0x44, 0x0, 0xff,
0xe1, 0x68, 0x7, 0x28, 0x6, 0x13, 0x44, 0xe1,
0x0, 0x90, 0x40, 0x35, 0x0, 0x6a, 0xcb, 0xbe,
0x20, 0xc, 0xe0, 0x11, 0x90, 0x6, 0x70, 0xf,
0x38, 0x6, 0xa0, 0xa, 0x80, 0x3f, 0xf8, 0x2,
0x1, 0x8c, 0x80, 0xe, 0x1, 0xff, 0xc0, 0x30,
0xe, 0x50, 0x51, 0x0, 0xe7, 0x0, 0xf1, 0x80,
0x75, 0x7, 0x0, 0x78, 0xc0, 0x3c, 0xe0, 0x1c,
0x49, 0x1d, 0xff, 0xb9, 0x80, 0x3d, 0xfd, 0xff,
0x76, 0xa8
};

/*---------------------

  • GLYPH DESCRIPTION
    --------------------/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 345, .box_w = 22, .box_h = 30, .ofs_x = 0, .ofs_y = -2}
};

/*---------------------

  • CHARACTER MAPPING
    --------------------/

/Collect the unicode lists and glyph_id offsets/
static const lv_font_fmt_txt_cmap_t cmaps =
{
{
.range_start = 65, .range_length = 1, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};

/*--------------------

  • ALL CUSTOM DATA
    --------------------/

#if LVGL_VERSION_MAJOR == 8
/Store all the custom data of the font/
static lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 4,
.kern_classes = 0,
.bitmap_format = 1,
#if LVGL_VERSION_MAJOR == 8
.cache = &cache
#endif

};

/*-----------------

  • PUBLIC FONT
    ----------------/

/Initialize a public general font descriptor/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t Hawaiian_Size40_4BPP = {
#else
lv_font_t Hawaiian_Size40_4BPP = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /Function pointer to get glyph’s data/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /Function pointer to get glyph’s bitmap/
.line_height = 30, /The maximum line height required by the font/
.base_line = 2, /Baseline measured from the bottom of the line/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = -5,
.underline_thickness = 1,
#endif
.static_bitmap = 0,
.dsc = &font_dsc, /*The custom font data. Will be accessed by get_glyph_bitmap/dsc */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
.fallback = NULL,
#endif
.user_data = NULL,
};

#endif /#if HAWAIIAN_SIZE40_4BPP/

...

### Environment

- **MCU/MPU/Board**: Arduino Giga WiFi & Giga Display Shield 
- **LVGL version:** v9.3.0

type or paste code here

Additional Info in relation to this post:

Another engineer from the Arduino Forum tried the above and had success. His setup was a different board and their corresponding libraries. This makes me think that my LVGL libraries for my board has issues. His setup is:

  • Board: ESP32 2432S028R (AKA “CYD”)
  • Platform: esp32 by Espressif Systems version 3.3.0
  • LVGL: version 9.3.0
  • My code based on: LVGL_Arduino
    • with LovyanGFX version 1.2.7 instead of TFT_eSPI

M