Options for uploading to Intel Edison/Galileo...

339 views
Skip to first unread message

KurtE

unread,
Nov 8, 2014, 9:44:36 AM11/8/14
to devel...@arduino.cc

Not sure if this is the best place to ask this.  If not I am sorry.  But I have monitored similar questions about Upload and Upload using Programmer conversations recently.

 Most of my recent playing around has been with the teensy 3.1s which I really like.  So I know that there are ways to add optional menu items to the Tools menu.

 But recently I started also playing around with a couple of Intel Edison boards (and also an Intel Galileo Gen 2), as one of the Robot manufactures that I spend a lot of time with, is coming out with at least one robot using an Intel Edison...

 By default: if you wish to use the Arudino 1.5.3-Intel.1.0.4 IDE to program the device, you need to have it connected to your computer using one of its USB connectors and have it switched to have its built in USB in client mode.  If your setup is such that you have USB devices connected to it, those devices will not work during that time as those use the same USB device with the switch in server mode...

 Through some hints from some others, I was able to modify the upload sketch to instead do it using Wifi.    The current script(...\hardware\arduino\edison\tools\izmir\clupload_win_hacked.sh)  I am using looks like:

             

 #!/bin/sh
             
echo
"starting download script"
echo
"Args to shell:" $*
         

edison_ip
="192.168.2.115"
edison_pw
="*** YourPassword ***"
SKETCH
=/sketch/sketch.elf
OLD_SKETCH
=/sketch/sketch.elf.old
             
               
$1
/plink -pw $edison_pw root@$edison_ip  "mv -f $SKETCH $OLD_SKETCH"
               
# Execute the target download command
               
#Download the file.
$1
/pscp -scp -pw $edison_pw $2 root@$edison_ip:$SKETCH
$1
/plink  -pw $edison_pw root@$edison_ip "chmod +x $SKETCH"
$1
/plink  -pw $edison_pw root@$edison_ip "systemctl restart clloader"
 

This is working pretty well.  Note: I have this setup on windows.  I have not done it yet for Linux but would be similar except you can use the normal commands like SCP...

 However today I received my second Edison.  Needless to say it's wifi address will not be the same wifi address.  Also I have had to change the script earlier when the wifi port changed after my router hung and had to be rebooted.

So I was wondering if there is a way to add a Tools Menu, like: IP Addres, that can be used?    I know I could probably add it using the boards.txt, but do I have to manually change the boards.txt each time to add an IP address to a list, or is there a way to have the IDE have an edit box, where I can enter it and probably persist it in preferences.txt?  If it is not possible it would be nice to have.

 Likewise if this was possible I would probably add another Item for password.

 Assuming this is possible, I will then need to fetch the current values.  I assume that these are available to the script ...\edison\platform.win.txt file that calls off to run this script.

 Thanks in advance.

 Kurt

Matthijs Kooijman

unread,
Nov 14, 2014, 9:20:52 AM11/14/14
to devel...@arduino.cc
Hi Kurt,

> So I was wondering if there is a way to add a Tools Menu, like: IP Addres,
> that can be used? I know I could probably add it using the boards.txt,
> but do I have to manually change the boards.txt each time to add an IP
> address to a list, or is there a way to have the IDE have an edit box,
> where I can enter it and probably persist it in preferences.txt? If it is
> not possible it would be nice to have.
I think this is not currently possible. However, I'd very much like to
support something like this as well. I've been implementing wireless
updating for the Pinoccio board recently and had to resort to externally
configuring the update target.

So, +1 for this feature, though I'm not very motivated right now to
actually work on this (given it touches the same area as the recent
upload using programmer discussion).

Gr.

Matthijs
signature.asc

Tim Chilton

unread,
Nov 14, 2014, 1:16:43 PM11/14/14
to devel...@arduino.cc
I too would like to see some significant increases in functionality in this area. Arduino end up in all sorts of places, so assuming the only upload is over a usb cable with a 5m length limit is a bit silly.

I hit this issue with a chicken house project which I wanted to be be able to upgrade from the comfort of my office, whilst he chicken house is at the bottom of my garden. I have a solution which I've promised to upload, but have not done so yet, will try in the coming weeks. Mine goes via a raspberry PI so there are several links, each doing different bits of he upload /programming etc I can see the whole upload process including error output.

My suggestions on how to address this are :

Decouple user customisation of programmers / boards etc so that edits are not overwritten when people upgrade or reinstall. This can be achieved by separate files that are read at the same time as the original files and merged in memory before being processed as normal

Allow user customisation of the above to re-use existing definitions, hence allowing people to only customise the minimum, eg my board is like board x, but different in a,b,c. This allows for device specific IP addresses, hostnames. etc

Remove the need for all uploads to be over a com port - have none, network and other such types this could even give an option for upload using. It's just another programmer type. Dovetails in nicely to the bootloader discussions.

Give the use the ability to populate menu options that can be found as variables in get scripts. Possibly with constraints on common types such as IP address, hostname, drop-down options read from the customisation file detailed above. This would make things look integrated. It provides some flexibility too. There are lots of options here.

Matthijs Kooijman

unread,
Nov 14, 2014, 1:35:12 PM11/14/14
to devel...@arduino.cc
Hi Tim,

