This is a really basic architecture question.
My wife got me an Edison with an Arduino breakout for Christmas and I set it up last night using the getting started guide.
I loaded the "Blink" program and that worked, but now I'm curious about how the underlying support for Blink is implemented.
On an actual Arduino, when I upload a program, its flash is written and on reboot the bootloader jumps to the program which then runs in a loop.
Since the Edison is backed by Yocto/Linux I'm wondering what "upload" actually does. Is there a Linux process running that listens for the upload (if so what's the process name)? Does that process then spawn a new process that runs the Blink program? If so what's that process' name? Can they be killed & restarted?
I've assumed the Arduino functionality is all emulated on the Edison as there's no ATmega328 (I don't have the board in front of me, I should have looked closer but I'm guessing there's no ATmega328 on the breakout). Is that right?
So, how does this work?
When you upload an Arduino sketch, it is compiled, stored in the Edison and executed as a process named sketch.elf. You can check it with this command:
ps | grep sketch.elf
The sketch.elf is stored in /sketch directory. During the booting process the sketch.elf will be executed automatically. If there is no sketch.elf in the sketch directory the sketch won't be execute because there is no sketch to execute.
Since the sketch.elf is a process you can kill it as any other process. Regarding the ATmega question, there is no ATmega328 on the board.
I hope this answers your question.