Browse Source

docs: add short QEMU guide

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Gerard Marull-Paretas 3 months ago
parent
commit
48f4e7a9c8
2 changed files with 47 additions and 0 deletions
  1. 46 0
      docs/development/qemu.md
  2. 1 0
      docs/index.md

+ 46 - 0
docs/development/qemu.md

@@ -0,0 +1,46 @@
+# QEMU
+
+```{important}
+QEMU is only available for STM32 targets
+```
+
+## Getting QEMU
+
+The same QEMU binary found in the SDK can be used to build and develop the firmware.
+If you're using an Apple Silicon Mac, you might find it easier to build QEMU from [source](https://github.com/pebble-dev/qemu).
+
+## Build
+
+The steps here are similar that of real hardware:
+
+```shell
+./waf configure --board=$BOARD --qemu
+./waf build
+./waf qemu_image_spi
+```
+
+where `$BOARD` is any STM32 based board.
+
+## Run
+
+You can launch QEMU with the built image using:
+
+```shell
+./waf qemu
+```
+
+## Console
+
+You can launch a console using:
+
+```shell
+./waf qemu_console
+```
+
+## Debug
+
+You can debug with GDB using:
+
+```shell
+./waf qemu_gdb
+```

+ 1 - 0
docs/index.md

@@ -10,4 +10,5 @@ getting_started.md
 :caption: 🛠️ Development
 development/options.md
 development/prf.md
+development/qemu.md
 ```