

Note: this does not set the clock frequency! It just tells avr-gcc what the frequency is. This needs to be correct for anything timing related to work properly.

To find out what other targets are supported just go to the command prompt and type:į_CPU : This tells avr-gcc the clock frequency in Hertz for the target AVR. MCU : This tells avr-gcc what target to compile the code for. These are items specific to the type of programmer being used, the target avr chip, and the source code being compiled and uploaded. The make file contains only a few items that need to be changed. In this case, it's going to compile your code and if your circuit connections are good, it's going to upload your code to the AVR chip! Sweet right!?! The easiest way to get started with make files is to start with one that already does most of what you want it and customize it for your needs.Ĭlick here to download a Makefile and blink.c code to test with. Download Notepad++ and install it on your computer (or use another editor).Ī make file is sort of like a script (or batch file) that can help you compile your code and then do other stuff too.You can download WinAVR from sourceforge by clicking here. Download WinAVR and install it on your computer.make file - these are text files that allow you to run all the tools in one easy step from from compiling your c code with avr-gcc to uploading it with AVRDUDE.AVRDUDE - This is the software tool that understands how to make your flash programmer upload your hex compiled code to your AVR chip.avr-gcc - this a compiler you can use to compile c and c++ code and turn it into a hex file that can be run on an ATmel AVR.

