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 Send TopicPrint
Normal Topic Unable to start (hardware) debugging. Launch options string empty. (Read 953 times)
RetiredEngineer
Newbies
*
Offline


Posts: 1
Joined: Nov 29th, 2019
Unable to start (hardware) debugging. Launch options string empty.
Mar 1st, 2021 at 8:57pm
Print Post  
I have:
Windows 7 64bit
Adafruit Feather nRF52840 Express
Visual Studio 2019 community edition
Visual Micro v1.2021.0106
Segger J-Link Pro
Zatag USB driver for Interface 0 = v6.1.7600.16385
GDB enable = TRUE
Uploader-Hardware Programmer = J-Link for Bluefruit nRF52
Debugger-Hardware Debugger = Manual/Custom NOTE: no other options available
OpenOCD Location = BLANK   NOTE: this seems odd

VisualMicro using Hardware Programmer selected, works. Target is erased/programmed.
VisualMicro serial debug, works. Breakpoints function, default millis() monitoring does update

VisualMicro using Hardware Debugger does NOT work. No selection for J-Link hardware debugger. 

I followed this: https://www.visualmicro.com/page/Troubleshooting-Debugging.aspx and extracted the OpenOCD files to the specified directory.

I tried updating 'boards.txt' as described in this forum post: 
"Unable to start debugging with Adafruit M4 Airlift and Segger Jlink"

but nothing works.

Since the J-Link hardware debugger is recognized as the Uploader/programmer and functions correctly, I suspect the issue is the OpenOCD Location being blank? I thought I could add the path to the OpenOCD files extracted in the earlier steps but the OpenOCD Location doesn't allow changes.

Any suggestions?






  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2144
Joined: Feb 13th, 2019
Re: Unable to start (hardware) debugging. Launch options string empty.
Reply #1 - Mar 2nd, 2021 at 2:31pm
Print Post  
Thanks for the report.

Uploader:
This is configured as part of the board package, and we have not added any vMicro specific upload tools to this package at present.

Hardware Debugger:
We have not configured the defaults for this debugger at present, which is why only "Manual/Custom" is available.  To use this option the launch JSON needs to be added to the project and configured, as shown on the below page.
https://www.visualmicro.com/page/Debugging-Using-Custom-Hardware.aspx

We will look into getting this package set up, and we will update when we have a launch JSON to try in the interim.

OpenOCD Files:
If the debugger was configured to use these tools it would have automatically done this when running the debugger. 

Board.txt Entries:
These are overrides to the pre-configured debugger, and as there are no pre-configured debuggers for this board, they alone wont work.


Thanks for confirming the detail on what you have tried.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2144
Joined: Feb 13th, 2019
Re: Unable to start (hardware) debugging. Launch options string empty.
Reply #2 - Mar 2nd, 2021 at 3:06pm
Print Post  
If you add the Custom Launch Debugger (vMicro > Add Code > Add Custom GDB Debugger (Advanced) )
And replace the contents with the below:
Code
Select All
{
  // Adafruit NRF52x Hardware Debug + JLink
  "serverLaunchTimeout": 5000,
  "filterStdout": false,
  "filterStderr": true,
  "targetArchitecture": "arm",
  "stopAtEntry": false,
  "externalConsole": false,
  "MIMode": "gdb",
  "MIDebuggerServerAddress": "$(miDebuggerServerAddress)",
  "cwd": "$(buildPath)",
  "MIDebuggerPath": e-eabi-gcc\\9-2019q4\\bin\\arm-none-eabi-gdb.exe",
  "MIDebuggerArgs": "$(miDebuggerArgs)",
  "debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.1\\bin/openocd.exe",
  "debugServerArgs": "-d2 -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.1/share/openocd/scripts/\" -f \"board/nordic_nrf52_dk.cfg\" -c \"init; reset halt\"",
  "setupCommands": [],
  "program": "$(program)",
  "logging": {
    "moduleLoad": false,
    "trace": false,
    "engineLogging": false,
    "programOutput": false,
    "exceptions": false,
    "traceResponse": false
  }
}
 



Then ensure that the MIDebuggerPath has the user name changed, and if required the rest of the path
(This can be verified with vMicro > Compiler > Show Build Properties Enabled, then perform a build, and search the output for "runtime.tools.arm-none-eabi-gcc.path=")

Once this is saved the debugger should have the tools configured for this NRF52 package and the JLink probe, so try attaching or starting the debugging process....

Let us know if you get any errors when attaching in the Output > Debug Window (or pop ups).
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint