Hi Mark,
I have/had the same problem. I would try AN12374SW. It is recently updated and works now also with MCUXpresso.
I am investigating this apllication to replace my KMS implementation and have already made some good progress also using KV31F using sensored (encoder feedback) FOC.
It works with Freemaster+MCAT and I got it running with little effort just following the included documentation.
I has sensored, sensorless and hall FOC control options and also closed loop speed control.
The framework setup look pretty good and I think it will solve my problem.
Regards, Peter