VS Arduino
Visual Micro >> Visual Studio 2017, 2019, 2022 >> Unable To Upload To MXCHIP AZ3166 Board in VS 2017
https://www.visualmicro.com/forums/YaBB.pl?num=1514582011

Message started by Mark G. on Dec 29th, 2017 at 9:13pm

Title: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on 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'

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on 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

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on 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.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on 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

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on Jan 1st, 2018 at 11:17pm
Tim,

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



Regards,

Mark G.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on 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.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on 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

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on 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

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on Jan 28th, 2018 at 5:55pm
Oka thanks, ignore the email I just sent you

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on 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



Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on Apr 19th, 2018 at 10: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

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on Apr 20th, 2018 at 11:50am
No probs, I will try it.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on Apr 20th, 2018 at 12:01pm
Cool.  Thanks, Tim

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on Apr 22nd, 2018 at 3: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.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on Apr 22nd, 2018 at 3:44am
Thanks, Tim.

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

Regards,
Mark G.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on Apr 22nd, 2018 at 1: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?

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Mark G. on Apr 22nd, 2018 at 2:50pm
Tim,

It compiled and uploaded to the AZ3166 successfully. 

I'll test the debugging functions. 

Thanks,

Mark G.

Title: Re: Unable To Upload To MXCHIP AZ3166 Board in VS 2017
Post by Visual Micro on Apr 22nd, 2018 at 4: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

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.