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) Error uploading to Artik (Read 9246 times)
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Error uploading to Artik
Dec 9th, 2016 at 1:03pm
Print Post  
Hey guys,
I am getting an error I am hoping you can help with.  I am trying to get VM working with the Artik 710 in VS 2015.  I am using Arduino 1.6.14.  The sketch compiles, VM connects to my board and I get the password prompt.  I enter it and then it tries to upload.   Upload works fine in the Arduino IDE.  Here is the output...

Code
Select All
Board Properties
name=Samsung Artik 710
build.core=linux
build.crossprefix=arm-cortex_a8-linux-gnueabihf-
build.compiler_path={runtime.tools.arm-linux-gcc.path}/bin/
build.variant=artik710
build.mcu=cortex-a53
build.board=ARTIK710
build.defines=-DN_I2C=1 -DN_SPI=1 -DMQTT_KEEPALIVE=80
vid.0=0x04e8
pid.0=0xa771
upload.via_ssh=true
upload.tool=linuxuploader
upload.protocol=sam-ba
upload.maximum_size=10000000
upload.use_1200bps_touch=false
upload.wait_for_upload_port=false
upload.native_usb=false
runtime.ide.path=C:\Program Files (x86)\Arduino
runtime.os=windows
are\arm_cortexA\0.5.4\system
runtime.ide.version=10609
target_package=arduino
target_platform=arm_cortexA
ardware\arm_cortexA
originalid=artik710
version=0.5.3
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.path={build.compiler_path}
compiler.c.cmd={build.crossprefix}gcc
compiler.c.flags=-c -I. {compiler.warning_flags} -g -nostdlib {build.defines} -MMD -std=gnu11
compiler.c.elf.cmd={build.crossprefix}g++
compiler.c.elf.flags=-Wl,--gc-sections -lrt {compiler.warning_flags}
compiler.S.flags=-c -g -x assembler-with-cpp
compiler.cpp.cmd={build.crossprefix}g++
compiler.cpp.flags=-c -I. {compiler.warning_flags} -g -nostdlib {build.defines} -MMD -std=gnu++11
compiler.ar.cmd={build.crossprefix}ar
compiler.ar.flags=rcs
compiler.ar.extra_flags=
compiler.objcopy.cmd=
compiler.objcopy.eep.flags=
compiler.elf2hex.flags=-O binary
compiler.elf2hex.extra_flags=
compiler.elf2hex.cmd={build.crossprefix}objcopy
compiler.ldflags=
compiler.size.cmd={build.crossprefix}size
compiler.define=-DARDUINO=
build.extra_flags=
build.usb_flags=
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_LINUX {build.extra_flags} {includes} -o "{object_file}" "{source_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_LINUX {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--unresolved-symbols=report-all -Wl,--start-group {object_files} "{build.path}/{archive_file}" -lpthread -Wl,--end-group
recipe.objcopy.eep.pattern=
recipe.objcopy.hex.pattern=
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=\.text\s+([0-9]+).*
recipe.output.tmp_file={build.project_name}.elf
recipe.output.save_file={build.project_name}.{build.variant}.elf
tools.linuxuploader.upload.params.verbose=verbose
tools.linuxuploader.upload.params.quiet=quiet
er" {build.path}/{build.project_name}.elf "{upload.verbose}" {serial.port.iserial}
tools.linuxuploader_remote.upload.pattern=/root/load_sketch
vm.platform.root.path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ptyrjn4u.owe\Micro Platforms\arduino16x
s\arduino\tools\arm-linux-gcc\5.4.0
ackages\arduino\tools\arm-linux-gcc\5.4.0
ino\tools\avrdude\6.3.0-arduino6
5\packages\arduino\tools\avrdude\6.3.0-arduino6
ino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2
l\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2
s\arduino\tools\linuxuploader\1.3
kages\arduino\tools\linuxuploader\1.3
runtime.vm.boardinfo.id=artik710
runtime.vm.boardinfo.name=artik710
runtime.vm.boardinfo.desc=Samsung Artik 710
es\arduino\hardware\arm_cortexA\0.5.4
ide.hint=For all platforms that use Board Manager
ide.location.key=Arduino16x
ide.location.ide.winreg=Arduino 1.6.x Application
ide.location.sketchbook.winreg=Arduino 1.6.x Sketchbook
ide.location.sketchbook.preferences=sketchbook.path
ide.default.revision_name=1.6.9
ide.default.version=10609
ide.default.package=arduino
ide.default.platform=avr
ide.multiplatform=true
ide.includes=arduino.h
ide.exe_name=arduino
ide.platformswithoutpackage=false
ide.includes.fallback=wprogram.h
ide.extension=ino
ide.extension.fallback=pde
ide.versionGTEQ=160
ide.exe=arduino.exe
ide.hosts=atmel
ide.url=http://arduino.cc/en/Main/Software
ide.help.reference.path=reference
ide.help.reference.path2=reference\www.arduino.cc\en\Reference
ide.help.reference.serial=reference\www.arduino.cc\en\Serial
vm.debug=true
software=ARDUINO
ssh.user.name=root
ssh.user.default.password=arduino
ssh.host.wwwfiles.path=/www/sd
build.working_directory={runtime.ide.path}
ide.location.preferences.portable={runtime.ide.path}\portable
ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt

ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15
ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15
ide.contributions.boards.allow=true
ide.contributions.boards.ignore_unless_rewrite_found=true
ide.contributions.libraries.allow=true
ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
ide.create_platforms_from_boardsTXT.teensy=build.core
ide.appid=arduino16x
location.sketchbook=C:\Users\Bogaat\Documents\Arduino
e\arm_cortexA\0.5.4\cores\linux
vm.core.include=arduino.h
dware\arm_cortexA\0.5.4
ardware\arm_cortexA\0.5.4
vm.platformname.name=arm_cortexA
build.arch=ARM_CORTEXA
builder.noino=false
build.architecture=5.4.0
o\tools\arm-linux-gcc\5.4.0\bin\
ools\arm-linux-gcc\5.4.0
vm.runtime.compiler.showwarnings=false
vm.runtime.upload.verbose=false
vm.runtime.upload.verify=false
serial.port.file=192.168.1.35
serial.port=192.168.1.35
network.Name=TEST
network.HostName=TEST.local.
network.Address=192.168.1.35
network.port=80
network.Protocol=Any
network.board=artik710
network.distro_version=0.1
vm.runtime.compiler.auto_discover_includes=true
build.vm.build.vmdebug=0
build.vm.build.isgdb=0
build.vm.build.optimised=1
vm.last.buildpath=C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710 

