Direct upload from OSX?

As asked on GH:

Is it possible to upload a sketch to Arduberry directly from OSX? Or must you use the Arduino IDE running on a Rpi?

— The reply: —

To answer your question: yep, you can write your Arduino sketch on a PC or a Mac. To run it on the Arduberry though, you need to get it onto your Raspberry Pi. So you could definitely write the file, test it on an Arduino, and troubleshoot all you like. When you’re ready or you need to, you can take the file and put it on a USB stick, load it on your pi, and run it!

Thanks for the response (even if I did post in the wrong place!)

Actaully question is really about options for NOT loading to Arduberry via the Rpi.

My Rpi is currently not running the stock firmware, and has no X windows - in its current state there’s no way of using the Arduino IDE. Is the IDE my only option for upload?

Thanks

Hi,
You can upload the code on the Arduberry from the command line of the Raspberry Pi. But for that you’ll have to install a modified version of Avrdude. You can use this script to set up the environment https://github.com/DexterInd/ArduBerry/blob/master/script/install.sh . Then compile the Arduino program on Mac, copy the hex file to the RaspberryPi and upload it using `avrdude -c gpio -p m328p -U flash:w:firmware.hex’ .

If you want to compile the Arduino program on the RaspberryPi too from the command line these tutorials might help http://pblog.ebaker.me.uk/2014/01/uploading-arduino-sketch-from-raspberry.html and http://openenergymonitor.blogspot.in/2013/12/developing-for-arduino-remotely-on.html .

You can use and programmer like this for standalone usage https://www.sparkfun.com/products/9825 .

You can also use another Arduino as an ISP to try out uploading the code from there http://arduino.cc/en/Tutorial/ArduinoISP .

Thanks,
Karan

Awesome Karan, thanks for all the links. Although I’ve heard of avrdude, I don’t really know much about what it is/does. I’ll take a closer look and post back if I find anything particularly interesting.