Hi simon,
I spend my day and figure out how the command line should look like to initiate openocd. (see below cmd line:)
I changed the "Debugserverargs": in the json file but it seems that this don`t have impact on the output (see below mi debugger properties)
Do you have a clue what I could do next?
Best regrads
Chris
P.S. I changed the caps to make it possible to post the code because of the forum rule whiche restrict ALL CAPS.
Error: unable to start degugging. Unable to establish a connection to gdb. Debug output may contain more information
Output from micro build:
# mi debugger properties
{
"Serverlaunchtimeout": 5000,
"Filterstdout": false,
"Filterstderr": true,
"Targetarchitecture": "Arm",
"Stopatentry": false,
"Externalconsole": false,
"Mimode": "Gdb",
"Midebuggerserveraddress": "Localhost:3333",
"Cwd": hicudriverlocal\\debug",
"Midebuggerpath": arm-none-eabi-gcc\\9.2.1-1.1/bin\\arm-none-eabi-gdb.Exe",
"Midebuggerargs": "",
"Debugserverpath": "C:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.Exe",
"Debugserverargs": "-d2 -l 2_hicudriverlocal\\debug/hicudriver_san_v5.Ino_debugopenocd.Log}\" -s \"C:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"Interface/stlink.Cfg\" -f \"Stm32f0x.Cfg\" -c \"Init\"",
"Setupcommands": [],
"Program": erlocal/debug/hicudriver_san_v5.Ino.Elf",
"Logging": {
"Moduleload": false,
"Trace": false,
"Enginelogging": false,
"Programoutput": false,
"Exceptions": false,
"Traceresponse": false
},
"Visualizerfile": hicudriverlocal\\debug\\debugger_tmp.Natvis",
"Showdisplaystring": true
}
Debugger_launch.Json:
{
// gdb project: "$(projectname)"
// microsoft mi: https://github.Com/microsoft/vscode-cpptools/blob/master/launch.Md#customlaunchsetupcommands
// visualizations: https://docs.Microsoft.Com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?View=vs-2019
// user guide: https://www.Visualmicro.Com/page/user-guide.Aspx?Doc=arduino-gdb-tutorial.Html
// tips: to access resolved arduino 3rd party hardware spec. Properties, use $(variables) with the same name as the mi json prpperties
// to access visual studio macros and environment variables or hard code
// this file is for advanced use. Please use the pre-configured built-in hardware debuggers where possible.
//
"Serverlaunchtimeout": 5000,
"Filterstdout": false,
"Filterstderr": true,
"Targetarchitecture": "Arm",
"Stopatentry": false,
"Externalconsole": false,
"Mimode": "Gdb",
//"Environment": [],
//"Customlaunchsetupcommands": [],
"Midebuggerserveraddress": "$(midebuggerserveraddress)",
"Cwd": "$(buildpath)",
"Midebuggerpath": "$(midebuggerpath)",
"Midebuggerargs": "\"-d3 -s c:\\programdata\\vmicro\\tools\\openocd-0.10.0.20200213\\scripts -f /interface/stlink.Cfg -c \"Transport",
"Select" "Hla_swd\" -c \"Set",
"Workareasize" "0x1fff\" -c \"Set",
"Chipname" "Stm32f103c8tx\" -c \"Set",
"Flash_size" "0xff00\" -c \"Set",
"Enable_low_power" 1,
" -c " "Set",
"Stop_watchdog" 1,
" -c " "Set",
"Clock_freq" 480,
"-f -c " "Set",
"Connect_under_reset" 1,
" -f /target/stm32f0x.Cfg ",,
"Debugserverpath": "$(debugserverpath)",
"Debugserverargs": "$(debugserverargs)",
"Setupcommands": [],
"Program": "$(program)",
"Logging": {
"Moduleload": false,
"Trace": false,
"Enginelogging": false,
"Programoutput": false,
"Exceptions": false,
"Traceresponse": false
}
}
Cmd line:
Openocd -d3 -s c:\programdata\vmicro\tools\openocd-0.10.0.20200213\scripts -f /interface/stlink.Cfg -c "Transport select hla_swd" -c "Set workareasize 0x1fff" -c "Set chipname stm32f103c8tx" -c "Set flash_size 0xff00" -c "Set enable_low_power 1" -c "Set stop_watchdog 1" -c "Set clock_freq 480"-f -c "Set connect_under_reset 1" -f /target/stm32f0x.Cfg