Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Unable To Upload To MXCHIP AZ3166 Board in VS 2017 (Read 1400 times)
Mark G.
Junior Member
**
Offline



Posts: 10
Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Dec 29th, 2017 at 9:13pm
 
The Arduino environment compiles and uploads without issue.

The VS2017 environment using Visual Micro compiles identically but fails to invoke OpenOCD.exe correctly.

This is the output that is shown when I attempt to do an upload from VS2017:

Uploading 'SensorStatus' to 'MXCHIP AZ3166' using 'COM3'
Uploader started for board MXCHIP AZ3166
Upload method will be: bootloader
Uploading via Bootloader
C:\Users\Mark G Gillen\AppData\Local\arduino15\packages\AZ3166\tools\openocd\0.10.0\bin\openocd.

exe -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/s

cripts/INTERF~1/STLINK~2.CFG -c transport select hla_swd -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/s

cripts/target/stm32f4x.cfg -c "program {{C:\Users\MARKGG~1\AppData\Local\Temp\VMBuilds\SENSOR~1\AZ3166~1\Debug/SensorSt

atus.ino.bin}} verify reset 0x800C000; shutdown"
GNU ARM Eclipse 32-bits Open On-Chip Debugger 0.10.0-00114-g8419536 (2017-04-18-22:14)
The uploader process failed
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
interface_transports transport ...
transport
  transport init
  transport list
  transport select [transport_name]
transport : command requires more arguments
in procedure 'transport'
Back to top
« Last Edit: Dec 29th, 2017 at 9:15pm by Mark G. »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #1 - Dec 30th, 2017 at 8:21pm
 
Please give instruction where/how to install the board you are using. Normally a .json url.

Also please switch on vmicro>compiler>verbose and "show build properties". Then try build and upload and copy the resulting output into a .txt file.

Email the txt file to info[at]visualmicro.com or attach to a post after clicking Reply.

Thanks
Back to top
 
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #2 - Dec 31st, 2017 at 8:33pm
 
Hi Tim,

Not sure which "install" instructions you're looking for.  Here's a link to the board I'm using

https://microsoft.github.io/azure-iot-developer-kit/docs/get-started/

And the board specifics:

http://mxchip.com/az3166

I've emailed the build file (verbose was enabled) to the email address that you provided.

Regards,

Mark G.
Back to top
« Last Edit: Dec 31st, 2017 at 8:33pm by Mark G. »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #3 - Jan 1st, 2018 at 1:52am
 
Thanks, the arduino ide board manager uses the .json file mentioned in the manual install instructions. I used that instead of whatever Microsoft want to install.

Can you please switch on file>preferences>verbose upload in the arduino ide then attempt upload and post the output from the arduino ide.

On my system they are the same except that visual micro uses short path names because we don't use java or nodeJS so we have to cater for possible spaces in unquoted file names.

I'm keen to see the full verbose upload output from arduino thanks
Back to top
 
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #4 - Jan 1st, 2018 at 11:17pm
 
Tim,

I've uploaded the files requested via email to the info@visualmicro.com address.



Regards,

Mark G.
Back to top
 
 
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #5 - Jan 13th, 2018 at 12:34am
 
Hi Tim,

Any movement on how this issue?  I'm going to try some other boards with Visual Micro to see if this is something that may is a more systemic issue.

Any way any status or suggestions for a work around beyond hardcoding the directory path would be appreciated.

Regards,

Mark G.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #6 - Jan 28th, 2018 at 12:38am
 
Sorry for the delay.

In arduino you need to have the verbose upload enabled and you need to attempt an upload.

In visual micro you have the correct settings but also need to attempt an upload.

We need the verbose upload logs because the compile is OK in both apps.

The arduino ide version will be most useful please email

Thanks
Back to top
 
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #7 - Jan 28th, 2018 at 5:52pm
 
Hi Tim,

I had sent these to you previously.  Please check your infor@visualmicro.com email address.

I just sent them again this AM

Thanks, Tim
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #8 - Jan 28th, 2018 at 5:55pm
 
Oka thanks, ignore the email I just sent you
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #9 - Jan 28th, 2018 at 6:00pm
 
