run_qemu.sh 611 B

1234567891011121314151617
  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. # generate empty file into which application will be flashed and compared against.
  8. dd if=/dev/zero bs=1024 count=4096 of="empty_file.bin"
  9. ${QEMU_PATH} \
  10. -nographic \
  11. -machine esp32 \
  12. -drive file=empty_file.bin,if=mtd,format=raw \
  13. -global driver=esp32.gpio,property=strap_mode,value=0x0f \
  14. -serial tcp::5555,server,nowait