Skip to content

Conversation

@brianignacio5
Copy link
Collaborator

Description

#1557 unfortunately introduced a bug, the IDFTarget class was not used in setTargetInIdf.ts so preview targets stopped working (like ESP32C5).

This pull request adds support for new ESP-IDF targets and improves type safety and consistency when selecting and handling targets throughout the codebase. Additionally, there is a minor update to the status bar item background color handling.

ESP-IDF Target Support Improvements

  • Added support for new targets esp32c4, esp32c5, and esp32c61 to the IdfTarget type and mapped their CPU watchpoint numbers in src/cdtDebugAdapter/debugConfProvider.ts. [1] [2]

Target Selection Refactoring

  • Updated the type of quick pick items in setIdfTarget to use IdfTarget for improved type safety, and refactored how default boards and connected boards are handled when building the selection list in src/espIdf/setTarget/index.ts. [1] [2]
  • Modified logic to consistently access the target via selectedTarget.idfTarget.target and ensure correct parameter updates when setting the target in the workspace and configuration.

UI and Visual Improvements

  • Changed the way the status bar item's background color is set for hints, using ThemeIcon for better integration with VSCode theming in src/statusBar/index.ts. [1] [2]

Type of change

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

Steps to test this pull request

  1. Click on ESP-IDF: Set Espressif Device Target using a preview target from the list. The command should executed correctly and the new target should be applied to sdkconfig and idf.customExtraVars setting.
  2. Execute action.
  3. Observe results.
  • Expected behaviour:
    The command should executed correctly and the new target should be applied to sdkconfig and idf.customExtraVars setting.

  • Expected output:
    The command should executed correctly and the new target should be applied to sdkconfig and idf.customExtraVars setting.

How has this been tested?

Test Configuration:

  • ESP-IDF Version: 6.0.0
  • 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 added this to the v1.11.0 milestone Aug 21, 2025
@brianignacio5 brianignacio5 self-assigned this Aug 21, 2025
@brianignacio5 brianignacio5 added the bugfix Fixing some issue and bug in this PR label Aug 21, 2025
@github-actions
Copy link

github-actions bot commented Aug 21, 2025

Download the artifacts for this pull request:
You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

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.

LGTM

Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP left a comment

Choose a reason for hiding this comment

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

Confirmed working

@brianignacio5 brianignacio5 merged commit d6b6554 into master Aug 27, 2025
6 of 7 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/set-preview-target branch August 27, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixing some issue and bug in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants