0

I realize this might not be a typical RPi question.

However, I have a RPi with a Gertduino plugged into the GPIO headers.

I can use the wrapper program_328 for avrdude to upload a precompiled blink.hex file. OR use the arduino program (with X11 forwarded to my local machine) and upload the sketch with the "Upload sketch with programmer"

However, how can I write raw "sketch"/C code, and then compile it to the proper hex file and use the wrapper program_328 to upload the hex code to the Gertduino without using the arduino program?

asked Oct 5, 2014 at 21:32
1
  • you can probably use avr dude (which is what the arduino program does in the background) to upload a compiled file. As for compiling you can use avr studio and may even be able to use the cloud ide codebender.cc Commented Oct 5, 2014 at 22:08

1 Answer 1

1

I am not totally familiar with the Gertduino, but use a Gertboard. Both are programmed using the ICSP interface. program_328 is a script used to upload to this, Avrdude for Gertboard uploads using avrdude with appropriate configuration files provided by Gordon Henderson, as described on his site. You should be able to use either program_328 or avrdude to upload HEX files.

If your question is how to compile c code to hex then you would use the avr compiler avr-gcc (located in /usr/bin).

answered Oct 5, 2014 at 23:15

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.