Dockerfile for qemu for STM32 devices on Ubuntu 18.04 including some nice programming environments, libraries, and examples such as:
- https://github.com/beckus/stm32_p103_demos.git
- https://github.com/ve3wwg/stm32f103c8t6.git, from the book 'Beginning STM32 : Developing with FreeRTOS, libopencm3 and GCC'
- https://github.com/STM32-base/STM32-base.git
$ docker pull amamory/qemu-stm32
$ docker run --name stm32 -it --rm -v $PWD:/work amamory/qemu-stm32 qemu-system-arm \
-M stm32-p103 -s \
-kernel /usr/src/app/stm32/stm32_p103_demos/demos/freertos_singlethread/main.elf
$ docker exec -it stm32 arm-none-eabi-gdb /usr/src/app/stm32/stm32_p103_demos/demos/freertos_singlethread/main.elf
$ docker run -it --rm -v $PWD:/work amamory/qemu-stm32 bash
$ make -C ./stm32_p103_demos/ clean freertos_singlethread_ALL
$ docker run -it --rm -v $PWD:/work amamory/qemu-stm32 arm-none-eabi-gcc \
-mcpu=cortex-m3 \
hello_app.c -o hello_app
$ docker run --rm -v $PWD:/work amamory/qemu-stm32 qemu-system-arm \
-M stm32-p103 -s \
-kernel ./hello