Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new destination file path for each cpu core #801

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/espIdf/openOcd/boardConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const defaultBoards = [
} as IdfBoard,
{
name: "ESP32-S3 chip (via builtin USB-JTAG)",
description: "ESP32-S3 used with ESP-PROG board",
description: "ESP32-S3 debugging via builtin USB-JTAG",
target: "esp32s3",
configFiles: ["board/esp32s3-builtin.cfg"],
} as IdfBoard,
Expand Down
17 changes: 12 additions & 5 deletions src/espIdf/tracing/gdbHeapTraceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,20 @@ export class GdbHeapTraceManager {
if (isOpenOcdLaunched) {
this.showStopButton();
ensureDir(join(workspace.fsPath, "trace"));
const fileName = `file://${join(workspace.fsPath, "trace").replace(
/\\/g,
"/"
)}/htrace_${new Date().getTime()}.svdat`;
await this.createGdbinitFile(fileName, workspace.fsPath);
const modifiedEnv = appendIdfAndToolsToPath(workspace);
const idfTarget = modifiedEnv.IDF_TARGET || "esp32";
let cpuCores = 1;
if (idfTarget === 'esp32' || idfTarget === 'esp32s3') {
cpuCores = 2;
}
let traceFilePath = '';
for(let i=1; i<=cpuCores; i++) {
traceFilePath +=`file://${join(workspace.fsPath, "trace").replace(
/\\/g,
"/"
)}/htrace_${new Date().getTime()}.cpu${i-1}.svdat `;
}
await this.createGdbinitFile(traceFilePath, workspace.fsPath);
const gdbTool = getToolchainToolName(idfTarget, "gdb");
const isGdbToolInPath = await isBinInPath(
gdbTool,
Expand Down