« Last Edit: Dec 9th, 2016 at 2:31pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #1 - Dec 9th, 2016 at 1:06pm
Print Post  
Code
Select All
Compiling 'Sketch1' for 'Samsung Artik 710'
Build folder: file:///C:/Users/Bogaat/AppData/Local/Temp/VMBuilds/Sketch1/artik710
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: .0/bin/
GCC: 5.4.0
Sketchbook: file:\\\C:\Users\Bogaat\Documents\Arduino
Sketch Include Paths
Core Include Paths
Include Path .5.4\cores\linux'
Include Path .5.4\variants\artik710'
4.0\bin\arm-cortex_a8-linux-gnueabihf-g++" -c -I. -w -g -nostdlib -DN_I2C=1 -DN_SPI=1 -DMQTT_KEEPALIVE=80 -std=gnu++11 -w -x c++ -E -CC -DARDUINO=10609 -DARDUINO_ARTIK710 -DARDUINO_ARCH_ARM_CORTEXA -DARDUINO_LINUX \0.5.4\cores\linux" \0.5.4\variants\artik710" "C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710\Sketch1.cpp" -o "nul"

Building variant ...

Using previously compiled variant

Building core ...

Building project code ...
Using previously compiled file: C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710\Sketch1.cpp.o

Linking it all together ...
4.0/bin/arm-cortex_a8-linux-gnueabihf-g++" -Wl,--gc-sections -lrt -w -o "C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710/Sketch1.ino.elf" "-LC:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710" -Wl,--unresolved-symbols=report-all -Wl,--start-group "C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710\Sketch1.cpp.o" p.o" nctions.cpp.o" "C:\Users\Bogaat\AppData\Local\Temp\VMBuilds\Sketch1\artik710/core.a" -lpthread -Wl,--end-group

Creating final output files ...

Program size: 14,680 bytes (used 0% of a 10,000,000 byte maximum) (0.46 secs)

Uploading Sketch1 to Samsung Artik 710 on TEST at 192.168.1.35 (Samsung Artik 710)
Connecting ...
Algorithm negotiation fail
Connection closed
Upload failed 

« Last Edit: Dec 9th, 2016 at 2:31pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #2 - Dec 9th, 2016 at 2:56pm
Print Post  
Thanks for the info. This looks related to the password/security required for the SSH upload.

The Arduino IDE uses java for SSH, Visual Micro uses an alternative SSH API.

