diff --git a/src/build/buildTask.ts b/src/build/buildTask.ts index 693aee054..afdfd16bb 100644 --- a/src/build/buildTask.ts +++ b/src/build/buildTask.ts @@ -23,7 +23,6 @@ import * as vscode from "vscode"; import * as idfConf from "../idfConfiguration"; import { appendIdfAndToolsToPath, - compareVersion, getEspIdfFromCMake, getSDKConfigFilePath, isBinInPath, @@ -119,7 +118,6 @@ export class BuildTask { if (!cmakeCacheExists) { const espIdfVersion = await getEspIdfFromCMake(this.idfPathDir); let defaultCompilerArgs; - const useEqualSign = compareVersion(espIdfVersion, "4.4") >= 0; if (espIdfVersion === "x.x") { Logger.warn( "Could not determine ESP-IDF version. Using default compiler arguments for the latest known version." @@ -129,12 +127,6 @@ export class BuildTask { "-DPYTHON_DEPS_CHECKED=1", "-DESP_PLATFORM=1", ]; - } else if (useEqualSign) { - defaultCompilerArgs = [ - "-G=Ninja", - "-DPYTHON_DEPS_CHECKED=1", - "-DESP_PLATFORM=1", - ]; } else { defaultCompilerArgs = [ "-G", @@ -153,19 +145,11 @@ export class BuildTask { } let buildPathArgsIndex = compilerArgs.indexOf("-B"); if (buildPathArgsIndex !== -1) { - compilerArgs.splice(buildPathArgsIndex, useEqualSign ? 1 : 2); - } - if (useEqualSign) { - compilerArgs.push(`-B=${this.buildDirPath}`); - } else { - compilerArgs.push("-B", this.buildDirPath); + compilerArgs.splice(buildPathArgsIndex, 2); } + compilerArgs.push("-B", this.buildDirPath); if (compilerArgs.indexOf("-S") === -1) { - if (useEqualSign) { - compilerArgs.push(`-S=${this.currentWorkspace.fsPath}`); - } else { - compilerArgs.push("-S", this.currentWorkspace.fsPath); - } + compilerArgs.push("-S", this.currentWorkspace.fsPath); } const sdkconfigFile = await getSDKConfigFilePath(this.currentWorkspace); @@ -261,7 +245,9 @@ export class BuildTask { this.currentWorkspace ) as string; - const adapterTargetName = await getIdfTargetFromSdkconfig(this.currentWorkspace); + const adapterTargetName = await getIdfTargetFromSdkconfig( + this.currentWorkspace + ); const showTaskOutput = notificationMode === idfConf.NotificationMode.All || notificationMode === idfConf.NotificationMode.Output diff --git a/src/espIdf/reconfigure/task.ts b/src/espIdf/reconfigure/task.ts index f10c2a428..bc54b9ab5 100644 --- a/src/espIdf/reconfigure/task.ts +++ b/src/espIdf/reconfigure/task.ts @@ -27,7 +27,7 @@ import { workspace, } from "vscode"; import { NotificationMode, readParameter } from "../../idfConfiguration"; -import { appendIdfAndToolsToPath, compareVersion, getEspIdfFromCMake, getSDKConfigFilePath } from "../../utils"; +import { appendIdfAndToolsToPath, getSDKConfigFilePath } from "../../utils"; import { join } from "path"; import { TaskManager } from "../../taskManager"; import { getVirtualEnvPythonPath } from "../../pythonManager"; @@ -65,18 +65,12 @@ export class IdfReconfigureTask { const idfPy = join(this.idfPathDir, "tools", "idf.py"); const reconfigureArgs = [idfPy]; - const espIdfVersion = await getEspIdfFromCMake(this.idfPathDir); - const useEqualSign = compareVersion(espIdfVersion, "4.4") >= 0; let buildPathArgsIndex = reconfigureArgs.indexOf("-B"); if (buildPathArgsIndex !== -1) { - reconfigureArgs.splice(buildPathArgsIndex, useEqualSign ? 1 : 2); - } - if (useEqualSign) { - reconfigureArgs.push(`-B=${this.buildDirPath}`); - } else { - reconfigureArgs.push("-B", this.buildDirPath); + reconfigureArgs.splice(buildPathArgsIndex, 2); } + reconfigureArgs.push("-B", this.buildDirPath); const sdkconfigFile = await getSDKConfigFilePath(this.curWorkspace); if (reconfigureArgs.indexOf("SDKCONFIG") === -1) {