[Feature request] Remote deploy
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello
Last day I was developing for arduino on a remote machine using remote desktop and.. well, it was quite uncomfortable. Laggy connections can make it quite frustrating.
So I came up with this idea: what if I can write the code on my machine, compile it locally and then just transfer the compiled file to the remote machine for programming? Ok, I can just transfer the source code and then compile it remotely, but this involves some more steps (write, save, synchronize between the two pcs, move on the remote one, start compiling and deploying).
I think that this procedure is fairly easy to implement in the current arduino infrastructure. Now, AFAIK, when you push the compile and flash button the system:
1) creates the c files from the sketches ones, adding the required headers and converting the arduino project to the atmel one
2) compiles the resulting c files with avr-gcc, getting the hex file
3) programs the hex file on the board with avrdude, and reports on the ide the various errors it gives
The remote deploy function, should just insert another step:
1) creates the c files from the sketches ones, adding the required headers and converting the arduino project to the atmel one
2) compiles the resulting c files with avr-gcc, getting the hex file
3) transfers the hex to the remote machine (direct tcp connection?)
4) programs the hex file on the board with avrdude on the remote host, and reports back through the tcp connection the various errors it gives
Practically in the infrastructure you should just call another program (let's call it avrdudeRemote which, instead of calling avrdude on the local machine, connects to the remote daemon who calls avrdude.
From the IDE point of view, you (user) will just need to add a "virtual" serial port, which is instead a configuration for that avrdudeRemote (e.g. IP address of the remote machine, port, possibly a simple authentication). And on the remote machine you should just enable the "accept remote connections" which, in turn, starts the daemon.
What do you think about this? Is this a good idea or it's just stupid? Or it is a good idea but too difficult/time consuming to be implemented?
Best regards
PS. I already tried to add this to the developers list, since the [Development Policy](https://github.com/arduino/Arduino/wiki/Development-Policy) says that the modifications should be discussed there. Anyway the request was rejected, and the reply message said "If you'd like to make a feature request or report an issue, please do submit patches or bug reports through the issue tracking list", so.. here I am, posting this as a feature request on the tracker
Contributor guide
Research direction
Start by tracing the Arduino IDE's existing compile-and-upload flow described in the issue: sketch-to-C generation, avr-gcc compilation, and avrdude programming. Then define the local-to-remote transfer, remote daemon, error reporting, virtual serial-port configuration, and authentication boundaries; done means a remote board can be programmed and failures return to the IDE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, java
- Domain
- desktop, embedded-iot, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100