some simple application codes for cortex m3