Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Can I debug nrf51822 through STLink ? (Read 6485 times)
entretoize1
Junior Member
**
Offline


Posts: 20
Joined: Dec 4th, 2020
Re: Can I debug nrf51822 through STLink ?
Reply #20 - Dec 11th, 2020 at 8:11am
Print Post  
We are going forward, I have a new error:

Code
Select All
Unable to start debugging. Unable to establish a connection to GDB. 



Output is:
Code
Select All
# MI Debugger Properties
** Resetting Target **
{
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "localhost:3333",
  "cwd": _BLE400\\Debug",
  "MIDebuggerPath": -arm-none-eabi\\5_2-2015q4/bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
  "debugServerArgs": "-d2 -l re_BLE400\\Debug/Blink.ino_DebugOpenOCD.log}\" -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -c \"transport select swd;\" -f \"target/nrf51.cfg\" -c \"init; reset halt\"",
  "program": Debug/Blink.ino.elf",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  },
  "visualizerFile": _BLE400\\Debug\\debugger_tmp.natvis",
  "showDisplayString": true
}
shutdown command invoked
 

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Can I debug nrf51822 through STLink ?
Reply #21 - Dec 11th, 2020 at 12:09pm
Print Post  
Thanks for the detail.

Can you attach the below log file, in case this reveals anything at the OpenOCD Layer:
Code
Select All
ebug/Blink.ino_DebugOpenOCD.log 

  
Back to top
 
IP Logged
 
entretoize1
Junior Member
**
Offline


Posts: 20
Joined: Dec 4th, 2020
Re: Can I debug nrf51822 through STLink ?
Reply #22 - Dec 11th, 2020 at 3:10pm
Print Post  
It contains only that :
Code
Select All
Error: Debug adapter doesn't support 'swd' transport 

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Can I debug nrf51822 through STLink ?
Reply #23 - Dec 12th, 2020 at 11:36am
Print Post  
We will release a fix with the below present soon, I had confused my SWD and HLA_SWD's

If you add the below entry to the Local Board.txt in the project it will resolve this before the release is available:
Code
Select All
tools.stlinkv2.server.boardCmd=-f "interface/stlink.cfg" -c "transport select hla_swd;" 


  
Back to top
 
IP Logged
 
entretoize1
Junior Member
**
Offline


Posts: 20
Joined: Dec 4th, 2020
Re: Can I debug nrf51822 through STLink ?
Reply #24 - Dec 13th, 2020 at 3:46pm
Print Post  
You did it ! 
Thank you for you're help, it works now. Cheesy
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Can I debug nrf51822 through STLink ?
Reply #25 - Dec 14th, 2020 at 12:59pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Can I debug nrf51822 through STLink ?
Reply #26 - Dec 14th, 2020 at 4:11pm
Print Post  
Thanks for the confirmation and working through this with us.

The latest release on the board below (20.09.10.23), now has all of these fixes applied so the overrides from board.txt should no longer be needed once updated:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
entretoize1
Junior Member
**
Offline


Posts: 20
Joined: Dec 4th, 2020
Re: Can I debug nrf51822 through STLink ?
Reply #27 - Dec 15th, 2020 at 7:21am
Print Post  
Yes the new release works, thanks again.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint