aboutsummaryrefslogtreecommitdiff
path: root/testing/examples/ledtest-imx27ads/Makefile
blob: a1e0ba3ac75146185743fde7b9915e9d5c427e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This will make the test program for a Freescale iMX27 ADS Board with a 
# FreeScale iMX27 CPU 

PROC=arm
TYPE=926ejs-linux
LDSCRIPT=ldscript

PATH:=/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-sf-1/arm-926ejs-linux/bin/:$(PATH)
CC=$(PROC)-$(TYPE)-gcc
AS=$(PROC)-$(TYPE)-as
AR=$(PROC)-$(TYPE)-ar
LD=$(PROC)-$(TYPE)-ld
NM=$(PROC)-$(TYPE)-nm
OBJDUMP=$(PROC)-$(TYPE)-objdump
CFLAGS= -g -c -mcpu=arm920t

all: test.elf

# Make a little endian image:
# In Eclipse, add the line :
#    source gdbinit 
# to : Run -> Debug... (menu) -> Commands (tab): Commands (listbox)
# To start gdb from a window use : arm-elf-gdb --command=gdbinit
test.elf: test.c Makefile ldscript crt0.S
	$(CC) $(CFLAGS) -o crt0.o crt0.S
	$(CC) $(CFLAGS) -o test.o test.c
	$(LD) -g -v -T$(LDSCRIPT) -o test.elf crt0.o test.o 
	$(NM) test.elf


dump:
	$(OBJDUMP) --all-headers test.elf

dump_test:
	$(OBJDUMP) --disassemble test.elf

dump_full:
	$(OBJDUMP) --full-contents test.elf

clean:
	-/bin/rm -f *.o *~ test.elf