SDL can only be used on systems with OS (Linux, Windows, OSX, Android, etc.) that support multimedia.
I don’t think this applies to your stm32 boards.
To display anything you would need a display driver. Please have a look at the docs.
Officially, supported drivers are:
- ILI9341 (and similar displays) driver for ESP32
- Linux Frame Buffer (
- SDL unix drivers (display and mouse)
You can use these as a reference for developing your display driver.