diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-08 08:50:38 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-08 08:56:09 +0100 |
commit | 51d8a45057d47c6d36d5027c8f8d7db7c964f5ff (patch) | |
tree | 449eb3c665906c502cf12e383946230abd5676e1 /utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile | |
parent | 81be2016bbe2be5b9380e974741ac706014d0b1c (diff) | |
download | rockbox-51d8a45057d47c6d36d5027c8f8d7db7c964f5ff.tar.gz rockbox-51d8a45057d47c6d36d5027c8f8d7db7c964f5ff.zip |
adfuload: add atj213x timer0 test program
This simple program shows how to setup timer for periodic
operation. Interrupts are not used yet and simply pending
irq bit is polled and cleared when set. This program
supports my understanding of disassm of ADEC_N63.BIN that
P_CLK is configured for 7.5MHz and timer clock source is P_CLK
directly.
Change-Id: Idd6461bf847c763b78b8c324012ec2515f65dd41
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile')
-rw-r--r-- | utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile b/utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile new file mode 100644 index 0000000000..f3bd76686b --- /dev/null +++ b/utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile | |||
@@ -0,0 +1,40 @@ | |||
1 | |||
2 | TARGET = test_timer_noirq | ||
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_timer_noirq.o | ||
16 | LDSCRIPT= test.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 | ||