Quote Originally Posted by ja2rqk View Post
DEFINE HPWM2_TMR 2
Should be:
DEFINE HPWM2_TIMER 2

You might not get a compiler error, but the compiler will take any DEFINE...such as

DEFINE THIS_IS_A_LOAD_OF_CRAP 1

and ignore it if it doesn't apply to anything.