summaryrefslogtreecommitdiff
path: root/utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2014-01-08 08:50:38 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2014-01-08 08:56:09 +0100
commit51d8a45057d47c6d36d5027c8f8d7db7c964f5ff (patch)
tree449eb3c665906c502cf12e383946230abd5676e1 /utils/atj2137/adfuload/test_binary/timer_no_irq/Makefile
parent81be2016bbe2be5b9380e974741ac706014d0b1c (diff)
downloadrockbox-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/Makefile40
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
2TARGET = test_timer_noirq
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_timer_noirq.o
16LDSCRIPT= test.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