Adaptation of Alex Forencich's Xboot for TinyG