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
Hot Topic (More than 8 Replies) Adding custom board support (Read 8097 times)
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Adding custom board support
Jul 31st, 2018 at 11:25pm
Print Post  
I'm trying to follow the tutorial here but have some questions
https://www.visualmicro.com/post/2016/01/17/3rd-Party-Hardware-GDB-Configuration...

I modified my boards.txt and platform.txt for my board package. On compiling I get this error:
Quote:
dsfafdsaafdsafsd.ino: In function void setup()
   void setup()
dsfafdsaafdsafsd.ino:8: note  candidates are
Error compiling project sources
 
   Debug Build Error: This hardware might not support the default Visual Micro Debugger.
     If this project is using OTA/WiFi upload then please use the vMicro>Debugger menu to set the Serial COM and Remote port for the debugger.
     Otherwise switch the toolbar from 'Debug' to 'Release' and build again. 
           or switch off Automatic Debugging
           or configure the SoftwareSerial debugger option.
Debug build failed for project 'dsfafdsaafdsafsd'
dsfafdsaafdsafsd.ino:8: In file included from
   void begin(Serial_ *theSerial)
   void begin(Serial_ *theSerial, unsigned long baud)


This is a new project with empty setup() and loop() functions.
« Last Edit: Aug 1st, 2018 at 12:11am by AustinLindquist »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding custom board support
Reply #1 - Aug 1st, 2018 at 3:15pm
Print Post  
Gdb is in beta/preview so might be hard work for most. If you have installed and configured then you should have a "vmicro>debugger>use gdb" which will cause the "Automatic Debugger" to be disabled. 

The errors you see are the standard visual micro serial debugger attempting to load which is not what you want.
  
Back to top
WWW  
IP Logged
 
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Re: Adding custom board support
Reply #2 - Aug 1st, 2018 at 7:33pm
Print Post  
I have the GDB extension installed as well as the android tools. I don't have "Use GDB" as a menu option, what should I check?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding custom board support
Reply #3 - Aug 3rd, 2018 at 7:25pm
Print Post  
Sorry the menu item is "vMicro>Debugger>Microsoft GDB Debugger"

If you switch the board to "Arduino Zero (Native)" does the menu item appear?
  
Back to top
WWW  
IP Logged
 
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Re: Adding custom board support
Reply #4 - Aug 14th, 2018 at 7:50pm
Print Post  
It appears for the (Programming Port) variant.

My config file is located in: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\mh2uhnsb.yka\Micro Platforms\default\tools\openocd-0.9.0\scripts\board

My gdb client is located in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\mh2uhnsb.yka\Micro Platforms\default\tools\arm-none-eabi-gcc\4.8.3-2014q1\bin

fx450_gdb.cfg:
Code
Select All
source [find interface/cmsis-dap.cfg]
set CHIPNAME at91samd21g18
set ENDIAN little
source [find target/at91samdXX.cfg]
 



boards.txt:
Code
Select All
ae_fx450_gdb.name=FX450 (GDB)
ae_fx450_gdb.vid.0=0x239A
ae_fx450_gdb.pid.0=0x800B
ae_fx450_gdb.vid.1=0x239C
ae_fx450_gdb.pid.1=0x000D
ae_fx450_gdb.upload.tool=openocd
ae_fx450_gdb.upload.protocol=sam-ba
ae_fx450_gdb.upload.maximum_size=262144
ae_fx450_gdb.upload.use_1200bps_touch=true
ae_fx450_gdb.upload.wait_for_upload_port=true
ae_fx450_gdb.upload.native_usb=true
ae_fx450_gdb.build.mcu=cortex-m0plus
ae_fx450_gdb.build.f_cpu=48000000L
ae_fx450_gdb.build.usb_product="FX450"
ae_fx450_gdb.build.board=FX450
ae_fx450_gdb.build.core=fx450
ae_fx450_gdb.build.extra_flags=-DARDUINO_SAMD_ZERO -D__SAMD21G18A__ -mthumb {build.usb_flags}
ae_fx450_gdb.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
ae_fx450_gdb.build.openocdscript=board/fx450_gdb.cfg
ae_fx450_gdb.build.variant=fx450
ae_fx450_gdb.build.variant_system_lib=
ae_fx450_gdb.build.vid=0x239E
ae_fx450_gdb.build.pid=0x800E
ae_fx450_gdb.bootloader.tool=openocd
ae_fx450_gdb.bootloader.file=fx450/samd21_sam_ba.bin 



platforms.txt:
Code
Select All
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
.8.3-2014q1
tools.gdb.pattern="{path}/{cmd}" ­interpreter=mi ­d "{build.project_path}"
tools.gdb.openocd.cmd=bin/openocd.exe
tools.gdb.tcp=localhost:3333
9.0
tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/{build.openocdscript}"
tools.gdb.openocd.params.verbose=­d2
tools.gdb.openocd.params.quiet=­d0

tools.gdb.tcp=localhost:3333
9.0
tools.gdb.openocd.params.verbose=­d2
tools.gdb.openocd.params.quiet=­d0 

« Last Edit: Aug 15th, 2018 at 10:06pm by AustinLindquist »  
Back to top
 
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding custom board support
Reply #5 - Aug 16th, 2018 at 7:51pm
Print Post  
Tim@Visual Micro wrote on Aug 3rd, 2018 at 7:25pm:
Sorry the menu item is "vMicro>Debugger>Microsoft GDB Debugger"

