Skip to content

Commit

Permalink
Add --make argument
Browse files Browse the repository at this point in the history
This argument make shortcuts work while monitoring
  • Loading branch information
radurentea committed Jan 16, 2025
1 parent 7db3782 commit f19645d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/espIdf/monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { ESP } from "../../config";
import { appendIdfAndToolsToPath, getUserShell } from "../../utils";
import { window, Terminal, Uri, env, debug } from "vscode";
import { join } from "path";

export interface MonitorConfig {
baudRate: string;
Expand Down Expand Up @@ -46,9 +47,10 @@ export class IDFMonitor {
IDFMonitor.config = config;
}


static async start() {
const modifiedEnv = await appendIdfAndToolsToPath(this.config.workspaceFolder);
const modifiedEnv = await appendIdfAndToolsToPath(
this.config.workspaceFolder
);
if (!IDFMonitor.terminal) {
IDFMonitor.terminal = window.createTerminal({
name: `ESP-IDF Monitor ${this.config.wsPort ? "(--ws enabled)" : ""}`,
Expand Down Expand Up @@ -97,6 +99,11 @@ export class IDFMonitor {
"--toolchain-prefix",
this.config.toolchainPrefix,
];
const idfPy = quotePath(join(modifiedEnv.IDF_PATH, "tools", "idf.py"));
const pythonBinPath = quotePath(this.config.pythonBinPath);
const flashCommand = pythonBinPath + " " + idfPy;
// Pass the command that will be used when monitor needs to run flash/app-flash targets
args.push("--make", quotePath(flashCommand));
if (
this.isDebugSessionActive() ||
(this.config.noReset && this.config.idfVersion >= "5.0")
Expand Down

0 comments on commit f19645d

Please sign in to comment.