Emonpi: Atmega328 build process?

I would like to understand the build process to generate the HEX file uploaded on the Emonpi device. I looked on GitHub (in the firmware folder) but could only find .ino and the hex files.
Do you use a Makefile?

Could you please point me to info regarding this topic?
Thanks for your help.

Walter

Robert Wall's picture

Re: Emonpi: Atmega328 build process?

The .hex file is created by the Arduino IDE - you need to check the documentation for your particular operating system to see where it is written, or turn on "Show verbose output during compilation" and look for the file "[sketch name].cpp.hex". It's said that you will also need to find and edit the Arduino preferences.txt file to NOT delete the file after uploading "export.delete_target_folder=false", but that was not the case for me. You may need to restart the IDE for the changes to take effect.

(And remember to set export.delete_target_folder to true and delete all the temporary and now useless object files and folders when you've finished.)

daturach's picture

Re: Emonpi: Atmega328 build process?

Thanks for your answer and your tips. At the first glance, I did not see the MakeFile because I was looking in the "firmware" folder. (https://github.com/openenergymonitor/emonpi/tree/master/firmware).

I found one in the "Atmega328" folder. I understand I need to install a toolchain under Linux. I will have a look at this process. My goal is to try to compile a sketch from the command line. I forgot to specify that in my initial thread. I will come back at a later stage if I still need some help.

Thanks again

Walter

Robert Wall's picture

Re: Emonpi: Atmega328 build process?

I'm running Ubuntu 14.04 and the Arduino IDE (1.0.5) is available in Software Centre.

glyn.hudson's picture

Re: Emonpi: Atmega328 build process?

I would like to use Arduino makefile but currently makefile only supports single file .ino projects. We use Arduino IDE. I currently have Arduino 1.6.7. See comments in emonPi code for location of Arduino libs

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.