By Michael Barr, Anthony Massa
Book Price: $49.99 USD
£35.50 GBP
PDF Price: $39.99
Cover | Table of Contents | Colophon
do
{
/* Play games, read, listen to music, etc. */
...
/* Poll to see if we're there yet. */
status = areWeThereYet( );
} while (status == NO);main.
ledInit#) prompt. Commands entered in the RedBoot environment are indicated by the RedBoot
prompt (RedBoot>).arm-elf-gcc [ options ] file ...
-g
-c
-Wall
-I../include
# arm-elf-gcc –g -c –Wall -I../include led.c # arm-elf-gcc -g –c -Wall -I../include blink.c
target: prerequisite
command target is what is going to be built, the prerequisite is a file that must exist before the target can be created, and the command is a shell command used to create the target. There can be multiple prerequisites on the target line (separated by white space) and/or multiple command lines. But be sure to put a tab, not spaces, at the beginning of every line containing a command.XCC = arm-elf-gcc
LD = arm-elf-ld
CFLAGS = -g -c -Wall \\
-I../include
LDFLAGS = -Map blink.map -T viperlite.ld -N
all: blink.exe
led.o: led.c led.h
$(XCC) $(CFLAGS) led.c
blink.o: blink.c led.h
$(XCC) $(CFLAGS) blink.c
blink.exe: blink.o led.o viperlite.ld
$(LD) $(LDFLAGS) -o $@ led.o blink.o
clean:
-rm -f blink.exe *.o blink.mapXCC
LD