diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2013-12-13 22:37:05 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2013-12-13 22:43:52 +0100 |
commit | 87c6df98a34154b77c522196c61d89c6f3797416 (patch) | |
tree | 12b785db2c7dfe5efb077de0c63d172430ed6864 /utils/atj2137/adfuload/test_binary/backlight_c/Makefile | |
parent | 32a6ed8903e18b00bf780f303b33f172a5f23eda (diff) | |
download | rockbox-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/Makefile | 40 |
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 | |||
2 | TARGET = test_bl_c | ||
3 | |||
4 | TOOLCHAIN = mipsel-elf- | ||
5 | |||
6 | CC = $(TOOLCHAIN)gcc | ||
7 | CPP = $(TOOLCHAIN)cpp | ||
8 | LD = $(TOOLCHAIN)gcc | ||
9 | AS = $(TOOLCHAIN)as | ||
10 | OBJCOPY = $(TOOLCHAIN)objcopy | ||
11 | OBJDUMP = $(TOOLCHAIN)objdump | ||
12 | |||
13 | CFLAGS = -Wundef -march=4kec -nostdlib -Os -c | ||
14 | |||
15 | OBJS = crt0.o test_bl.o | ||
16 | LDSCRIPT= test_bl.lds | ||
17 | |||
18 | LDFLAGS = -Wundef -march=4kec -T$(LDSCRIPT) -nostartfiles \ | ||
19 | -nostdlib -Xlinker -Map=$(TARGET).map | ||
20 | |||
21 | all : $(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 | |||
36 | clean : | ||
37 | rm -f $(OBJS) | ||
38 | rm -f $(TARGET).elf | ||
39 | rm -f $(TARGET).bin | ||
40 | rm -f $(TARGET).map | ||