Hello,
I am using Visual Micro with Nordic's nRF boards, using the Arduino core at
https://github.com/sandeepmistry/arduino-nRF5.
It works great! I just had to append a few lines at the bottom of the platform.txt (see below), and now I can enjoy all the convenience of VS/VM to easily program and debug those chips.
There is only one glitch: when starting a debugging session in VM, a window pops up telling me that there were some build errors, even though there are no such warnings when I directly upload the same code. I have to choose to "continue using the last successful build" in order to debug, then it all goes smoothly.
It seems similar to a problem I faced when debugging some ATSAMD21G18 with the Atmel ICE when selecting the Arduino Zero (Programming Port) as device. Looks like a Visual Studio / Visual Micro mismatch, error messages below. At the end of the day, it works, but it would be even better without those messages. Help or input welcome.
Thanks,
Armel
-------- error messages:
Error MSB4018 The "VCMessage" task failed unexpectedly.
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at Microsoft.Build.Shared.ResourceUtilities.FormatString(String unformatted, Object[] args)
at Microsoft.Build.Utilities.TaskLoggingHelper.FormatString(String unformatted, Object[] args)
at Microsoft.Build.Utilities.TaskLoggingHelper.FormatResourceString(String resourceName, Object[] args)
at messageResourceName, Object[] messageArgs)
at Microsoft.Build.CPPTasks.VCMessage.Execute()
at Host.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Blink_nRF52DK C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets 57 Build
-------- lines added in the platform.txt of the nRF5 core:
debug.tool=gdb
tools.gdb.pre_init.tool=openocd
tools.gdb.cmd=arm-none-eabi-gdb.exe
tools.gdb.path={runtime.tools.arm-none-eabi-gcc.path}/bin
tools.gdb.pattern="{path}/{cmd}" -interpreter=mi -d "{build.project_path}"
tools.gdb.openocd.cmd=bin/openocd.exe
tools.gdb.openocd.path={runtime.tools.openocd-0.10.0-dev.nrf5.path}
tools.gdb.openocd.params.verbose=-d2
tools.gdb.openocd.params.quiet=-d0
tools.gdb.openocd.intf={upload.interface}
tools.gdb.openocd.stp={upload.setup_command}
tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/interface/{intf}.cfg" -c "{stp}" -f "{path}/scripts/target/{upload.target}.cfg"