4 ms·
Ah, semihosting; a bit unloved but very useful in some circumstances. Emulators like QEMU also support this interface, which makes it handy for random debug if
by pm215 10y ago
Ah, semihosting; a bit unloved but very useful in some circumstances. Emulators like QEMU also support this interface, which makes it handy for random debug if you're using them as your test/development environment. The Linux kernel has a configuration option to use semihosting for its console output too.
PS: the article is not quite correct about when to use which trap instruction. Cortex-M profile CPUs should use BKPT; all other 32-bit code should use SVC (with an immediate value varying depending on whether the instruction is Thumb or ARM). 64-bit code uses a HLT insn. If you care at that level of detail you'll be looking at the documentation for the ABI anyway though...
- _mbr 10y agoI'll admit, I wasn't as accurate as I should have been. I've corrected the part, but left out the long treatise about 2 and 4 byte instructions. Hopefully no one will miss it.