QEMU is only available for STM32 targets
The same QEMU binary found in the SDK can be used to build and develop the firmware. Below you can also find a detailed guide on how to build it from source if you need to do so (e.g. on Apple Silicon).
:::::{tab-set} :sync-group: os
::::{tab-item} Ubuntu 24.04 LTS :sync: ubuntu
sudo apt install autoconf libglib2.0-dev libpixman-1-dev
::::
::::{tab-item} macOS :sync: macos
brew install autoconf glib pixman
:::: :::::
pyenv
following this guide (steps A-D).Install Python 2.7:
pyenv install 2.7
Activate Python 2.7 on the current shell:
pyenv local 2.7
Clone QEMU
git clone --recurse-submodules https://github.com/pebble-dev/qemu
cd qemu
Configure QEMU:
./configure \
--disable-werror \
--enable-debug \
--target-list="arm-softmmu" \
--extra-cflags=-DSTM32_UART_NO_BAUD_DELAY
Build QEMU:
make
Make sure to make it available on your PATH
:
export PATH=$PWD/arm-softmmu:$PATH
The steps here are similar that of real hardware:
./waf configure --board=$BOARD --qemu
./waf build
./waf qemu_image_spi
where $BOARD
is any STM32 based board.
You can launch QEMU with the built image using:
./waf qemu
You can launch a console using:
./waf qemu_console
You can debug with GDB using:
./waf qemu_gdb