|
1 | 1 | .. _qemu: |
2 | 2 |
|
3 | | -ESP-IDF QEMU Integration with Visual Studio Code |
4 | | -=================================================== |
| 3 | +QEMU Integration |
| 4 | +================ |
5 | 5 |
|
6 | | -When you create a project using this extension commands, there is Dockerfile which can be used with the `Microsoft Remote Containers Extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_. You can open any project inside a container with the **Remote Containers: Open Folder in Container..** command. |
| 6 | +When you create a project using this extension's commands, a Dockerfile is included for use with the `Dev Containers <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_. You can open any project inside a container with the ``Dev Containers: Open Folder in Container`` command. |
7 | 7 |
|
8 | | -ESP-IDF setup can include a fork of `Espressif QEMU fork <https://github.com/espressif/qemu>`_ for Espressif devices, which can be used for emulated development. You can make sure is installed it by running ``python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32`` in the **ESP-IDF: Open ESP-IDF Terminal** terminal. |
| 8 | +The ESP-IDF setup can include a fork of the `Espressif QEMU <https://github.com/espressif/qemu>`_ for Espressif devices, which is used for emulated development. Ensure it is installed by running ``python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32`` in the ``ESP-IDF: Open ESP-IDF Terminal`` terminal. |
9 | 9 |
|
10 | 10 | .. note:: |
11 | | - * The **ESP-IDF: Add Docker Container Configuration** command can be used to add these files to the current project directory. |
| 11 | + |
| 12 | + The ``ESP-IDF: Add Docker Container Configuration`` command can be used to add these files to the current project directory. |
12 | 13 |
|
13 | 14 | Development steps: |
14 | 15 |
|
15 | | -1. Prepare a project folder in a container based on the dockerfile in the templates ``.devcontainer`` directory in this repository. For this you can: |
16 | | - - Create a project using **ESP-IDF: New Project** command which will include the ``.devcontainer`` directory. |
17 | | - - Use the **ESP-IDF: Add Docker Container Configuration** command to add the ``.devcontainer`` files to the currently opened project directory. |
18 | | -2. Use the **Remote Containers: Open Folder in Container..** command to open the folder within the container. |
19 | | -3. The **Remote Containers** will build the container from the Dockerfile (if it has not been created before) and install this extension on the container. |
20 | | -4. The extension should be self configured, otherwise run the setup wizard. |
21 | | -5. Write your code and build the project with the **ESP-IDF: Build your Project** command. |
22 | | -6. Use the **ESP-IDF: Launch QEMU Server** command or the **[QEMU Server]** link in the activity bar to launch QEMU with the binaries from the build directory. |
23 | | -7. You can use the **ESP-IDF: Monitor QEMU Device** command to launch a terminal running IDF Monitor on QEMU. |
24 | | -8. If you want to launch a QEMU debug session, use the **ESP-IDF: Launch QEMU Debug Session** commmand, which will stop any existing QEMU server and launch a new QEMU server for debugging. |
| 16 | +1. Prepare a project folder in a container based on the Dockerfile in the template's ``.devcontainer`` directory in this repository. For this you can: |
| 17 | + |
| 18 | + - Create a project using the ``ESP-IDF: New Project`` command, which includes the ``.devcontainer`` directory. |
| 19 | + - Use the ``ESP-IDF: Add Docker Container Configuration`` command to add the ``.devcontainer`` files to the currently opened project directory. |
25 | 20 |
|
26 | | -You can use the ``idf.qemuDebugMonitor`` configuration setting to enable the monitor to start after QEMU debug session is launched. If you want to pass additional arguments ``idf.qemuExtraArgs`` configuration setting can be used. |
| 21 | +2. Use the ``Dev Containers: Open Folder in Container`` command to open the folder within the container. |
| 22 | +3. The **Dev Containers** will build the container from the Dockerfile (if it has not been created before) and install this extension on the container. |
| 23 | +4. The extension should be self-configured; otherwise, run the setup wizard. |
| 24 | +5. Write your code and build the project with the ``ESP-IDF: Build your Project`` command. |
| 25 | +6. Use the ``ESP-IDF: Launch QEMU Server`` command or the **[QEMU Server]** link in the activity bar to launch QEMU with the binaries from the build directory. |
| 26 | +7. Use the ``ESP-IDF: Monitor QEMU Device`` command to launch a terminal running IDF Monitor on QEMU. |
| 27 | +8. To launch a QEMU debug session, use the ``ESP-IDF: Launch QEMU Debug Session`` commmand, which will stop any existing QEMU server and launch a new QEMU server for debugging. |
27 | 28 |
|
28 | | -An example of ``"idf.qemuExtraArgs": ["--qemu-extra-args"]`` can be used to pass additional arguments to QEMU directly while ``--flash-file`` or ``--efuse-file`` are idf.py specific arguments as described in **ESP-IDF QEMU Emulator** documentation below. |
| 29 | +Set the ``idf.qemuDebugMonitor`` configuration option to start the monitor after the QEMU debug session is launched. To pass additional arguments, set the ``idf.qemuExtraArgs`` configuration option. |
29 | 30 |
|
30 | | -More information about how to use in `ESP-IDF QEMU Emulator <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/qemu.html>`_. |
| 31 | +An example of ``"idf.qemuExtraArgs": ["--qemu-extra-args"]`` can be used to pass additional arguments to QEMU directly, while ``--flash-file`` or ``--efuse-file`` are ``idf.py`` specific arguments as described in the `ESP-IDF QEMU Emulator <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/qemu.html>`_ documentation. |
31 | 32 |
|
32 | 33 | .. note:: |
33 | | - The extension assumes that ``qemu-system-xtensa`` or ``qemu-system-riscv32`` is available in the environment variable PATH to run **ESP-IDF: Monitor QEMU Device** and **ESP-IDF: Launch QEMU Debug Session**. |
| 34 | + |
| 35 | + The extension assumes that ``qemu-system-xtensa`` or ``qemu-system-riscv32`` is available in the environment variable PATH to run ``ESP-IDF: Monitor QEMU Device`` and ``ESP-IDF: Launch QEMU Debug Session``. |
0 commit comments