Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU emulated programm not updated when, changing, rebuilding the project and then restarting the QEMU Server (VSC-1473) #1281

Closed
1 task done
Voidler-cell opened this issue Aug 15, 2024 · 5 comments · May be fixed by #1282
Assignees
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) stale Stale PR or Issue

Comments

@Voidler-cell
Copy link

Voidler-cell commented Aug 15, 2024

OS

Windows

Operating System version

Windows 11

Visual Studio Code version

1.92.1

ESP-IDF version

5.3.0

Python version

3.12.1

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.22631
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\Program Files\Eclipse Adoptium\jdk-17.0.11.9-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\AMD\AMDuProf\bin;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\AppData\Local\Programs\Python\Python312\Scripts;C:\AppData\Local\Programs\Python\Python312;C:\AppData\Local\Programs\Python\Launcher;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Local\Programs\Microsoft VS Code\bin;C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Program Files (x86)\Dr. Memory\bin;C:\msys64\clang64\bin;C:.dotnet\tools;C:\raylib\raylib\src;C:\apache-maven-3.9.6-bin\apache-maven-3.9.6\bin;C:\Program Files\zig;C:.espressif\tools\qemu-xtensa\esp_develop_8.2.0_20240122\qemu\bin;C:.espressif\tools\qemu-riscv32\esp_develop_8.2.0_20240122\qemu\bin;
System environment variable PYTHON
undefined
Visual Studio Code version 1.92.1
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.8.0
Workspace folder e:\codegit\bed_cooler
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) C:\esp\v5.3\esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) ${env:HOMEKIT_PATH}
Custom extra paths (idf.customExtraPaths) C:.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin;C:.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin;C:.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin;C:.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin;C:.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin;C:.espressif\tools\cmake\3.24.0\bin;C:.espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin;C:.espressif\tools\ninja\1.11.1;C:.espressif\tools\idf-exe\1.0.3;C:.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64;C:.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:.espressif\tools\esp-rom-elfs\20240305
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: C:.espressif\tools\openocd-esp32\v0.12.0-esp32-20240318/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:.espressif\tools\esp-rom-elfs\20240305/
Virtual env Python Path (idf.pythonBinPath) C:.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe
Serial port (idf.port) COM1
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32.cfg
ESP-IDF Tools Path (idf.toolsPath) C:.espressif
Git Path (idf.gitPath) C:.espressif\tools\idf-git\2.39.2\cmd\git.exe
Notification Mode (idf.notificationMode) All
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-HomeKit Path (idf.espHomeKitSdkPath) false
Access to ESP-IDF Custom extra paths
Access to C:.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: true
Access to C:.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: true
Access to C:.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin: true
Access to C:.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin: true
Access to C:.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: true
Access to C:.espressif\tools\cmake\3.24.0\bin: true
Access to C:.espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin: true
Access to C:.espressif\tools\ninja\1.11.1: true
Access to C:.espressif\tools\idf-exe\1.0.3: true
Access to C:.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: true
Access to C:.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: true
Access to C:.espressif\tools\esp-rom-elfs\20240305: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path true
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-HomeKit-SDK Path (idf.espHomeKitSdkPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in C:.espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin: false
Spaces in C:.espressif\tools\riscv32-esp-elf-gdb\14.2_20240403\riscv32-esp-elf-gdb\bin: false
Spaces in C:.espressif\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin: false
Spaces in C:.espressif\tools\riscv32-esp-elf\esp-13.2.0_20240530\riscv32-esp-elf\bin: false
Spaces in C:.espressif\tools\esp32ulp-elf\2.38_20240113\esp32ulp-elf\bin: false
Spaces in C:.espressif\tools\cmake\3.24.0\bin: false
Spaces in C:.espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\bin: false
Spaces in C:.espressif\tools\ninja\1.11.1: false
Spaces in C:.espressif\tools\idf-exe\1.0.3: false
Spaces in C:.espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64: false
Spaces in C:.espressif\tools\dfu-util\0.11\dfu-util-0.11-win64: false
Spaces in C:.espressif\tools\esp-rom-elfs\20240305: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.39.2.windows.1
ESP-IDF version 5.3.0
Python version 3.11.2
Python's pip version 24.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.2.3
CacheControl version: 0.14.0
certifi version: 2024.7.4
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.1.7
colorama version: 0.4.6
construct version: 2.10.70
contextlib2 version: 21.6.0
cryptography version: 42.0.8
ecdsa version: 0.19.0
esp-coredump version: 1.11.0
esp-idf-kconfig version: 2.3.0
esp-idf-monitor version: 1.4.0
esp_idf_nvs_partition_gen version: 0.1.2
esp-idf-panic-decoder version: 1.1.0
esp-idf-size version: 1.5.0
esptool version: 4.8.dev4
filelock version: 3.15.4
freertos-gdb version: 1.0.3
idf-component-manager version: 1.5.3
idna version: 3.7
intelhex version: 2.3.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
msgpack version: 1.0.8
packaging version: 24.1
pip version: 24.2
pyclang version: 0.4.2
pycparser version: 2.22
pyelftools version: 0.31
pygdbmi version: 0.11.0.0
Pygments version: 2.18.0
pyparsing version: 3.1.2
pyserial version: 3.5
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.32.3
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.1
schema version: 0.7.5
setuptools version: 71.0.0
six version: 1.16.0
tqdm version: 4.66.4
urllib3 version: 1.26.19
windows-curses version: 2.3.3
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "gdbtarget",
"request": "attach",
"name": "Eclipse CDT GDB Adapter"
},
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}\tools\xtensa-esp-elf\esp-13.2.0_20240530\xtensa-esp-elf\bin\xtensa-esp32-elf-gcc.exe",
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/
",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
}

