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

[VSC-1473] update dockerfile and qemu options #1282

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Aug 16, 2024

Description

Update Dockerfile and QEMU options.:

  • Remove adding QEMU in Dockerfile and using the one from ESP-IDF tools.
  • Adding QEMU options to support both esp32 and esp32c3 as target.
  • Add ${idf.buildPath}/merged-qemu.bin delete when ${idf.buildPath}/.bin_timestamp changes to trigger rebuilding the merged QEMU bin image.

Fixes #1281
Fixes #1320

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Click on "ESP-IDF: Launch QEMU Debug Session" or ESP-IDF: Monitor QEMU Device should work for esp32 or esp32c3 and show error for other IDF_TARGET.
  2. Change the source code. The merged-qemu.bin should be deleted.
  3. Click on "ESP-IDF: Launch QEMU Debug Session" or ESP-IDF: Monitor QEMU Device and the new image should be generated and used.
  • Expected behaviour:

  • Expected output:

How has this been tested?

Manual testing in a Dev Container in Visual Studio Code running previous code on ESP-IDF project like the blink example.

Test Configuration: Using VSCode Devcontainer Docker container in either Windows or MacOS

  • ESP-IDF Version: 5.4
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@brianignacio5 brianignacio5 self-assigned this Aug 16, 2024
Copy link

github-actions bot commented Aug 16, 2024

Download the artifacts for this pull request:

Copy link

Pull request 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 11, 2024
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Sep 11, 2024
Copy link

github-actions bot commented Oct 9, 2024

Pull request 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 Oct 9, 2024
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Oct 10, 2024
@brianignacio5
Copy link
Collaborator Author

PTAL @radurentea @Fabricio-ESP

Copy link
Collaborator

@radurentea radurentea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments related to some small text changes

} catch (error) {
const msg = error.message
? error.message
: "Error launching QEMU debugging";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use translation for notitfications and keep the name and capitalisation the same. Please check line 2471

{
cancellable: true,
location: ProgressLocation,
title: "ESP-IDF: Starting ESP-IDF QEMU Debug",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change the title to "ESP-IDF: Starting ESP-IDF QEMU Debugging"

@radurentea
Copy link
Collaborator

Hi @brianignacio5,

I've left some small comments related to consistency of the text and translations.

Also, when testing I ran into the following issues:

  1. Docker container does not come pre-configured as stated in our documentation at step 4, python path is missing, which causes issues with the commands that are using python (ex: setting device target etc)
  2. When trying to configure the extension inside the docker container, python path still doesn't changes.

@brianignacio5
Copy link
Collaborator Author

Hi @brianignacio5,

I've left some small comments related to consistency of the text and translations.

Also, when testing I ran into the following issues:

  1. Docker container does not come pre-configured as stated in our documentation at step 4, python path is missing, which causes issues with the commands that are using python (ex: setting device target etc)
  2. When trying to configure the extension inside the docker container, python path still doesn't changes.

2 things you need to consider:

  1. Are you re opening a ESP-IDF project that already has .vscode/settings.json into a Docker Container ? Do you have python path defined there? The container will use settings from .devcontainer/devcontainer.json IF .vscode/settings.json are not defined.
  2. When you re-open a project in a Docker container, the extension installed is from marketplace. Have you reinstalled the vsix from this PR in the container to see if it works. The python path issue is from marketplace extension which should be resolved with the removal of python path settings.
  3. A doctor command output from the container will show you what settings are used in the container. If you see python path. Please share this doctor command output.

@radurentea
Copy link
Collaborator

Hi @brianignacio5,

  1. I've checked and indeed the settings.json inside the project was configured with the settings from my Mac. I thought the Remote Settings will have higher priority, but it was not the case
  2. I did not think of that, but it makes sense that I had to install a new version of the extension.

After properly configuring the container settings, the issue has been resolved.

The project is now working as expected. I'll create a separate ticket to investigate a more robust solution for managing configuration switches between local development and container environments as we've discussed.

@Fabricio-ESP Fabricio-ESP changed the title update dockerfile and qemu options [VSC-1473] update dockerfile and qemu options Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants