warning fixes

move ALWAYSINLINE of functions with only declarations to their
definitions
fix mplab optimizations, fix additional warnings, BMS file