Use semihosting for debug, improve portability