Skip to content

Commit a4a2ceb

Browse files
committed
generate toolchain prefix for cortex-debug
1 parent 450ff20 commit a4a2ceb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/DebugConfigGenerator.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ class CortexDebugConfigProvider extends IDebugConfigProvider {
165165
// must use elf to debug
166166
debugConfig.executable = outDir + File.sep + prjConfig.name + '.elf';
167167

168+
const toolchain = prj.getToolchain();
169+
if (toolchain.getToolchainPrefix) {
170+
debugConfig.toolchainPrefix = toolchain.getToolchainPrefix().trim().replace(/-$/, '');
171+
} else if (debugConfig.toolchainPrefix) {
172+
debugConfig.toolchainPrefix = undefined;
173+
}
174+
168175
// setup svd file, if existed
169176
const device = prj.GetPackManager().getCurrentDevInfo();
170177
if (device && device.svdPath && debugConfig.svdFile == undefined) {

0 commit comments

Comments
 (0)