GNUmakefile
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
include $(ROOT)/usr/include/make/commondefs
include $(ROOT)/usr/include/make/PRdefs
FLASH_FILE = psk.nand
VRAM_FILE = vram2.sim
PSK_BUILD_TOOL = psk_tool
OBJCOPY = mips-linux-objcopy
REMOVE_SECTS = -R .reginfo -R .note -R .comment -R .mdebug
TARGETS = psk.bin
ASFILES = psk.s
#LCOPTS += -mcpu=4300 -mips3 -g
OPTIMIZER=
#LCOPTS += -mips3 -g
LCOPTS += -mips3 -Os
#LLDOPTS += -Ttext 0x80000000 -N
LLDOPTS += -Ttext 0x9fc00000 -N
#LLDOPTS += -Wl,-T rom.lk -N
LDIRT += cpu.log*
LDIRT += psk_tool psk.elf
default: $(TARGETS)
test: default copy
testsimos: default
psk.bin: $(OBJECTS) $(PSK_BUILD_TOOL)
$(CCF) -o psk.elf $(OBJECTS) $(LDFLAGS)
$(OBJCOPY) -O binary -S $(REMOVE_SECTS) psk.elf psk.bin
od -v -w4 -An -tx1 psk.bin | tr -d " " > psk.sim
./$(PSK_BUILD_TOOL) -f $(FLASH_FILE) -v $(VRAM_FILE) psk.sim
include $(COMMONRULES)
unexport
$(PSK_BUILD_TOOL): $(PSK_BUILD_TOOL).c sha1.c
$(MAKE) -f ToolMakefile
copy:
cp -f $(FLASH_FILE) $(BBROOT)/hw/chip/vsim/External_File.txt
cp -f $(VRAM_FILE) $(BBROOT)/hw/chip/vsim/tests/v2.dat