
RP6 ROBOT SYSTEM - 4. Programming the RP6
The compiler will generate a great number of temporary files (using file extensions
like “.o, .lss, .map, .sym, .elf, .dep”). You do not have to look at any of these files and
you may use the newly created tool “make clean” to easily delete these files! Only the
hexfile will is an important result for you! And “make clean” will not delete the hexfile.
Starting the MAKE ALL command in the menu will result in the following output (how-
ever the listing is abbreviated and may deviate from this example a bit!):
> "make" all
-------- begin --------
[...]
Compiling: RP6Base_LEDs.c
avr-gcc -c -mmcu=atmega32 -I. -gdwarf-2 -Os -funsigned-char -funsigned-bitfields -fpack-struct
-fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=RP6Base_LEDs.lst -I../../RP6lib
-I../../RP6lib/RP6base -I../../RP6lib/RP6common -std=gnu99 -MD -MP -MF .dep/RP6Base_LEDs.o.d RP6-
Base_LEDs.c -o RP6Base_LEDs.o
Compiling: ../../RP6lib/RP6base/RP6RobotBaseLib.c
[...]
Creating load file for Flash: RP6Base_LEDs.hex
avr-objcopy -O ihex -R .eeprom RP6Base_LEDs.elf RP6Base_LEDs.hex
[...]
Size after:
AVR Memory Usage
----------------
Device: atmega32
Program: 6858 bytes (20.9% Full)
(.text + .data + .bootloader)
Data: 148 bytes (7.2% Full)
(.data + .bss + .noinit)
-------- end --------
>
Process Exit Code: 0
> Time Taken: 00:01
An important line is “
Process Exit Code: 0
” at the very bottom. It tells us that the compil-
ing and linking process has been completed without any errors. Any other codes indic-
ate errors in the source code, which need to be corrected prior to successful compil-
ing. If there are mistakes in the source code, the compiler issues several error mes-
sages in the output, which contain more info about what causes the error.
However you must understand that the “Process Exit Code: 0”-message does not im-
ply an error-free program! Of course the compiler will not be able to detect logical er-
rors in your program and it will not prevent the robot from hitting the wall ;-)
IMPORTANT:
The output can also contain warnings, which might be helpful to identi-
fy important problems! Please look carefully for warning messages and try to solve
such problems directly after you see them! PN2 uses colors to highlight warnings and
errors. This allows you to easily see important messages. The program will also list
the line number referring to the error message. You can click on the colored message
lines and PN2 will automatically jump to the referenced line in the source code.
- 59 -