[uart] replace #ifdef USE_UARTx with #if USE_UARTx
[tools] calibrate.py: exit with meaningfull error if optimization fails