Skip to content

Commit

Permalink
Merge pull request #11582 from kaspar030/add_microbit_qemu_emulation
Browse files Browse the repository at this point in the history
boards/microbit: add QEMU emulation
  • Loading branch information
miri64 committed Jul 4, 2019
2 parents f3493aa + f03bba8 commit 395aaf3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions boards/microbit/Makefile.include
Expand Up @@ -14,5 +14,12 @@ else ifeq (pyocd,$(PROGRAMMER))
include $(RIOTMAKE)/tools/pyocd.inc.mk
endif

# QEMU 4.0 added microbit system emulation.
EMULATOR = qemu-system-arm
EMULATOR_FLAGS = -M microbit -device loader,file=$(ELFFILE) \
-serial stdio \
-monitor telnet::45454,server,nowait \
-nographic

# include nrf51 boards common configuration
include $(RIOTBOARD)/common/nrf51/Makefile.include
19 changes: 19 additions & 0 deletions boards/microbit/doc.txt
Expand Up @@ -77,4 +77,23 @@ With the JLink firmware, you can now also do in-circuit debugging etc.
**Note: The current version of the JLink firmware
(JLink_OB_BBC_microbit_16-07-29.hex) does not support any serial port over USB,
so you can not use the RIOT shell with this firmware.**


### QEMU emulation

The microbit can be partly emulated by QEMU.

This requires at least QEMU 4.0 with ARM platform support enabled.

*NOTE*: not all peripherals are emulated. See
[this](https://wiki.qemu.org/Features/MicroBit) page for an overview.
E.g., there's no emulation for the radio, thus applications using that will
fail.

Use it like this:

$ cd examples/hello-world
$ BOARD=microbit make clean all -j4
$ BOARD=microbit make emulate

*/

0 comments on commit 395aaf3

Please sign in to comment.