File tree 10 files changed +34
-5
lines changed
10 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ These settings are specific to the ESP32 Chip/Board.
114
114
- Forced to use ``/ `` instead of ``\\ `` as path separator for Win32 based OS
115
115
* - **idf.svdFilePath **
116
116
- SVD file absolute path to resolve chip debug peripheral tree view
117
+ * - **idf.jtagFlashCommandExtraArgs **
118
+ - OpenOCD JTAG flash extra arguments. Default is ["verify", "reset"].
117
119
118
120
This is how the extension uses them:
119
121
@@ -123,6 +125,7 @@ This is how the extension uses them:
123
125
4. **idf.port ** (or **idf.portWin ** in Windows) is used as the serial port value for the extension commands.
124
126
5. **idf.openOcdDebugLevel ** is the log level for OpenOCD server output from 0 to 4.
125
127
6. **idf.openOcdLaunchArgs ** is the launch arguments string array for OpenOCD. The resulting OpenOCD launch command looks like this: ``openocd -d${idf.openOcdDebugLevel} -f ${idf.openOcdConfigs} ${idf.openOcdLaunchArgs} ``.
128
+ 7. **idf.jtagFlashCommandExtraArgs ** is used for OpenOCD JTAG flash task. Please review `Upload application for debugging <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/index.html#upload-application-for-debugging> `.
126
129
127
130
.. note ::
128
131
Original file line number Diff line number Diff line change @@ -112,6 +112,8 @@ ESP-IDF 相关设置
112
112
- 强制在 Windows 操作系统中使用 ``/ `` 作为路径分隔符,而不是 ``\\ ``
113
113
* - **idf.svdFilePath **
114
114
- SVD 文件的绝对路径,用于解析芯片在调试器中的外设树视图
115
+ * - **idf.jtagFlashCommandExtraArgs **
116
+ - OpenOCD JTAG 闪存额外参数。默认值为 ["verify", "reset"]
115
117
116
118
扩展将按照以下方式使用上述设置:
117
119
@@ -121,6 +123,7 @@ ESP-IDF 相关设置
121
123
4. **idf.port ** (Windows 系统中为 **idf.portWin **)用作扩展命令的串口值。
122
124
5. **idf.openOcdDebugLevel ** 是 OpenOCD 服务器输出的日志级别,范围为 0 到 4。
123
125
6. **idf.openOcdLaunchArgs ** 是用于配置 OpenOCD 启动的参数字符串数组。生成的 OpenOCD 启动命令格式如下:``openocd -d${idf.openOcdDebugLevel} -f ${idf.openOcdConfigs} ${idf.openOcdLaunchArgs} ``。
126
+ 7. **idf.jtagFlashCommandExtraArgs ** 用于OpenCD JTAG闪存任务。请查看 `上传待调试的应用程序 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/jtag-debugging/index.html#jtag-upload-app-debug> `.
124
127
125
128
.. note ::
126
129
Original file line number Diff line number Diff line change 1200
1200
"productId" : " 0x6001"
1201
1201
}
1202
1202
}
1203
+ },
1204
+ "idf.jtagFlashCommandExtraArgs" : {
1205
+ "type" : " array" ,
1206
+ "description" : " %param.jtagFlashCommandExtraArgs.title%" ,
1207
+ "scope" : " resource" ,
1208
+ "default" : [
1209
+ " verify" ,
1210
+ " reset"
1211
+ ],
1212
+ "items" : {
1213
+ "type" : " string"
1214
+ }
1203
1215
}
1204
1216
}
1205
1217
}
Original file line number Diff line number Diff line change 126
126
"param.exportVars" : " Variables que se agregarán a las variables de entorno del sistema" ,
127
127
"param.flashBaudRate" : " Tasa de baudios de flasheo ESP-IDF" ,
128
128
"param.gitPath.title" : " Ruta del ejecutable de Git" ,
129
+ "param.jtagFlashCommandExtraArgs.title" : " Openocd JTAG Flash Argumentos adicionales" ,
129
130
"param.launchMonitorOnDebugSession.title" : " Iniciar Monitor IDF junto con la sesión de Adaptador de Depuración ESP-IDF" ,
130
131
"param.monitorBaudRate" : " Tasa de baudios de Monitor IDF ESP-IDF" ,
131
132
"param.monitorCustomTimestampFormat" : " Formato de marca de tiempo personalizado en Monitor IDF" ,
Original file line number Diff line number Diff line change 126
126
"param.exportVars" : " Variables to be added to system environment variables" ,
127
127
"param.flashBaudRate" : " ESP-IDF flash baud rate" ,
128
128
"param.gitPath.title" : " Git executable path" ,
129
+ "param.jtagFlashCommandExtraArgs.title" : " OpenOCD JTAG flash extra arguments" ,
129
130
"param.launchMonitorOnDebugSession.title" : " Start IDF monitor along with ESP-IDF Debug Adapter session" ,
130
131
"param.monitorBaudRate" : " ESP-IDF monitor baud rate" ,
131
132
"param.monitorCustomTimestampFormat" : " Custom timestamp format in IDF monitor" ,
Original file line number Diff line number Diff line change 126
126
"param.exportVars" : " Variáveis a serem adicionadas às variáveis de ambiente do sistema" ,
127
127
"param.flashBaudRate" : " Taxa de transmissão de flash ESP-IDF" ,
128
128
"param.gitPath.title" : " Caminho executável do Git" ,
129
+ "param.jtagFlashCommandExtraArgs.title" : " Argumentos extras do Openocd JTAG Flash" ,
129
130
"param.launchMonitorOnDebugSession.title" : " Inicie o IDF Monitor junto com a sessão do adaptador de depuração ESP-IDF" ,
130
131
"param.monitorBaudRate" : " Taxa de transmissão do monitor ESP-IDF" ,
131
132
"param.monitorCustomTimestampFormat" : " Formato de carimbo de data/hora personalizado no IDF Monitor" ,
Original file line number Diff line number Diff line change 125
125
"param.espRainmakerPath" : " Путь до фреймворка ESP-Rainmaker (RMAKER_PATH)" ,
126
126
"param.exportVars" : " Переменные, добавляемые к переменным системного окружения" ,
127
127
"param.flashBaudRate" : " Скорость прошивки ESP-IDF" ,
128
+ "param.jtagFlashCommandExtraArgs.title" : " Openocd jtag flash дополнительные аргументы" ,
128
129
"param.gitPath.title" : " Путь к исполняемому файлу Git" ,
129
130
"param.launchMonitorOnDebugSession.title" : " Запуск монитора IDF вместе с сессией Адаптера Отладки ESP-IDF" ,
130
131
"param.monitorBaudRate" : " Скорость передачи данных монитора ESP-IDF" ,
Original file line number Diff line number Diff line change 126
126
"param.exportVars" : " 要添加到系统环境变量中的变量" ,
127
127
"param.flashBaudRate" : " ESP-IDF 烧录速率" ,
128
128
"param.gitPath.title" : " Git 可执行文件的路径" ,
129
+ "param.jtagFlashCommandExtraArgs.title" : " openocd jtag flash额外参数" ,
129
130
"param.launchMonitorOnDebugSession.title" : " 在 ESP-IDF 调试适配器会话中启动 IDF 监视器" ,
130
131
"param.monitorBaudRate" : " ESP-IDF 监视器的波特率值" ,
131
132
"param.monitorCustomTimestampFormat" : " 在 IDF 监视器中自定义时间戳格式" ,
Original file line number Diff line number Diff line change 2
2
* Project: ESP-IDF VSCode Extension
3
3
* File Created: Tuesday, 29th September 2020 11:05:15 pm
4
4
* Copyright 2020 Espressif Systems (Shanghai) CO LTD
5
- *
5
+ *
6
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
7
* you may not use this file except in compliance with the License.
8
8
* You may obtain a copy of the License at
9
- *
9
+ *
10
10
* http://www.apache.org/licenses/LICENSE-2.0
11
- *
11
+ *
12
12
* Unless required by applicable law or agreed to in writing, software
13
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,6 +31,9 @@ export class JTAGFlash {
31
31
. toString ( )
32
32
. replace ( TCLClient . DELIMITER , "" )
33
33
. trim ( ) ;
34
+ if ( response === "" && args . some ( ( arg ) => arg . includes ( "exit" ) ) ) {
35
+ resolve ( response ) ;
36
+ }
34
37
if ( response !== "0" ) {
35
38
return reject (
36
39
`Failed to flash the device (JTag), please try again [got response: '${ response } ', expecting: '0']`
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ export async function jtagFlashCommand(workspace: Uri) {
59
59
workspace
60
60
) ;
61
61
let buildPath = readParameter ( "idf.buildPath" , workspace ) as string ;
62
+ let openOCDJTagFlashArguments = readParameter (
63
+ "idf.jtagFlashCommandExtraArgs" ,
64
+ workspace
65
+ ) as string [ ] ;
62
66
const customTask = new CustomTask ( workspace ) ;
63
67
if ( forceUNIXPathSeparator === true ) {
64
68
buildPath = buildPath . replace ( / \\ / g, "/" ) ;
@@ -70,8 +74,7 @@ export async function jtagFlashCommand(workspace: Uri) {
70
74
"program_esp_bins" ,
71
75
buildPath ,
72
76
"flasher_args.json" ,
73
- "verify" ,
74
- "reset"
77
+ ...openOCDJTagFlashArguments
75
78
) ;
76
79
await customTask . addCustomTask ( CustomTaskType . PostFlash ) ;
77
80
await customTask . runTasks ( CustomTaskType . PostFlash ) ;
You can’t perform that action at this time.
0 commit comments