Skip to content

Commit

Permalink
use IDF_TARGET as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Dec 24, 2024
1 parent 2c15213 commit 9c56b92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/espIdf/setTarget/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ export async function setIdfTarget(
if (!selectedTarget) {
return;
}
const customExtraVars = readParameter(
"idf.customExtraVars",
workspaceFolder
) as { [key: string]: string };
customExtraVars["IDF_TARGET"] = selectedTarget.target;
await writeParameter(
"idf.customExtraVars",
customExtraVars,
configurationTarget,
workspaceFolder.uri
);
const openOcdScriptsPath = await getOpenOcdScripts(workspaceFolder.uri);
const boards = await getBoards(
openOcdScriptsPath,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ export async function appendIdfAndToolsToPath(curWorkspace: vscode.Uri) {
modifiedEnv.RMAKER_PATH = rainmakerPathDir || modifiedEnv.RMAKER_PATH;

const defaultToolsPath = path.join(containerPath, ".espressif");
modifiedEnv.IDF_TOOLS_PATH = modifiedEnv.IDF_PATH || defaultToolsPath;
modifiedEnv.IDF_TOOLS_PATH = modifiedEnv.IDF_TOOLS_PATH || defaultToolsPath;
const matterPathDir = idfConf.readParameter(
"idf.espMatterPath",
curWorkspace
Expand Down

0 comments on commit 9c56b92

Please sign in to comment.