QEMU ESP32 is a fork of QEMU with Espressif patches for emulating ESP32 microcontroller series. Normally there is prebuilt files in Releases tab, but for some reasons if you want to (or have to) build yourself, then you can follow this guide.
I would recommend Windows environment with MSYS2 for building this. This guide aims at building for x64 architecture, but probably you can do the same for x86 by replacing x86_64 packages with x86 ones.
- Step 1: Install MSYS2.
- Step 2: Open MSYS2 MINGW64 prompts.
- Step 3: Install required packages