To upload a sketch (i.e. an .ino file) to an Arduino I normally just use the Arduino IDE. But it would be amazing if there was a way to do this from Julia. Ideally, this would involve some wrapped binary that would work cross-platform (ehm, on an RPI) regardless of the system’s existing libraries. Some cool advantages would be the ability to generate the sketch as a function of some Julia parameters, upload the generated sketch, and have everything work like that. It would make the whole thing a lot more dynamic.
The easiest route is to call an existing external command-line tool, such as avrdude (comes with Ubuntu Linux, etc.) from Julia with run(). The installation scripts for that will already have taken care of USB library dependencies, setting up device permissions to access the right USB device files in /lib/udev/rules.d/60-avrdude.rules, etc. Why reinvent the wheel?
If you wanted to do it in pure Julia for some reason, without external processes, you’d have to read the relevant AVR application notes on their in-system programming protocols (e.g. STK500 protocol). If your device supports in-system programming via USB CDC, you could use LibSerialPort.jl to get there in a portable way.
Considering that the Linux incarnation will require root privileges to install the udev rules, I think encouraging the user to just install the OS provided version might be the preferable route here.