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 Adding 3rd party hardware (Read 3738 times)
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Adding 3rd party hardware
Aug 24th, 2018 at 8:05pm
Print Post  
Similar issue to AustinLindquist on his post.

Following the guidance provided on VisualMicro.com website for adding GDB 3rd party support, I have been attempting to create a GDB configuration for a Segger J-Link and an Arduino MKR1000.  While I have successfully integrated the J-Link\MKR1000 with OpenOCD, I have not been able to get Microsoft GDB Debugger to appear with any “custom” board.txt, boards.txt or platforms.txt configuration change.  So far the only way I have got the Microsoft GDB Debugger to appear is by selecting Arduino/Genuino Zero (Programming Port).  

Created a new board script (mkr1000-jlink.cfg) for OpenOCD at C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\MH2UHNSB.YKA\Micro Platforms\default\tools\openocd-0.9.0\scripts\board.

Create a new boards.txt section (section separated as boards.mkr1000-jlink.append.txt)

Appended the following to the platforms.txt file.
# Platform external debugging
# --------------------
debug.tool=gdb
tools.gdb.pre_init.tool=openocd
tools.gdb.cmd=bin/arm-none-eabi-gdb
tools.gdb.cmd.windows=bin/arm-none-eabi-gdb.exe
tools.gdb.path= C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Linux\gcc_arm\bin 
tools.gdb.pattern="{path}/{cmd}" -interpreter=mi -d {build.project_path}

tools.gdb.tcp=localhost:3333
tools.gdb.openocd.cmd=bin/openocd.exe
.0
tools.gdb.openocd.params.verbose=-d2
tools.gdb.openocd.params.quiet=-d0
tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/{build.openocdscript}"

#-f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset 0x00002000; shutdown"

Does not appear to turn on the Microsoft GDB Debugger tool.
1.      3rd party hardware GDB guide - . https://www.visualmicro.com/post/2016/01/17/3rd-Party-Hardware-GDB-Configuration...;

So I have tried…
2.      Option 1 (boards.txt) from link above
3.      Option 2 (platform.txt) from link above 
4.      Adding board.txt to project (as described in link above).

None of these 3 approaches, as attempted, turn on the Microsoft GDB Debugger under vMicro > Debugger. If the Microsoft GDB Debugger is not “turned on”, how can one attempt to create a configuration for GDB debugging?

VM Team your support on this would be very much appreciated.
Greg
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding 3rd party hardware
Reply #1 - Aug 25th, 2018 at 11:55am
Print Post  
You can define an entire board in project\boards.txt you can only define extra properties or overrides.

The link you posted relates to GDB and does not relate to adding a new board to arduino.

You can follow the arduino guides to add new boards and platforms

Visual Micro does provide extra places to put boards.txt and platform.txt files but to start with just add them to whichever core you are working with.

For example if you are using the default AVR core that comes with arduino ide then add your board to the boards,txt files that is in arduinoide\hardware\arduino\avr. Same with platform.txt

Then click reload toolchains or restart the ide

  
Back to top
WWW  
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding 3rd party hardware
Reply #2 - Aug 25th, 2018 at 12:09pm
Print Post  
I don't understand the first line of your last post. Are you saying the the local project "board.txt" can only override an existing element from a more global platform.txt or boards.txt file?

My goal is to only target the MKR1000 for now.  To get a choice of target on the Visual Studio drop-down, I duplicated the MKR1000 section from the boards.txt file to a new board name of mkr1000_jlink.name=Arduino/Genuino MKR1000 (J-Link).
This "boards.txt" is located in my C:\Users\GT\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.19 folder.

There are two installs of OpenOCD and numerous platform.txt I am likely not updating the correct file.

The only reason I was creating a new board was to add GDB functionality without breaking the original MKR1000 definition in boards.txt

Thanks,
Greg
« Last Edit: Aug 25th, 2018 at 12:15pm by Greg Terrell »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding 3rd party hardware
Reply #3 - Aug 25th, 2018 at 12:45pm
Print Post  
That's right local project board file just overrides properties of an existing board.

There are places to put files with additional boards.txt and platform.txt but you can just use the ones in the samd\1.6.19 folder for now.
  
Back to top
WWW  
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding 3rd party hardware
Reply #4 - Aug 25th, 2018 at 1:36pm
Print Post  
Thanks Tim.  Your thoughts on why "Microsoft GDB Debugger" is not appearing on the vMicro>>Debugger menu?

From platform.txt (at bottom of file, if that matters)

# Platform external debugging
# --------------------
debug.tool=gdb
tools.gdb.pre_init.tool=openocd
tools.gdb.cmd=bin/arm-none-eabi-gdb
tools.gdb.cmd.windows=bin/arm-none-eabi-gdb.exe
tools.gdb.path= C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Linux\gcc_arm\bin 
tools.gdb.pattern="{path}/{cmd}" -interpreter=mi -d {build.project_path}

tools.gdb.tcp=localhost:3333
tools.gdb.openocd.cmd=bin/openocd.exe
.0
tools.gdb.openocd.params.verbose=-d2
tools.gdb.openocd.params.quiet=-d0
tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/{build.openocdscript}"

#-f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset 0x00002000; shutdown"


  
Back to top
 
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding 3rd party hardware
Reply #5 - Aug 25th, 2018 at 4:02pm
Print Post  
After some folder cleanup, I have the vMicro>>Uploader, both "Burn Bootloader" and "Upload Last Build" working successfully via the J-Link\SWD port.

Steps taken...
  • Created {scripts}\interfaces\jlink.cfg
  • Created {scripts}\boards\mkr1000-jlink.cfg
  • -where {scripts} is 6-static\share\openocd\scripts 
  • Created mkr1000_jlink.cfg in ts\mkr1000_jlink\openocd_scripts
  • - by copying arduino_zero.cfg from ..\variants\arduino_zero and changing line 21 to source [find interface/jlink.cfg]


progress, but still no "Microsoft GDB Debugger" option and VM is trying to use the software debugger.
  
Back to top
 
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding 3rd party hardware
Reply #6 - Aug 27th, 2018 at 2:05pm
Print Post  
Is the vMicro>>Microsoft GDB Debugger option hard-coded to certain platform\board configurations, such as the Arduino Zero (Programming Port)?

If not, what is the underlying trigger to enable that option on the menu?  Simply adding "debug.tool=gdb" to the platform.txt file is insufficient, at least in certain circumstances. 

I know I am being persistent here,  but getting GDB debugging operational is essential for our current project. Although I have a VM professional license, if necessary, I would consider paying for support on this. 

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


Posts: 2145
Joined: Feb 13th, 2019
Re: Adding 3rd party hardware
Reply #7 - Aug 21st, 2019 at 10:47am
Print Post  
vMicro now supports a range of additional hardware debuggers out of the box - including the J-Link for the SAMD platform as needed here.

SAMD Debugging: https://www.visualmicro.com/page/SAMD-Debugging.aspx

Debugger List: https://www.visualmicro.com/page/DebuggerSupportList.aspx
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint