rvanspaa wrote:I tried commenting out the spinlock/spinunlock & recompiled ultibo, but it made no difference.
That's lucky in a way because I think the spinlock would likely be a mandatory part of the handler in order to prevent a race with other CPUs.
I would have thought the try/finally would potentially be more expensive since it has to save the entire state of the CPU, but you'd have to test it to find out.
rvanspaa wrote:BTW is there a simple way to just recompile one unit of Ultibo, without recompiling the whole thing?
Not really, the way FPC works is that generally the RTL has to be built as one, for some units the are not relied upon by others you can take a copy of them and simply compile out of band but if there are any interdependencies then that becomes impossible.
I do recommend creating yourself a batch file based on the __buildrtl.bat which compiles just the section of the RTL you want in order to save building the entire thing (ie ARM6/7/8 RTL and Packages) everytime.