From ProjectPages
Jump to: navigation, search

Mfile has mainly been written to help AVR-GCC developers to quickly setup a Makefile for their project. The project web site is here. The Makefile is a text file that organizes code compilations. It is, essentially, a script file that tells the code compiler what to do, and also, for AVR micros, tells the programmer what to do.

Launching the Application

Step 1 - Launch MFile from the start menu.

Step 2 - The default Make file.

Set the main file name

The first setting to make is the name of the main C file. I say the main C file as the file may well call other C files into the compiler.

Step 3 - Select Main file name.

When adding the name of the C file, do not type in the .c suffix, that will be assumed by the Make program.

Step 4 - Set main file name to BlinkLED - do not add the .c on the end

Step 5 - This sets the TARGET file name

Set the Processor type and COM port

Step 6 - Choose your processor type

Step 7 - This sets the MCU variable

Set the programmer type

Step 8 - Choose the progammer type

Step 9 - This sets the AVRDUDE_PROGRAMMER variable

Step 10 - Select the serial port

Step 11 - This sets the AVRDUDE_PORT variable

Set the CPU Frequency

Step 12 - Now we need to edit the actual file

Step 13 - Make the F_CPU line = 12000000 for a 12MHz crystal

Save the File

Step 14 - Now select the option to Save As

Step 15 - Save in the My Documents -> Projects -> BlinkLED folder

Step 16 - The folder contents should now look like this

Step 17 - Open up Programmer's Notepad and see the Makefile in the Magic folder