RT-Thread Nano first steps (need help)

Description

  1. LVGL working great on bare metal. Initialized in the main()…showing a beautiful screen created in EEZ studio.

  2. Then I’ve implemented RT-Thread Nano into the project. After all initialization of the OS, it comes back to the main() function.

  3. Still in the main(), display driver, EEZ UI and LVGL all initialized without (apparent) issues.

  4. But…when it gets to the main loop…the first call to “lv_timer_handler()” crashes to HardFault_Handle (a surrogate now handled by the OS).

Obs.: There is only one thread (main function) running. The only difference between the bare metal and RT-Thread implementation is only some initialization code (DMA, SPI, Clock, etc) that is now inside the OS startup instead of at the beginning of the main function.


EDIT :

It looks like printf has something to do with my crashes. I’ve enabled log message in LVGL and now the crashes happen even during LVGL initialization.

What MCU/Processor/Board and compiler are you using?

STM32H523 + CubeIDE + LCD ST7789 (using 2 partial buffers)

What LVGL version are you using?

9.2

What have you tried so far?

Increasing main()'s stack size in RT-Thread 256, 512, 1024, etc (no results).