__SMMUL is a ARM Cortex-M4 processor intrinsic function. It's a convenient C function that maps to an assembly opcode. Convenient, in the sense that it avoids the pain of coding in assembly.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/CHDHGFEF.html
Using intrinsic functions is not strictly required to get good performance, the compiler can be pretty smart too.
Sometimes plain C does not make it easier to recognize the function, like SSAT would require expressing two conditions in C.
Sometimes I don't think the compile could recognize every intrinsic function from a general expression.
The other way around, most math-related intrinsics can be replaced with processor-independent generic C code.
Adding a temporary outlet for debugging is an approach I often use.
LogTextMessage()
with printf
-style format arguments can also be useful to dump values to the Axoloti console window, but take care to throttle them, printing at sample or control rate will cause a flood. The printf-parameters are less flexible than the standard CRT library - check http://chibios.sourceforge.net/html/group__chprintf.html