[Feature Request]: Allow 'idf.svdFilePath' to construct the path to an .svd file based on the current target (VSC-1550) #1386
Labels
Feature / Enhancement Request
Request for Feature/ Enhancement
Is your feature request related to a problem?
The "ESP-IDF Peripheral Viewer" window requires the setting
idf.svdFilePath
to be set to the full path of an SVD file matching the target being debugged (i.e. esp32s3 or esp32 ...). Before v1.9.0,idf.adapterTargetName
could be used to constructidf.svdFilePath
as follows:This made configuring the svd file path automatic even when the target changed. There was never any need to manually adjust
idf.svdFilePath
.Version v1.9.0, removed
idf.adapterTargetName
(a great change in my opinion). This makes it impossible to setidf.svdFilePath
to automatically adapt to the target.This feature proposes a few ways to bring back automatic configuration of
idf.svdFilePath
as the target changes without the problematic settingidf.adapterTargetName
.Describe the solution you'd like
Expose a read only configuration setting tentatively called
idf.currentTargetName
which is interpreted as the value returned bygetIdfTargetFromSdkconfig()
. This would allow the value ofidf.svdFilePath
to automatically adapt as the target changes with the following sample configuration insettings.json
:Describe alternatives you've considered
Another approach would be to add a new setting tentatively called
idf.svdFilesRoot
pointing to a directory where the extension can locate the svd file, assuming it is called getIdfTargetFromSdkconfig() + '.svd'.Another approach would be to add a command tentatively called
idf.getCurrentTargetName
which would return whatevergetIdfTargetFromSdkconfig()
returns at the timeidf.svdFilePath
is being used by the extension. The following sample configuration insettings.json
would be valid:Another option would be to allow accessing SDK configuration values like
IDF_TARGET
from settings.json, with a syntax similar to${sdkConfig:IDF_TARGET}
. The following sample configuration insettings.json
would be valid:All approaches maintain the ability to set
idf.svdFilePath
to a fixed, non-target dependent path for users who prefer this option.The text was updated successfully, but these errors were encountered: