diff --git a/docs/en/api-guides/tools/qemu.rst b/docs/en/api-guides/tools/qemu.rst index ee0d48f118..48eba546c1 100644 --- a/docs/en/api-guides/tools/qemu.rst +++ b/docs/en/api-guides/tools/qemu.rst @@ -8,11 +8,11 @@ Espressif maintains a `fork `_ of the QEMU em Prerequisites ------------- -To use QEMU with ``idf.py`` you first need to install the above-mentioned fork of QEMU. ESP-IDF provides pre-built binaries for x86_64 Linux. If you are using this platform, you can install the pre-built binaries with the following command: +To use QEMU with ``idf.py`` you first need to install the above-mentioned fork of QEMU. ESP-IDF provides pre-built binaries for x86_64 and arm64 Linux and macOS, as well as x86_64 Windows. If you are using this platform, you can install the pre-built binaries with the following command: .. code-block:: console - python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv + python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32 After installing QEMU, make sure it is added to PATH by running ``. ./export.sh`` in the IDF directory. diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 2cd4c4a26a..e9f4516882 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -22,6 +22,7 @@ RUN : \ libglib2.0-0 \ libncurses-dev \ libpixman-1-0 \ + libsdl2-2.0-0 \ libslirp0 \ libusb-1.0-0-dev \ make \ diff --git a/tools/test_idf_tools/test_idf_tools.py b/tools/test_idf_tools/test_idf_tools.py index 2c21e46cba..5f974895f0 100755 --- a/tools/test_idf_tools/test_idf_tools.py +++ b/tools/test_idf_tools/test_idf_tools.py @@ -85,9 +85,6 @@ RISCV_ELF_ARCHIVE_PATTERN = RISCV_ELF + '-' \ XTENSA_ELF_ARCHIVE_PATTERN = XTENSA_ELF + '-' \ + (XTENSA_ELF_VERSION[len('esp-'):] if XTENSA_ELF_VERSION.startswith('esp-') else XTENSA_ELF_VERSION) -QEMU_RISCV_ARCHIVE_PATTERN = 'esp-' + QEMU_RISCV -QEMU_XTENSA_ARCHIVE_PATTERN = 'esp-' + QEMU_XTENSA - class TestUsage(unittest.TestCase): @@ -375,8 +372,8 @@ class TestUsage(unittest.TestCase): self.assert_tool_installed(output, XTENSA_ESP_GDB, XTENSA_ESP_GDB_VERSION) self.assert_tool_installed(output, RISCV_ESP_GDB, RISCV_ESP_GDB_VERSION) self.assert_tool_installed(output, ESP_ROM_ELFS, ESP_ROM_ELFS_VERSION) - self.assert_tool_installed(output, QEMU_RISCV, QEMU_RISCV_VERSION, QEMU_RISCV_ARCHIVE_PATTERN) - self.assert_tool_installed(output, QEMU_XTENSA, QEMU_XTENSA_VERSION, QEMU_XTENSA_ARCHIVE_PATTERN) + self.assert_tool_installed(output, QEMU_RISCV, QEMU_RISCV_VERSION) + self.assert_tool_installed(output, QEMU_XTENSA, QEMU_XTENSA_VERSION) self.assertIn('Destination: {}'.format(os.path.join(self.temp_tools_dir, 'dist')), output) self.assertEqual(required_tools_installed, output.count('Done')) diff --git a/tools/tools.json b/tools/tools.json index b1f28e2ca2..a1e844dfe1 100644 --- a/tools/tools.json +++ b/tools/tools.json @@ -888,16 +888,36 @@ "qemu-system-xtensa", "--version" ], - "version_regex": "QEMU emulator version ([a-z0-9.-_]+)", + "version_regex": "QEMU emulator version [0-9.]+ \\(([a-z0-9.-_]+)\\)", "versions": [ { "linux-amd64": { - "sha256": "a7e5e779fd593cb15f6d197034dc2fb427ed9165a4743e2febc6f6a47dfcc618", - "size": 45962695, - "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.0.0-20230522/esp-qemu-xtensa-softmmu-develop_8.0.0_20230522-x86_64-linux-gnu.tar.bz2" + "sha256": "88176f41c2fb17448372b4a120109275270c0e6bc49af4938f9f82d48e02f126", + "size": 14537932, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-xtensa-softmmu-esp_develop_8.1.3_20231206-x86_64-linux-gnu.tar.xz" }, - "name": "8.0.0", - "status": "recommended" + "linux-arm64": { + "sha256": "37e15a038456e9692394e7ab7faf4d8e04b937476bb22c346e7ce0aaa579a003", + "size": 14084300, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-xtensa-softmmu-esp_develop_8.1.3_20231206-aarch64-linux-gnu.tar.xz" + }, + "macos": { + "sha256": "e9321b29f59aa5c5f8d713ddcde301e46348493cdbf2dc12df2e047e6f456b58", + "size": 3345216, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-xtensa-softmmu-esp_develop_8.1.3_20231206-x86_64-apple-darwin.tar.xz" + }, + "macos-arm64": { + "sha256": "ab5f2c0c7f9428dfdd970f1cd9cac66e9d455e4ba87308d42882f43580433cd6", + "size": 3150564, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-xtensa-softmmu-esp_develop_8.1.3_20231206-aarch64-apple-darwin.tar.xz" + }, + "name": "esp_develop_8.1.3_20231206", + "status": "recommended", + "win64": { + "sha256": "cc1b0f87317e92aad71b40c409f404ce6df83bec0752feb6429eae65af606ae5", + "size": 32314176, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-xtensa-softmmu-esp_develop_8.1.3_20231206-x86_64-w64-mingw32.tar.xz" + } } ] }, @@ -921,16 +941,36 @@ "qemu-system-riscv32", "--version" ], - "version_regex": "QEMU emulator version ([a-z0-9.-_]+)", + "version_regex": "QEMU emulator version [0-9.]+ \\(([a-z0-9.-_]+)\\)", "versions": [ { "linux-amd64": { - "sha256": "bc7607720ff3d7e3d39f3e1810b8795f376f4b9cf3783c8f2ed3f7f14ba74717", - "size": 47175493, - "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.0.0-20230522/esp-qemu-riscv32-softmmu-develop_8.0.0_20230522-x86_64-linux-gnu.tar.bz2" + "sha256": "88373441ce34d598da372e313f2ff0d6a6bed9a11f8152a2dde0be1cc89b917f", + "size": 15931252, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-riscv32-softmmu-esp_develop_8.1.3_20231206-x86_64-linux-gnu.tar.xz" }, - "name": "8.0.0", - "status": "recommended" + "linux-arm64": { + "sha256": "925be5f64c27fad9b982fb24870119fe2af7d1aa36b3607044f5db4d83633f8c", + "size": 15433748, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-riscv32-softmmu-esp_develop_8.1.3_20231206-aarch64-linux-gnu.tar.xz" + }, + "macos": { + "sha256": "02fb7a928fe2f35debb561a1531458ef756c1b7dc2226afdb464eba81392920b", + "size": 3431904, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-riscv32-softmmu-esp_develop_8.1.3_20231206-x86_64-apple-darwin.tar.xz" + }, + "macos-arm64": { + "sha256": "2a5836a02070964d05b947220906575e2f6a88dd68473eea72622705cb18105b", + "size": 3152032, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-riscv32-softmmu-esp_develop_8.1.3_20231206-aarch64-apple-darwin.tar.xz" + }, + "name": "esp_develop_8.1.3_20231206", + "status": "recommended", + "win64": { + "sha256": "8ecef3ccb770cce5b82c0683c318eedd6da288d878151c7d002d89ae64e7c1bb", + "size": 34976352, + "url": "https://github.com/espressif/qemu/releases/download/esp-develop-8.1.3-20231206/qemu-riscv32-softmmu-esp_develop_8.1.3_20231206-x86_64-w64-mingw32.tar.xz" + } } ] }