Building Your Program
Links Mentioned
APP-IV resources

Online Library Reference
 

Links
Home
AWC

Atmel
 


Home
Introduction
Writing a Program
Building your Program
Downloading
Debugging
Modifications
Advanced


NOTICE: THIS IS AN ARCHIVAL COPY OF THIS COURSE. For the latest version, please visit our interactive classroom.

Once you have a program ready to go, you can issue the "make" command to build it. This will cause the compiler to process any parts of the program that have changed from the last build. If everything went well, you'll see something like this at the end:

Size after:
tutor.elf :
section size addr
.text 4278 0
.data 46 8388704
.bss 10 8388750
.noinit 0 8388760
.eeprom 0 8454144
.stab 1920 0
.stabstr 1841 0
Total 8095


The ELF file is the object file format created by the compiler. In addition, the build process also creates an Intel-format hex file (change the FORMAT option in the makefile if you prefer a Motorola-format S record file). The output tells us that the program is taking up about 4.3K (printf is not terribly efficient) and uses 46 bytes of data storage and 10 bytes of uninitialized storage.

If you didn't get a clean compile, you need to fix any errors and reissue the make command until you get a good compile.

Sometimes you want to make sure that everything gets recompiled (for example, when you change the makefile options). In that case, enter "make clean" and then "make all" to force everything to rebuild.

Next up: Downloading your program.

Back Home Next