An embedded operating system for ARM Cortex-M microcontroller