> Decouple user customisation of programmers / boards etc so that edits
> are not overwritten when people upgrade or reinstall. This can be
> achieved by separate files that are read at the same time as the
> original files and merged in memory before being processed as normal
I think this is already possible - you can have a
hardware/arduino/avr/platform.txt, programmers.txt and boards.txt in
your sketchbook, which I _think_ are combined with the default ones.
Either that or you have to replace "arduino" in there with a different
name and then just reference the arduino:avr core from platform.txt to
"include" it.

> Give the use the ability to populate menu options that can be found as
> variables in get scripts. Possibly with constraints on common types
> such as IP address, hostname, drop-down options read from the
> customisation file detailed above. This would make things look
> integrated. It provides some flexibility too. There are lots of
> options here.
Sounds good. This can probably be modeled like the board options that
are already implemented, though that's limited to "dropdown" style
options only currently.

Gr.

Matthijs
signature.asc

c.ma...@bug.st

unread,
Nov 18, 2014, 10:41:50 AM11/18/14
to devel...@arduino.cc

Hi!

Il 14/11/2014 19:16, Tim Chilton ha scritto:
> I too would like to see some significant increases in functionality in this area. Arduino end up in all sorts of places, so assuming the only upload is over a usb cable with a 5m length limit is a bit silly.
Actually we upload over Wifi on the Arduino Yun too.

> Decouple user customisation of programmers / boards etc so that edits are not overwritten when people upgrade or reinstall. This can be achieved by separate files that are read at the same time as the original files and merged in memory before being processed as normal
>
> Allow user customisation of the above to re-use existing definitions, hence allowing people to only customise the minimum, eg my board is like board x, but different in a,b,c. This allows for device specific IP addresses, hostnames. etc
>
> Remove the need for all uploads to be over a com port - have none, network and other such types this could even give an option for upload using. It's just another programmer type. Dovetails in nicely to the bootloader discussions.
Most of that should be already possible. Having a specific example that
shows what is missing may help on finding way to improve on this.

> Give the use the ability to populate menu options that can be found as variables in get scripts. Possibly with constraints on common types such as IP address, hostname, drop-down options read from the customisation file detailed above. This would make things look integrated. It provides some flexibility too. There are lots of options here.
This is possible with submenus, an example is here:
https://github.com/arduino/Arduino/blob/ide-1.5.x/hardware/arduino/avr/boards.txt#L163

and the documentation is here:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification#custom-board-menus

C

Federico Fissore

unread,
Nov 19, 2014, 5:21:07 PM11/19/14
to devel...@arduino.cc
Speaking of the yun, a similar feature has been requested in the past to work around a bonjour limit:such proposal resembled in having a sticky entry under "ports" menu named "specify ip address...". It would allow you to input the address of a board when the ide is unable to discover it automatically.
Would this work for you?



--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.

Tim Chilton

unread,
May 9, 2015, 6:18:11 PM5/9/15
to devel...@arduino.cc
I finally found a bit of time to play with having lost my customisation each time I update the Arduino IDE and manually having to re-integrate my updates.  The add-ins sort of works as you indicated and I managed to make it do what I wanted after a bit of a struggle. Mostly this is because the edits are only read when you open the IDE, so there is lots of time spent staring at the opening logo :-(

What it doesn't support is "tweaking" and existing configuration - e.g. by having a sketch folder of \hardware\arduino where you add in your tweaks. The effect if you do this is for the IDE to replace the default profile, which is not really what anyone would want in practice.

Shouldn't the environment add on the local customisations to the end of the standard files ??? That way, we can customise easily and there is no real impact on re-installs etc.

The ugly workaround that I came up with was to make a new "arduino\hardware\my boards\avr" folder that contains the custom programmers.txt, platform.txt, boards.txt etc but I couldn't find a way to include the contents of the arduino stock ones into these, so they are hacked around copies with just the re-defined boards in them.

When I complied, all hell broke loose due to the missing sub-folders of cores, bootloaders, libraries, etc and basic things like header files were missing. I tried a hack to the includes back to the stock ones, but that wasn't entirely successful either.

As the whole purpose for me was a low impact when the IDE updates, I am currently working with an ugly hack that links these folders back to the standard ones from the install, so at least when the installer fires up, I get the new definitions in my hardware definitions.  Here's the script

@echo off
rem re-make the links from the arduino software to this area
rem this is due to the need for the custom files
echo re-creating the linked folders
set source=C:\Program Files (x86)\Arduino\hardware\arduino\avr
set destination=C:\users\tim\Documents\Arduino\hardware\my boards\avr
mklink /j "%destination%\cores"   "%source%\cores"   
mklink /j "%destination%\firmwares"  "%source%\firmwares"   
mklink /j "%destination%\bootloaders"  "%source%\bootloaders"   
mklink /j "%destination%\libraries"  "%source%\libraries"   
mklink /j "%destination%\variants"   "%source%\variants"  

Could the IDE be updated at some point to merge local files in the sketch folder to those in the standard folders and permit a simple re-compile that doesn't require such extreme hacking around of the environment ?

Regards

Tim

Tim Chilton

unread,
Jul 22, 2015, 6:03:39 PM7/22/15
to Developers
For info, full documentation of Far Away Arduino (farduino) for remote programming of Arduino's that are too far away for USB is now available on GitHub.
Please take a look at https://github.com/tchilton/farduino for more information
Reply all
Reply to author
Forward
0 new messages