If you switch the board to "Arduino Zero (Native)" does the menu item appear?


Tim, where in the configuration path does the above setting trigger Microsoft GDB Debugger to turn on (enable)?

I am working on enabling GDB via a Segger J-LINK for a MKR1000 (initially), step 2 is an Adafruit M0.  So far I have cloned the MKR1000 section from boards.txt (board code "mkr1000_jlink" for new config section Arduino/Genuino MKR1000 (w/ J-Link)).  But as you suggest, the Microsoft GDB Debugger only appears when the target board is Arduino/Genuino Zero (Programming Port).

I see our steps as...
  • Enable Microsoft GDB Debugger with our new boards.txt section
  • Connect to Segger via OpenOCD (learned how yesterday)
  • Retarget the Segger GDB server (instead of OpenOCD, for additional logging features)
  • Test, fix, test, fix, etc.


But the critical 1st step is identifying where in the config structures the Microsoft GDB Debugger is enabled.
« Last Edit: Aug 17th, 2018 at 12:32pm by Greg Terrell »  
Back to top
 
IP Logged
 
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Re: Adding custom board support
Reply #6 - Sep 6th, 2018 at 9:12pm
Print Post  
Bump!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding custom board support
Reply #7 - Sep 7th, 2018 at 10:35am
Print Post  
Sorry I have been busy. Will try to look at this asap. Gdb always takes a lot of time to look at so it can't be priority right now
  
Back to top
WWW  
IP Logged
 
Greg Terrell
Junior Member
**
Offline


Posts: 23
Joined: Oct 3rd, 2016
Re: Adding custom board support
Reply #8 - Sep 13th, 2018 at 2:54pm
Print Post  
Tim, is GDB a lower priority or unsupported?   

I understand, as a small organization, support resources being stretched and responses will not be immediate.  But I am seeing threads just end abruptly on this topic and in another thread your statement... 

Tim@Visual Micro wrote on Sep 8th, 2018 at 11:12am:
Hi,

There has been a lot of changes in the IDE's in relation to GDB. It will be re-done over the coming months.

In the meantime I am sorry that there is no support time available to help people with GDB .

I suggest looking for an alternative or use the serial debugger

Thanks



The VM software-based debugging is not cutting it for our needs as we support our customers using our libraries. We have invested quite a few hours over the last several weeks getting openOCD functional with our Segger hardware and the target boards. We have used the VM burn bootloader functionality (via the J-Link) and the last hurdle is simply why VM won't recognize the settings as spelled out in your documentation to enable vMicro>>Debugging>>Microsoft GDB Debugger.

#board.txt or platform.txt
debug.tool=gdb


If there is no support for GDB with Visual Micro, I regrettably will have to migrate off of Visual Micro to another toolset, most likely Platform IO. Given that we have been using VM for two years and built processes around Visual Micro this is not something I am looking forward to but I can't wait months.

Sorry to be so direct, 
Greg
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding custom board support
Reply #9 - Nov 17th, 2018 at 5:02pm
Print Post  
Hi,

Sorry for the delay, i missed this post for some reason. Library debug is available in the next release but GDB has been a lower priority.

GDB is difficult to implement as a common solution in older visual studio versions which we still support (such as vs2012 and 2013).

It has been announced over the past few months that support for the older ide versions will end then we will re-look at supporting GDB.

It's being considered to support PlatformIO in addition to Arduino in the future so it makes sense to go whatever way works best for you.
« Last Edit: Nov 17th, 2018 at 5:03pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Re: Adding custom board support
Reply #10 - Jan 10th, 2019 at 5:34pm
Print Post  
Any news on this?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Adding custom board support
Reply #11 - Jan 11th, 2019 at 5:29pm
Print Post  
There is some news. Visual Studio 2019 SP2 will break compatibility with VS2012 and VS2013. This forces us to either drop support for the older IDE's or create a 2nd slightly different version of Visual Micro to cater for both IDE types.

It has been VS2012 and VS2013 that has held back the ability for Visual Micro to integrate a simple and tightly integrated GDB solution.

Therefore, time allowing, over the next few months we should see some leaps in Visual Micro.

  
Back to top
WWW  
IP Logged
 
AustinLindquist
Junior Member
**
Offline


Posts: 14
Joined: Jul 31st, 2018
Re: Adding custom board support
Reply #12 - Feb 1st, 2019 at 12:11am
Print Post  
Tim@Visual Micro wrote on Jan 11th, 2019 at 5:29pm:
There is some news. Visual Studio 2019 SP2 will break compatibility with VS2012 and VS2013. This forces us to either drop support for the older IDE's or create a 2nd slightly different version of Visual Micro to cater for both IDE types.

It has been VS2012 and VS2013 that has held back the ability for Visual Micro to integrate a simple and tightly integrated GDB solution.

Therefore, time allowing, over the next few months we should see some leaps in Visual Micro.


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


Posts: 2142
Joined: Feb 13th, 2019
Re: Adding custom board support
Reply #13 - Aug 21st, 2019 at 10:47am
Print Post  
vMicro now supports a range of additional hardware debuggers out of the box, including the SAMD boards required 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