apt-get install build-essential libglib2.0-dev zlib1g-dev libpixman-1-dev
apt-get install libsdl2*
git clone https://github.com/gnu-mcu-eclipse/qemu.git
cd qemu
git submodule update --init dtc
mkdir build
cd build
../configure --target-list="gnuarmeclipse-softmmu" --prefix=<qemu_build_dir>/_installed --disable-werror --with-sdlabi="2.0"
make && make install
The qemu needs some jpg files and json configs prepared in the work directory (where qemu is started) so you need to copy the files (from the qemu bin dir, we use the olimex STM32-H103 board):
cd <qemu_build_dir>/_installed/bin
cp ../../../gnu-mcu-eclipse/devices/STM32F103xx-qemu.json .
cp ../../../gnu-mcu-eclipse/graphics/STM32-H103.jpg .
./qemu-system-gnuarmeclipse --verbose --board STM32-H103 --image <image_deploy_dir>/test_project.elf
qemu-system-gnuarmeclipse -s --verbose --board STM32-H103 --image <image_deploy_dir>/test_project.elf
arm-none-eabi-gdb <image_deploy_dir>/test_project.elf
target remote 172.17.0.1:1234
You can now set breakpoints etc. - do some default gdb to debug your program!