I have uploaded my repo, you can find it here:
About mbed-cli problem:
the MacOS installer looks old, what happens when you run ‘mbed-cli --version’? If a version is shown, you can update it by ‘pip install -U mbed-cli’. When an error is shown instead, try the manual installation:
About my program:
The driver uses the init from the AdafruitLib, using FSMC. You will find it here:
Also the initialisation of the ILI9341 is done there. The ILI9341 can be set to update a window in the display, that matches perfect to the needs for lvGL. With FSMC, the setWindow command must be sent and then the stream of data is written to the data address. FSMC generates the WR and CLK pulses, so writing to the display is very fast. In FSMC init are settings for the timing. This code was adopted from the STM32duino.
The driver for the touch display is in
using the code from the lv_indev samples. The constants for calibration may need to be adjusted.
In main.cpp are a few demo or tutorial functions commented out, you can activate them to get the lvGL demo screens.
Using the lv_handler_task in an own OS task was not working reliable, the documentation says a mutex must be used. A simple solution was to use the lv functions in the main thread.
Other stuff in main is for controlling a stepper motor, it can be kicked off, I left it as a sample for threads.