Hi,
Actually, I keep optimization to -o0 since it will not compile otherwise, it says:
PMSM.c: In function 'FieldWeakening_Inline':
PMSM.c:960:1: error: Argument 0 should be an accumulator register (__builtin_sac)
PMSM.c:960:1: error: Expected DSP accumulator result (__builtin_mpy)
Strange, and...