[build][tests] Add rules to build for Cortex-M3/Qemu