I will have to look to see if there is either a patch or other config setting that will provide the correct level of security.

In the meantime you can click the File>Preferences>External Editor check box in the arduino ide. This allows the same code to be open in both arduino and visual studio at the same time and also forces the arduino ide to reload changes from disk when clicking upload. 

I'll try to look at it over the next few days and I will assume you are using Visual Studio and the current release of Arduino which is 1.6.13.
  
Back to top
WWW  
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #3 - Dec 9th, 2016 at 7:16pm
Print Post  
I got something slightly less cryptic when trying to use the debug feature...
Code
Select All
Uploading Sketch1 to Samsung Artik 710 on TEST at 192.168.1.35 (Samsung Artik 710)
Connecting ...
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.1.35:22
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at Tamir.SharpSsh.java.net.Socket..ctor(String host, Int32 port)
   at Tamir.SharpSsh.jsch.Util.createSocket(String host, Int32 port, Int32 timeout)
Connection closed
Upload failed 

« Last Edit: Dec 9th, 2016 at 7:25pm by Bogaat »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #4 - Dec 9th, 2016 at 8:00pm
Print Post  
Interesting.

1)
The Console window isn't open in the arduino ide is it? Prob a silly question.

2)
Can you confirm you are a new user and Visual Micro has never previously uploaded over network correctly for you?

Thanks

ps:
Unrelated there are some changes on the way for Yun network debug which broke in the last release however you haven't got to the debug stuff yet Smiley
  
Back to top
WWW  
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #5 - Dec 9th, 2016 at 8:07pm
Print Post  
1) Not open
2) New user and never uploaded over network
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #6 - Dec 9th, 2016 at 8:38pm
Print Post  
I think I have found the problem. The spec for the network upload was updated a few months ago to allow some variations over the Yun.

Will make a new release and post a link so you can try it.
  
Back to top
WWW  
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #7 - Dec 9th, 2016 at 8:39pm
Print Post  
I should note that the Artik runs Arduino code differently than the YUN or other boards that I have seen.  It literally runs the compiled bin/elf file within Linux.  I believe the Beagleboard does the same?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #8 - Dec 9th, 2016 at 8:56pm
Print Post  
Yes it's fine but that's useful thanks.

The upload is almost identical. The program is sent via ssh and a command is run. Each Linux/Linnino instance handles the rest.

With the Yun we call a few remote commands

Code
Select All
merge-sketch-with-bootloader.lua /tmp/sketch.hex
kill-bridge
run-avrdude /tmp/sketch.hex
 



but your board makes use of overrides specified in it's config file. The new property is called tools.linuxuploader_remote.upload.pattern

Code
Select All
tools.linuxuploader.upload.params.verbose=verbose
tools.linuxuploader.upload.params.quiet=quiet

er" {build.path}/{build.project_name}.elf "{upload.verbose}" {serial.port.iserial}

# Use this for network upload
tools.linuxuploader_remote.upload.pattern=/root/load_sketch
 




fyi: 
The definition of the hardware you are using will be here depending on your windows user folder:-
C:\Users\[your_name]t
« Last Edit: Dec 9th, 2016 at 8:57pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #9 - Dec 13th, 2016 at 3:26pm
Print Post  
Hi,

The latest release of Visual Micro contains changes for Linux/Bridge boards.

Hopefully the upload now works correctly.

Thanks for the post
  
Back to top
WWW  
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #10 - Dec 14th, 2016 at 7:55pm
Print Post  
Loaded latest...same error Sad
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #11 - Dec 14th, 2016 at 8:24pm
Print Post  
Thanks for the post.

Please confirm if you are prompted for a password?
  
Back to top
WWW  
IP Logged
 
Bogaat
Newbies
*
Offline


Posts: 7
Joined: Dec 9th, 2016
Re: Error uploading to Artik
Reply #12 - Dec 14th, 2016 at 8:25pm
Print Post  
Yes, I am prompted.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error uploading to Artik
Reply #13 - Dec 15th, 2016 at 10:00pm
Print Post  
Thanks for trying and all the good info. 

The issue is with the security/connection. I expect Visual Micro needs to use a different SSH library to resolve the issue but will try to get hold of a board to test with. The other things fixed previously will also be required but we can't get past a logon to port 22.

The usb upload should work if the board is local and as a short term workaround alternatively the external editor option in arduino for upload.

I have been looking at the SHH.NET githib project which looks better than the SSH lib Visual Micro currently uses. Hopefully I get a change to look at it during the holiday.
« Last Edit: Dec 15th, 2016 at 10:01pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint