summaryrefslogtreecommitdiff
path: root/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2013-12-13 22:37:05 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2013-12-13 22:43:52 +0100
commit87c6df98a34154b77c522196c61d89c6f3797416 (patch)
tree12b785db2c7dfe5efb077de0c63d172430ed6864 /utils/atj2137/adfuload/test_binary/backlight_c/Makefile
parent32a6ed8903e18b00bf780f303b33f172a5f23eda (diff)
downloadrockbox-87c6df98a34154b77c522196c61d89c6f3797416.tar.gz
rockbox-87c6df98a34154b77c522196c61d89c6f3797416.zip
adfuload: add test program
This test program. I add it mainly to document somehow my work: 1) atj213x.h lists registers addresses 2) crt0.S exploits self relocation of the binary 3) test_bl.c documents how to control backlight on e150 Change-Id: I055e0fe065d926a5c3805b73cea3f537cb64bf52
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/backlight_c/Makefile')
-rw-r--r--utils/atj2137/adfuload/test_binary/backlight_c/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/atj2137/adfuload/test_binary/backlight_c/Makefile b/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
new file mode 100644
index 0000000000..a3cc13642a
--- /dev/null
+++ b/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
@@ -0,0 +1,40 @@
1
2TARGET = test_bl_c
3
4TOOLCHAIN = mipsel-elf-
5
6CC = $(TOOLCHAIN)gcc
7CPP = $(TOOLCHAIN)cpp
8LD = $(TOOLCHAIN)gcc
9AS = $(TOOLCHAIN)as
10OBJCOPY = $(TOOLCHAIN)objcopy
11OBJDUMP = $(TOOLCHAIN)objdump
12
13CFLAGS = -Wundef -march=4kec -nostdlib -Os -c
14
15OBJS = crt0.o test_bl.o
16LDSCRIPT= test_bl.lds
17
18LDFLAGS = -Wundef -march=4kec -T$(LDSCRIPT) -nostartfiles \
19 -nostdlib -Xlinker -Map=$(TARGET).map
20
21all : $(TARGET).bin
22 ls -ls $(TARGET).bin
23
24%.o : %.c
25 $(CC) $(CPPFLAGS) $(CFLAGS) $(INCDIRS) $< -o $@
26
27%.o : %.S
28 $(CC) $(CFLAGS) -c $< -o $@
29
30$(TARGET).elf : $(OBJS)
31 $(LD) $(LDFLAGS) $(OBJS) $(LIBDIRS) $(LIBS) -o $(TARGET).elf
32
33$(TARGET).bin : $(TARGET).elf
34 $(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin
35
36clean :
37 rm -f $(OBJS)
38 rm -f $(TARGET).elf
39 rm -f $(TARGET).bin
40 rm -f $(TARGET).map