use IDF_TARGET in customExtraVars if no sdkconfig #1385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
To find the current IDF_TARGET the extension reads the sdkconfig in v1.9.0 but before there was a
idf.adapterTargetName
configuration setting which was used to resolve IDF_TARGET. The previous logic would fail if the current project is configure for a target (say esp32) but the configuration setting is set to (say esp32c3).Reading from sdkconfig seems like a better approach, but what happens when you want to define a IDF_TARGET but no sdkconfig exists ? For this case we still need to persist this somehow. Now we would use
idf.customExtraVars
configuration setting and addIDF_TARGET
when running theESP-IDF: Set Espressif Device Target
command. The extension will use this value when sdkconfig IDF_TARGET value doesn't exist.Fixes #1363
Type of change
Steps to test this pull request
ESP-IDF: Set Espressif Device Target
on a ESP-IDF project. This will create an sdkconfig file and build project.ESP-IDF: Build your project
command. The project should build with the target defined before instead of previously default esp32.The IDF_TARGET that was set in 1 is still used when sdkconfig has been deleted for other extension commands like
ESP-IDF: Build your project
.The IDF_TARGET that was set in 1 is still used when sdkconfig has been deleted for other extension commands like
ESP-IDF: Build your project
.How has this been tested?
Manual test by following steps above.
Test Configuration:
Checklist