QEMU with an STM32 microcontroller implementation
C C++ Python Shell Haxe Assembly Other
Clone or download
Pull request Compare This branch is 337 commits ahead, 28943 commits behind qemu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
audio audio: Don't free hw resources until after hw backend is stopped Jan 14, 2015
backends Revert "rng-egd: remove redundant free" Sep 23, 2014
block qcow2: Fix header extension size check Jan 14, 2015
bsd-user bsd-user: Fix syscall format, add strace support for more syscalls Jun 10, 2014
default-configs Merge in changes from QEMU v2.1.0 (that happened since v1.5.1). Sep 4, 2014
disas disas/libvixl: prepend the include path of libvixl header files Jul 8, 2014
docs docs: document missing VSERPORT_CHANGE event Jul 24, 2014
dtc @ bc895d6 dtc: add submodule Apr 18, 2013
fpu fpu: softfloat: drop INLINE macro Jun 23, 2014
fsdev virtfs-proxy-helper: fix call to accept Apr 28, 2014
gdb-xml target-arm: Support fp registers in gdb stub Dec 17, 2013
hw Use UART1 For STM32F103C8 Aug 9, 2018
include Instance IWDG watchdog Jul 15, 2016
libcacard libcacard: fix resource leak Jan 7, 2015
libdecnumber libdecnumber: Fix decNumberSetBCD Jun 16, 2014
linux-headers linux-headers: update linux headers to kvm/next Jun 16, 2014
linux-user linux-user: use TARGET_SA_ONSTACK in get_sigframe Jul 15, 2014
net l2tpv3: fix possible double free Jan 7, 2015
pc-bios linuxboot: fix loading old kernels Jan 14, 2015
pixman @ 97336fa qapi: move include files to include/qobject/ Dec 19, 2012
po po: update Italian translation Jul 29, 2014
qapi qapi: dealloc visitor, implement visit_start_union Jan 4, 2015
qga qga: Add missing 'static' attribute Jul 18, 2014
qobject json-lexer: fix escaped backslash in single-quoted string Jun 23, 2014
qom qom: object: Ignore refs/unrefs of NULL Jul 1, 2014
roms pseries: Update SLOF firmware image to qemu-slof-20140630 Jul 8, 2014
scripts Fix a build error in recent versions of perl Jun 22, 2018
slirp slirp: udp: fix NULL pointer dereference because of uninitialized socket Sep 24, 2014
stubs Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into st… Jun 24, 2014
sysconfigs/target Eliminate cpus-x86_64.conf file Sep 21, 2012
target-alpha softmmu: introduce cpu_ldst.h Jun 5, 2014
target-arm Merge in changes from QEMU v2.1.1 (that happened since v2.1.0). Sep 12, 2014
target-cris target-cris/translate.c: Remove _t_gen_mov_TN_env and _t_gen_mov_env_TN Jun 8, 2014
target-i386 target-i386: Support migratable=no properly Sep 10, 2014
target-lm32 vl: allow other threads to do qemu_system_vmstop_request Jun 23, 2014
target-m68k softmmu: introduce cpu_ldst.h Jun 5, 2014
target-microblaze target-microblaze: Delete unused sign_extend() function Jun 10, 2014
target-mips target-mips/translate.c: Free TCG in OPC_DINSV Jul 28, 2014
target-moxie softmmu: introduce cpu_ldst.h Jun 5, 2014
target-openrisc openrisc: fix comment Jun 29, 2014
target-ppc spapr: Move RMA memory region registration code Jul 15, 2014
target-s390x s390x/kvm: synchronize guest floating point registers Jul 14, 2014
target-sh4 softmmu: introduce cpu_ldst.h Jun 5, 2014
target-sparc softmmu: introduce cpu_ldst.h Jun 5, 2014
target-unicore32 target-unicore: Remove unused functions Jun 24, 2014
target-xtensa target-xtensa: fix translation for opcodes crossing page boundary Jan 14, 2015
tcg tcg/mips: fix store softmmu slow path Jan 7, 2015
tests Add unit tests for GPIO bug fixes Jun 6, 2015
trace glib-compat.h: add new thread API emulation on top of pre-2.31 API Jun 10, 2014
ui vnc: sanitize bits_per_pixel from the client Jan 7, 2015
util module: Don't complain when a module is absent Jul 18, 2014
.exrc qemu: add .exrc Sep 7, 2012
.gitignore qapi: ignore generated event files Jun 27, 2014
.gitmodules PPC: Add u-boot firmware for e500 Jun 16, 2014
.mailmap Update mailmap Sep 5, 2013
.travis.yml trace: Multi-backend tracing Jun 9, 2014
CODING_STYLE CODING_STYLE: Section about mixed declarations Mar 27, 2014
COPYING COPYING: update from FSF Oct 12, 2008
COPYING.LIB Update FSF address in GPL/LGPL boilerplate Jan 4, 2009
Changelog Use qemu-project.org domain name Oct 11, 2013
Dockerfile Removed tabs Nov 13, 2017
HACKING HACKING: Document vaddr type usage Jul 23, 2013
LICENSE LICENSE: clarify Aug 12, 2013
MAINTAINERS MAINTAINERS: add Stefan Hajnoczi to IDE maintainers Jul 7, 2014
Makefile PPC: e500: Actually install u-boot.e500 Jul 8, 2014
Makefile.objs qapi script: add event support Jun 23, 2014
Makefile.target configure: Fix -lm test, so that tools can be compiled on hosts that … Jul 1, 2014
README Removed markdown syntax (II) Nov 13, 2017
VERSION Update version for v2.1.3 release Jan 22, 2015
aio-posix.c AioContext: speed up aio_notify Jul 9, 2014
aio-win32.c block: drop aio functions that operate on the main AioContext Jul 9, 2014
arch_init.c migration: catch unknown flags in ram_load Jun 16, 2014
async.c AioContext: speed up aio_notify Jul 9, 2014
balloon.c qapi event: convert BALLOON_CHANGE Jun 23, 2014
block-migration.c migration/block: fix pending() return value Jan 14, 2015
block.c block: Don't probe for unknown backing file format Jan 14, 2015
blockdev-nbd.c nbd: Shutdown socket before closing. Jun 30, 2014
blockdev.c block: add backing-file option to block-stream Jul 1, 2014
blockjob.c block: prefer aio_poll to qemu_aio_wait Jul 9, 2014
bt-host.c sysemu: avoid proliferation of include/ subdirectories Apr 15, 2013
bt-vhci.c sysemu: avoid proliferation of include/ subdirectories Apr 15, 2013
configure l2tpv3 (configure): it is linux-specific Aug 26, 2014
coroutine-gthread.c glib-compat.h: add new thread API emulation on top of pre-2.31 API Jun 10, 2014
coroutine-sigaltstack.c Merge remote-tracking branch 'kwolf/for-anthony' into staging Feb 26, 2013
coroutine-ucontext.c Fix warnings suppressors to honor --disable-werror Apr 17, 2013
coroutine-win32.c coroutine-win32.c: Add noinline attribute to work around gcc bug Jun 26, 2014
cpu-exec.c cpu: make CPU_INTERRUPT_RESET available on all targets May 13, 2014
cpus.c Introduce cpu_clean_all_dirty Dec 24, 2014
cputlb.c softmmu: introduce cpu_ldst.h Jun 5, 2014
device-hotplug.c blockdev: Remove unused DriveInfo reference count Jun 16, 2014
device_tree.c device_tree: qemu_fdt_setprop: Rename val_array arg Dec 20, 2013
disas.c monitor: QEMU Monitor Instruction Disassembly Incorrect for PowerPC L… Jun 16, 2014
dma-helpers.c dma-helpers: Fix too long qiov Jul 14, 2014
dump.c dump: Make DumpState and endian conversion routines available for arc… Jun 16, 2014
exec.c exec: Handle multipage ranges in invalidate_and_set_dirty() Jan 7, 2015
gdbstub.c gdbstub: init mon_chr through qemu_chr_alloc Jan 4, 2015
hmp-commands.hx Add the vhost-user netdev backend to the command line Jun 19, 2014
hmp.c block: add backing-file option to block-stream Jul 1, 2014
hmp.h hmp: add info memdev Jun 19, 2014
iohandler.c iohandler.c: Properly initialize sigaction struct May 23, 2014
ioport.c portio: Allow to mark portio lists as coalesced MMIO flushing Oct 17, 2013
iothread.c AioContext: do not rely on aio_poll(ctx, true) result to end a loop Jul 14, 2014
kvm-all.c kvm: Fix memory slot page alignment logic Jan 7, 2015
kvm-stub.c Add kvm_eventfds_enabled function Jun 19, 2014
main-loop.c block: drop aio functions that operate on the main AioContext Jul 9, 2014
memory.c memory: MemoryRegion: Add size property Jul 1, 2014
memory_mapping.c cpu: Use QTAILQ for CPU list Sep 3, 2013
migration-exec.c aio / timers: Untangle include files Aug 22, 2013
migration-fd.c aio / timers: Untangle include files Aug 22, 2013
migration-rdma.c rdma: bug fixes Jun 23, 2014
migration-tcp.c Coverity: Fix failure path for qemu_accept in migration May 5, 2014
migration-unix.c Coverity: Fix failure path for qemu_accept in migration May 5, 2014
migration.c migration: catch unknown flags in ram_load Jun 16, 2014
module-common.c module: implement module loading Feb 20, 2014
monitor.c monitor: Reset HMP mon->rs in CHR_EVENT_OPEN Jan 5, 2015
nbd.c nbd: Handle NBD_OPT_LIST option. Jun 30, 2014
numa.c numa: show hex number in error message for consistency and prefix the… Sep 8, 2014
os-posix.c oslib-posix: Fix build on FreeBSD Mar 13, 2014
os-win32.c util: Split out exec_dir from os_find_datadir Feb 20, 2014
page_cache.c migration: Plug memory leak in migrate-set-cache-size command Jun 10, 2014
qapi-schema.json mc146818rtc: add rtc-reset-reinjection QMP command Jun 29, 2014
qdev-monitor.c qdev-monitor: include QOM properties in -device FOO, help output Aug 26, 2014
qdict-test-data.txt Introduce QDict test data file Sep 4, 2009
qemu-bridge-helper.c qemu-bridge-helper: Fix fd leak in main() Jun 27, 2014
qemu-char.c pty: Fix byte loss bug when connecting to pty Sep 10, 2014
qemu-coroutine-io.c aio / timers: Untangle include files Aug 22, 2013
qemu-coroutine-lock.c coroutine: remove qemu_co_queue_wait_insert_head Dec 2, 2013
qemu-coroutine-sleep.c coroutine: add co_aio_sleep_ns() to allow sleep in block drivers Oct 30, 2013
qemu-coroutine.c coroutine: add ./configure --disable-coroutine-pool Sep 12, 2013
qemu-doc.texi doc: slirp supports ICMP echo if enabled in Linux Jul 18, 2014
qemu-file.c Make qemu_peek_buffer loop until it gets it's data May 5, 2014
qemu-img-cmds.hx qemu-img: add -l for snapshot in convert Dec 4, 2013
qemu-img.c qemu-img: Check create_opts before image amendment Jan 7, 2015
qemu-img.texi Fix nocow typos in manpage Jul 7, 2014
qemu-io-cmds.c block: prefer aio_poll to qemu_aio_wait Jul 9, 2014
qemu-io.c trace: Multi-backend tracing Jun 9, 2014
qemu-log.c qemu-log: default to stderr for logging output Feb 26, 2013
qemu-nbd.c nbd: Shutdown socket before closing. Jun 30, 2014
qemu-nbd.texi nbd: Miscellaneous typo fixes. May 23, 2014
qemu-options-wrapper.h vl.c: In qemu -h output, only print options for the arch we are runni… Dec 19, 2011
qemu-options.h vl.c: Move option generation logic into a wrapper file Dec 19, 2011
qemu-options.hx qemu-options: fix another allows-to for -net l2tpv3 Jul 26, 2014
qemu-seccomp.c seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist Apr 25, 2014
qemu-tech.texi qemu-tech.texi: update implemented xtensa features list Nov 29, 2012
qemu-timer.c vl.c: remove init_clocks call from main May 9, 2014
qemu.nsi nsis: Improved support for parallel installation of 32 and 64 bit code Nov 7, 2013
qemu.sasl sasl: Avoid 'Could not find keytab file' in syslog Mar 15, 2014
qmp-commands.hx block: add backing-file option to block-stream Jul 1, 2014
qmp.c qmp: hide "hotplugged" device property from device-list-properties Aug 26, 2014
qtest.c Reapply changes to the qtest framework Sep 12, 2014
rules.mak build-sys: introduce install-prog macro to install&strip binaries and… Jun 24, 2014
savevm.c snapshot: fix referencing wrong variable in while loop in do_delvm Jan 6, 2015
softmmu_template.h softmmu: move softmmu_template.h out of include/ Jun 5, 2014
spice-qemu-char.c qemu-char: introduce qemu_chr_alloc Jun 23, 2014
tcg-runtime.c tcg: Push tcg-runtime routines into exec/helper-* May 28, 2014
tci.c Merge remote-tracking branch 'remotes/bonzini/softmmu-smap' into staging Jun 5, 2014
thread-pool.c thread-pool: avoid deadlock in nested aio_poll() calls Sep 8, 2014
thunk.c exec: move include files to include/exec/ Dec 19, 2012
tpm.c Use error_is_set() only when necessary Feb 17, 2014
trace-events trace: add qemu_system_powerdown_request and qemu_system_shutdown_req… Jul 1, 2014
translate-all.c Fix new typos (found by codespell) Jun 24, 2014
translate-all.h translate-all: Change tb_check_watchpoint() argument to CPUState Mar 13, 2014
user-exec.c softmmu: introduce cpu_ldst.h Jun 5, 2014
version.rc Use qemu-project.org domain name Oct 11, 2013
vl.c vl.c: fix regression when reading machine type from config file Jan 14, 2015
vmstate.c vmstate: Add preallocation for migrating arrays (VMS_ALLOC flag) Jun 27, 2014
xbzrle.c xbzrle.c: Avoid undefined behaviour with signed arithmetic Apr 18, 2014
xen-common-stub.c xen: factor out common functions May 7, 2014
xen-common.c xen: factor out common functions May 7, 2014
xen-hvm-stub.c xen-hvm: Fix xen_hvm_init() to adjust pc memory layout Jun 23, 2014
xen-hvm.c Fix new typos in comments (found by codespell) Jul 18, 2014
xen-mapcache.c xen: build on ARM Jul 7, 2014


QEMU with STM32 Microcontroller Implementation

Official Homepage: http://beckus.github.io/qemu_stm32/

This is a copy of QEMU that has been modified to include an implementation
of the STM32 microcontroller.  It also implements an Olimex STM32_P103
developmentvboard.  This project runs the demos located in the
stm32_p103_demos project located at: https://github.com/beckus/stm32_p103_demos .

Commands for a typical build:
./configure --enable-debug --target-list="arm-softmmu"

Useful make commands when rebuilding:
    make defconfig
    make clean

If you receive a warning during compilation, this may cause the build to fail.
In this case you can pass the following option to the "configure" command to
ignore warnings:

The generated executable is arm-softmmu/qemu-system-arm .

Other configure options which control the STM32 implementation:

        Print out clock tree debug statements.

        Print debug statements for specific peripherals.

        Disable the BAUD rate timing simulation
        (i.e. the UART will transmit or receive as fast as possible, rather than
        using a realistic delay).

        Enable setting of the overrun flag if a character is
        received before the last one is processed.  If this is not set, the UART
        will not receive the next character until the previous one is read by
        software.  Although less realisitic, this is safer in case the VM is
        running slow.

Other QEMU configure options which are useful for troubleshooting:

qemu-system-arm options which are useful for trobuleshooting:
    -d ?
        To see available log levels

    -d unimp,guest
        Enable logging to view warnings when an unimplemented register is
        accessed or when an invalid register access is attempted.  This is
        especially useful since many registers are not implemented.

    -d cpu,in_asm
        Enable logging to view the CPU state during execution and the ARM
        instructions which are being executed.  I believe --enable-debug must be
        used for this to work.
        By default, you can find the output in /tmp/qemu.log:

Unit test scripts are included for the STM32 implementation.
These test will be executed when running "make" with the standard
check targets (see tests/Makefile for documentation of QEMU's unit
testing features):
    make check
    make check-qtest-arm

A Docker container containing qemu_stm32 can be built from the Dockerfile:
    docker build . -t qemu_stm32
It can run the examples in stm32_p103_demos:
    docker run --rm qemu_stm32 /usr/local/bin/qemu-system-arm -M stm32-p103 -kernel /stm32_p103_demos/demos/freertos_singlethread/main.bin

The original QEMU README follows:

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team