When you start programming AVRs, you already have your hands full with learning the C language, I/O registers on your chip, and how to manipulate the hardware. However, you also have to worry about your development environment. Figuring out how to compile code, get it on your device, and debug it can seem overwhelming when you’re trying to tackle one thing at a time.
Mfile is a Makefile generator for avr-gcc that takes some of the sting out of compiling your code. Most development environments for avr-gcc rely on the
make utility to build projects, because it’s widely used and widely supported.
Make relies on a Makefile for each project, which is like a configuration file. It tells
make where each source file is located, what should be done with those files, and how to set up additional configuration options.
If your Makefile is formatted improperly, your project won’t build. For newcomers, Makefile errors are often cryptic and difficult to diagnose. Mfile helps with this by using a standard Makefile template, then letting you edit options through a menu. The program handles all of the actual file editing to ensure that the syntax is correct. Once you get more experience, you can toggle manual editing to tweak things yourself. As the author, Jörg Wunsch, says, the goal is to eventually wean off of Mfile entirely as you learn