You can prove this with a .bat but I suspect this issue is to do with quotes

Code (C++):
//Visual Micro

C:\Users\Mark G Gillen\AppData\Local\arduino15\packages\AZ3166\tools\openocd\0.10.0\bin\openocd.exe -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/scripts/INTERF~1/STLINK~2.CFG -c transport select hla_swd -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/scripts/target/stm32f4x.cfg -c "program {{C:\Users\MARKGG~1\AppData\Local\Temp\VMBuilds\SENSOR~1\AZ3166~1\Debug/SensorStatus.ino.bin}} verify reset 0x800C000; shutdown"

//Arduino

C:\Users\Mark G Gillen\AppData\Local\Arduino15\packages\AZ3166\tools\openocd\0.10.0/bin/openocd.exe -f C:\Users\Mark G Gillen\AppData\Local\Arduino15\packages\AZ3166\tools\openocd\0.10.0/scripts/interface/stlink-v2-1.cfg -c transport select hla_swd -f C:\Users\Mark G Gillen\AppData\Local\Arduino15\packages\AZ3166\tools\openocd\0.10.0/scripts/target/stm32f4x.cfg -c program {{C:\Users\MARKGG~1\AppData\Local\Temp\arduino_build_433863/SensorStatus.ino.bin}} verify reset 0x800C000; shutdown

//>>>> Please try this in a .bat file

C:\Users\Mark G Gillen\AppData\Local\arduino15\packages\AZ3166\tools\openocd\0.10.0\bin\openocd.exe -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/scripts/INTERF~1/STLINK~2.CFG -c transport select hla_swd -f C:\Users\MARKGG~1\AppData\Local\ARDUIN~1\packages\AZ3166\tools\openocd\010~1.0/scripts/target/stm32f4x.cfg -c program {{C:\Users\MARKGG~1\AppData\Local\Temp\VMBuilds\SENSOR~1\AZ3166~1\Debug/SensorStatus.ino.bin}} verify reset 0x800C000; shutdown


 

Back to top
« Last Edit: Jan 28th, 2018 at 6:00pm by Visual Micro »  
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #10 - Apr 19th, 2018 at 11:52pm
 
Just saw this reply.  I pasted the requested line into a bat file and it failed the same way.

The mangled directories just don't resolve.  What's weird is that every other environment I run this in (VS Code, Arduino, PlatformIO) all work without issues.  Only Visual Micro blows up on this Upload path issue.  A bit of a shame.  I like the tool and would prefer to work in VS2017 but can't get past this weird directory issues. 

Regards,

Mark Gillen
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #11 - Apr 20th, 2018 at 12:50pm
 
No probs, I will try it.
Back to top
 
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #12 - Apr 20th, 2018 at 1:01pm
 
Cool.  Thanks, Tim
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #13 - Apr 22nd, 2018 at 4:04am
 
This is resolved in the latest release but it's not in the gallery yet.

There is a download link in the forum here Latest release  - work in progress

The issue was that the transport select hla_swd is surrounded by single quotes in the definition to run openOCD. Vm was clearing the single quotes because they are invalid but should have switched them to double quotes.

"transport select hla_swd"

Thanks for the report.
Back to top
« Last Edit: Apr 22nd, 2018 at 4:05am by Visual Micro »  
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #14 - Apr 22nd, 2018 at 4:44am
 
Thanks, Tim.

I'll get the latest and give it a whirl.  Thanks so much for resolving this.

Regards,
Mark G.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #15 - Apr 22nd, 2018 at 2:26pm
 
Did it work okay?

One other question. Do you use a high res monitor like 4K? IF so does the IDE Locations dialog look okay? see labels and text boxes correctly?
Back to top
 
WWW  
IP Logged
 
Mark G.
Junior Member
**
Offline



Posts: 10
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #16 - Apr 22nd, 2018 at 3:50pm
 
Tim,

It compiled and uploaded to the AZ3166 successfully. 

I'll test the debugging functions. 

Thanks,

Mark G.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Reply #17 - Apr 22nd, 2018 at 5:12pm
 
Great thanks. I forgot to test serial debug.

I also want to get a board and try it with GDB but that might need a bit of tweaking
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print