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 added this message some days ago, but since it didn't appear I'm afraid I messed up when I submitted it. If, on the other hand, the original one was still in the queue and so this is a double post, I sincerely apologize.