run_qemu.sh 803 B

123456789101112131415161718192021
  1. # QEMU_PATH environment variable has to be defined, pointing to qemu-system-xtensa
  2. # Example: export QEMU_PATH=/home/user/esp/qemu/xtensa-softmmu/qemu-system-xtensa
  3. if [ -z "${QEMU_PATH}" ]; then
  4. echo "QEMU_PATH environment variable needs to be set"
  5. exit 1
  6. fi
  7. # Restore content of hello-world.bin image before passing to qemu,
  8. # as it was modified by tests, flashing new application.
  9. # cp ../images/generated_hello-world.bin ../images/hello-world.bin
  10. # generate empty file into which application will be flashed and compared against.
  11. dd if=/dev/zero bs=1024 count=4096 of="empty_file.bin"
  12. ${QEMU_PATH} \
  13. -nographic \
  14. -machine esp32 \
  15. -drive file=empty_file.bin,if=mtd,format=raw \
  16. -global driver=esp32.gpio,property=strap_mode,value=0x0f \
  17. -serial tcp::5555,server,nowait