From the MQX release notes (originally in 3.8.0 but still in release 3.8.1):
5.18 ARM MDK Keil uVision Support – Optimization in Release target MQX libraries
The code optimization level in the ARM MDK Keil uVision Release target is reduced to 0. Sporadic application crashes were observed in case any higher optimization level was used. The root cause of the issue was not known at the release date.
This seems to be a very vague and alarming release note that needs investigation. Is this an MQX issue or is this a Keil issue? Can either company step up to the plate and take ownership? Keil tech support says they know nothing of this issue. Is this issue active? Optimizations would be a very nice thing to run at some point.