Thanks for your feedback Zoltan,
yes, this was some test do all at the same time
I have still built it with CLI1, but I wanted to convert some more libraries to CLI2 and then I will publish this code also.
Lvgl is a great library for GUI stuff and not difficult to use. The driver for the ILI9341 needs only one function to copy a render buffer (which is at minimum 10 lines x display width) to the display. This board uses a parallel 16 bit interface, which is very fast when driven by the FSMC interface on the F4. I’m using DMA with low priority, so the fast timer interrupts have low jitter.
I don’t know where I discovered the CThunk, it is used to bind the timer ISR to some class / method. An ISR has no parameters, so there are some levels of indirection and a static table is used. The number of CThunks is also limited and adjustable via a mbed_lib.json setting.
But also like the callbacks, it takes about 2µs, which is time for many instruction on a 168 MHz CPU. So I want to check further why it is taking so long. It maybe faster to use some own jumper table. I remember that the callbacks need good compilier optimization, but I’m using the release set already.
And yes, the FPU is amazing fast and there is really no need to try error prone integer optimization. One thing to remember is to always use float constants with suffix ‘f’, otherwise you will get quickly a penalty of several µs! The bad thing when converting libs for AVR controllers is that they didn’t about the difference between float and double. The AVR C-lib treats double as float and so there is difference on AVR, but on a tiny LPC8xx you blow your flash with one double instruction