build: ensure libs are listed after objects to make sure they’re linked properly

also, add libmath and use newlib’s nano spec to shrink size and use more efficient library routines
hwtimer: forgot to check in new routine used in Inputs