ca4bbd6c9e8a85e1d6ff0e0f4c65d2fd77d26763
1 #*
2 #*
3 #* Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
4 #*
5 #*
6 #* Redistribution and use in source and binary forms, with or without
7 #* modification, are permitted provided that the following conditions
8 #* are met:
9 #*
10 #* Redistributions of source code must retain the above copyright
11 #* notice, this list of conditions and the following disclaimer.
12 #*
13 #* Redistributions in binary form must reproduce the above copyright
14 #* notice, this list of conditions and the following disclaimer in the
15 #* documentation and/or other materials provided with the
16 #* distribution.
17 #*
18 #* Neither the name of Texas Instruments Incorporated nor the names of
19 #* its contributors may be used to endorse or promote products derived
20 #* from this software without specific prior written permission.
21 #*
22 #*
23 #*
24 #* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 #* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 #* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS OR
27 #* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 #* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 #* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 #* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 #* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 #* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 #* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 #* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 #*
37 DEFINES = -DPRUSS_V2\=0
39 ifeq ($(DEVICE), am33xx)
40 DEFINES = -DPRUSS_V2\=1
41 endif
42 ifeq ($(DEVICE), am43xx)
43 DEFINES = -DPRUSS_V2\=1
44 endif
45 ifeq ($(DEVICE), am57xx)
46 DEFINES = -DPRUSS_V2\=1
47 endif
48 ifeq ($(DEVICE), k2g)
49 DEFINES = -DPRUSS_V2\=1
50 endif
52 SOURCE=uio_test_pru.asm
53 LNKCMD=lnk.cmd
55 all: uio_test_pru0.bin uio_test_pru1.bin
57 uio_test_pru%.asm: $(SOURCE)
58 cp $(SOURCE) $@
60 uio_test_pru0.obj: uio_test_pru0.asm
61 $(CGT_PRU)/bin/clpru $< $(DEFINES) -DCORE_PRU\=0
63 uio_test_pru1.obj: uio_test_pru1.asm
64 $(CGT_PRU)/bin/clpru $< $(DEFINES) -DCORE_PRU\=1
66 uio_test_pru%.out: uio_test_pru%.obj
67 $(CGT_PRU)/bin/clpru $< \
68 -z $(LNKCMD) -e ARM_TO_PRU_INTERRUPT_POLL \
69 -o $@ -m $(subst .out,.map,$@)
71 uio_test_pru%.bin: uio_test_pru%.out
72 objcopy -O binary -I elf32-little $< $@
74 clean:
75 @rm -fr *.bin *.obj *.out *.map