We maintain a fork of Adafruit_GFX that provides OLED support on mbed RTOS, it’s based on the original work by both AdaFruit - Adafruit_GFX repo and the original SSD1306 library for mbed 2.
We’ve got everything to compile on mbed RTOS 5 & 6, and we use it ourselves on both PicoSDK and our mbed STM32F439 test board as one of our core tests.
Arduino library compatibility matrix and build time settingsThe repository is hosted on GitHub [https://github.com/TcMenu/Adafruit-GFX-mbed-fork] and is tested on STM32 hardware. We have tested it with both an SPI and I2C interface.
There are two examples showing how to use this library packaged with it. It is also possible to generate an mbed 6 OLED IoT ready menu directly from TcMenu Designer