----------------------------------------------------------- Latest error -----------------------------------------------------------------
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "C:\.espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe C:\esp\v5.3\esp-idf\tools\check_python_dependencies.py -r c:\.vscode\extensions\espressif.esp-idf-extension-1.8.0\esp_debug_adapter\requirements.txt"
}

Extension

No response

Description

The running program in the QEMU emulation is not updated after changes and a rebuild.
The QEMU Server was stopped stoped before the changes were made, and restarted after the rebuild.

Only when the build directory is cleanded and the project is the rebuilt, will the changes be reflected.
Deleting the merged_qemu.bin file in the build directory before the rebuilt also works.

Steps to reproduce:

  • Create New project for target esp32 with hello world template

  • Build the project

  • Start QEMU Server (via advanced axtension settings or Command Palette ESP-IDF: Launch QEMU Server)

  • Start Command Palette ESP-IDF: Monitor QEMU Device or ESP-IDF: Launch QEMU Debug Session

  • View the correct output

  • Stop the QEMU Server

  • Change something obvius in the code (ie. counting down from 100 instead of 10)

  • Rebuild

  • Restart the QEMU Server

  • (Restart Monitor QEMU Device or Debug Session if not still listening)

  • Still get the same output as before

  • Stop the QEMU Server

  • Delete the "build/merged_qemu.bin" file

  • Restart the QEMU Server

  • View the updated correct output

Expected:
It would be expected, that the QEMU emulation, would update with the rebuild/restart, without needing to delete a build file.

Debug Message

None

Other Steps to Reproduce

I am not running inside a remote container.
I just added the path to the qemu-system-xtensa to my PATH variables.

When starting the server without any build/merged_qemu.bin file already pressent, a "Merge binaries task is done (thunder emojy)" message is displayed, that is missing when starting with rebuild changes, and an already existing build/merged_qemu.bin file.

I expect, that the Launch QEMU Server only creates a new merged_qemu.bin file, if no other exists. Setting this to always overwrite it, could be a quick short term fix, but checking for changes is the better solution.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@Voidler-cell Voidler-cell added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Aug 15, 2024
@github-actions github-actions bot changed the title QEMU emulated programm not updated when, changing, rebuilding the project and then restarting the QEMU Server QEMU emulated programm not updated when, changing, rebuilding the project and then restarting the QEMU Server (VSC-1473) Aug 15, 2024
@brianignacio5
Copy link
Collaborator

Thank you for your issue report. We will fix this behavior as soon as possible.

@brianignacio5
Copy link
Collaborator

Could you try this vsix installer?

@Voidler-cell
Copy link
Author

Yes, so I tried it and it did not work.

But then I tried the version at the linked pull request and it worked.

I tried the installer here a few more times, in case I installed it wrong, but it seems to not work.

But thank you for the fix.

Copy link

github-actions bot commented Sep 7, 2024

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Sep 7, 2024
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Sep 9, 2024
Copy link

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) stale Stale PR or Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants