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?

Bill
  • 101
  • 1

1 Answers1

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).

Milliways
  • 62,573
  • 32
  • 113
  • 225