An embedded framework and operating system for ARM Cortex-M microcontroller