Hi Tim!
Can you please help with this?
Eventually I found a workaround for the problem but I would like to know if there is a solution so everything work as it was intended.
The setup is like this:
Visual Studio 2013 with SP4, VisualMicro plugin.
The board used is Maple Mini.
The Arduino version is 1.6.0 (but it does not matter being an RC version, the same behavior is also on 1.5.8). I use the modifications from
http://www.rogerclark.net/stm32f103-and-maple-maple-mini-with-arduino-1-5-x-ide/ modifications that allow programming STM32 based boards.
If I try to upload a sketch (say blink without delay example) using directly the Arduino IDE I have no problem. It compiles, it uploads.
If I try to upload a sketch (same one, blink without delay) using VisualMicro and Visual Studio, it compiles but it does not upload throwing the following error:
Reset via USB Serial completed
{runtime.hardware.path}\tools\win\maple_upload.bat COM6 1 1EAF:0003 i\BlinkWithoutDelay.bin"
The system cannot find the file specified
After some digging I found out that the problem is that the variables {path},{runtime.hardware.path} are not correctly interpreted by Visual Micro.
If I replace {path} with the actual path to maple_upload.bat, then everything is working great.
Please see below the relevant fragment from platform.txt file.
# Upload using Maple bootloader over DFU
tools.maple_upload.cmd=maple_upload
tools.maple_upload.cmd.windows=maple_upload.bat
#tools.maple_upload.cmd.linux=maple_upload
tools.maple_upload.path={runtime.hardware.path}/tools/win
tools.maple_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.maple_upload.path.linux={runtime.hardware.path}/tools/linux
tools.maple_upload.upload.params.verbose=-d
tools.maple_upload.upload.params.quiet=
#tools.maple_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}\{build.project_name}.bin"
ls\win/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}\{build.project_name}.bin"
The highlighted line is the one that make everything work, the previous commented one being the one that cause the issue.
Thank you,
Marius