Updating the makefile for Arduino IDE

I have connected an Arduino Uno to the Raspberry Pi via SPI (with the reset line) and Serial and am able to upload the code via SPI using the following command: avrdude -c gpio -p m328p -U flash:w:firmware.hex I want to upload the code to the Arduino from the IDE itself running on the Raspberry Pi. For this I have burnt the bootloader and and use the default Serial Port of the Raspberry Pi to upload the code. This works fine. Now the problem is that since I am using just the Serial lines, the Arduino does not reset automatically and I have to press the reset button before the uploading starts.

I was trying to update the Makefile of the Arduino IDE which it uses to generate the firmware files and upload the code but I am unable to do so. It would be great if someone could help me with this to find out which is exact makefile, which is used for the process and how to insert the code to reset the Arduino just before uploading (this resets the Arduino avrdude -c gpio -p m328p).

Thanks, Karan

The IDE doesn’t use Makefiles, it has the build dependency logic hard coded in Java (believe it or not). There is (was?) a Makefile that was distributed with the IDE that is long out of date, and I think official support had been dropped well before 1.0 came out.

There are others who have adapted and redeveloped various versions of Makefile over the years.

I’ve used an adapted version of Martin Oldfield’s Makefile:

http://www.mjoldfield.com/atelier/2009/02/arduino-cli.html

These Makefiles are for using instead of the IDE for builds, rather than with the IDE, however.

Your simplest route may be to get avrdude to do what you want, and then spoof the avrdude call from the IDE via a wrapper or similar to include your necessary tweaks, if that makes sense.

Of course, you can always dive into the IDE source and hack away in there, if you speak Java.