I just tried this workaround myself and got it working. There's however one small additional piece of info I'd add to your list of steps, namely between step 7 and 8 I'd add that one has to make sure that the files copied to the opt/edison directory on the Edison have execution rights. When I first tried this workaround the clloader file that I copied over did not have execution rights and as a result was not started after the "systemctl start clloader" command and as a result wasn't started after a reboot and as a result my latest uploaded Arduino sketch did not run after a reboot. However, a simple "chmod + x clloader" between step 7 and 8 solved that problem.
Just mentioning it here because other people might run into the same issue and struggle finding out what's wrong, thinking that the above workaround does not work, whereas your workaround as described above does work fine if you keep my remark here above in mind.
Thx again Ali
If you are on Ubuntu, you can mount the downloaded image file and copy the files without reflashing the Edison:
unzip -d edison edison-image-ww18-15.zip
sudo losetup /dev/loop0 edison-image-edison.ext4
sudo mount -o ro /dev/loop0 /mnt
Then copy the files from /mnt/opt/edison using scp. When done, umount and remove loopback:
sudo umount /mnt
sudo losetup -d /dev/loop0
I found for the sketch to start after a reboot the USB device cable needed to be disconnected.
May I ask how to copy the file using PuTTy?
I not yet flash the 146 (ww18-15) version but I just want to try how to copy the file and paste the file back into.
I have tried to use WinSCP but sadly I cannot login with this software.
Thank you and have a nice day.
I trid to the solution. But I have some problems. How can I fix it? There are some errors.
root@edison:~# systemctl status clloader -l
● clloader.service - Daemon to handle arduino sketches
Loaded: loaded (/lib/systemd/system/clloader.service; enabled)
Active: failed (Result: exit-code) since Tue 2016-01-12 05:52:37 UTC; 1min 35s ago
Process: 189 ExecStart=/opt/edison/launcher.sh (code=exited, status=203/EXEC)
Main PID: 189 (code=exited, status=203/EXEC)
Jan 12 05:52:36 edison systemd: Started Daemon to handle arduino sketches.
Jan 12 05:52:37 edison systemd: clloader.service: main process exited, code=exited, status=203/EXEC
Jan 12 05:52:37 edison systemd: Unit clloader.service entered failed state.
root@edison:~# ls -l /opt/edison
-rwxr-xr-x 1 root root 48676 Mar 31 2015 clloader
-rwxr-xr-x 1 root root 360 Jan 8 07:24 launcher.sh
-rwxr-xr-x 1 root root 5896 Mar 31 2015 sketch_reset
-rwxr-xr-x 1 root root 58 Mar 31 2015 sketch_reset.sh
I can't upload sketch on Arduino IDE.
Same issue for me, it IDE won't upload the sketch to the Edison, stuck in uploading.
There is also:
Which works, but the sketch crashes after 5 minutes.
Maybe there are run options that are missing from the exec command in that solution that casue it to crash.
But so far the only thing that fully works for me is to stay in 146..
Hi - does anyone know if there is an official fix for this issue yet?
I am looking for a way that the Edison wont loose all its Arduino code after a reboot or a switch of the USB mode switch.
I tried the latest firmware (iot-devkit-prof-dev-image-edison-20160315) - but unless im doing something wrong, its still not keeping its Arduino code.
Is the only fix to go back to 146 ... ?
I don't think so. I just flashed the latest image named by 'iot-devkit-prof-dev-image-edison-20160315.zip' , still the same issue.
And also I tried this thread afterwards Procedure to Autostart the Arduino Sketch on Edison | Intel® Developer Zone, Which works, but the sketch crashes after 5 minutes.
So I have to flash back again.
If you chmod of the sketch.elf then you may not be able to overwrite it with a new sketch.
The problem most people are having is that:
1.) Edison saves you sketch by default as sketch.elf so it not use the original file name. May this was a deliberate feature to avoid spaces in file name to could cause a lot of
problems in MCU platform.
2.) If you upload a new sketch or overwrite the old one then you will to again chmod +x to turn the newly upload into executable and run updaterc command for it to work.
@V1N0: @Lee_Lane: After 5 minutes it crashes
This has nothing to do with the auto-start script during boot sequence but it may be due to problems in your script which you may need to debug. This could be I/O problems in most cases.
Generally, I normally rename my sketches e.g. mv sketch.elf xxxxxxx.elf since I want to keep them for my incremental coding/debugging sessions. I think you may customise the IDE to prompt you for a name (save..... as) but to reject spaces in filename during upload need to check this further
I will see if I could produce a guide soon (workload, workload...)