Ongoing port to FreeRTOS primitives. Serial module now compiled, untested.