add: performance values for Lattice MachXO2
[zpu.git] / zpu / sw / freertos / sample / Makefile
blobd3a6f6ff0a0c195535d61f31db6850cdec0c120c
1 PRJ = test1
2 PATH_SW = /home/antonan/desarrollo/zpu/sw
3 INCLUDES = $(PATH_SW)/freertos/Source/portable/GCC/ZPU/portmacro.h \
4 FreeRTOSConfig.h
5 SRCS_C = $(PATH_SW)/freertos/Source/portable/GCC/ZPU/port.c \
6 $(PATH_SW)/freertos/Source/portable/MemMang/heap_1.c \
7 $(PATH_SW)/freertos/Source/croutine.c \
8 $(PATH_SW)/freertos/Source/list.c \
9 $(PATH_SW)/freertos/Source/queue.c \
10 $(PATH_SW)/freertos/Source/tasks.c \
11 test1.c
12 SRCS_ASM = $(PATH_SW)/freertos/Source/portable/GCC/ZPU/portasm.s
13 PATH_INC = -I$(PATH_SW)/include \
14 -I$(PATH_SW)/freertos/Source/include \
15 -I$(PATH_SW)/freertos/Source/portable/GCC/ZPU \
16 -I$(PATH_SW)/freertos/Demo/ZPU \
17 -I.
18 OPTIONS = -g -Os -DGCC_ZPU
19 LINK = -T $(PATH_SW)/ldscripts/zpu-sram.ld
20 CRT = $(PATH_SW)/startup/crt-sram.o
21 LLIB = -L $(PATH_SW)/lib
22 LIBS = -lio -lgcc --start-group -lc -lbcc --end-group -lgcc -lio
23 LFLAGS = --relax --gc-sections
25 OBJS_ASM = $(SRCS_ASM:.s=.o)
26 OBJS_C = $(SRCS_C:.c=.o)
28 $(PRJ).srec: $(PRJ).out
29 zpu-elf-objcopy -O srec $(PRJ).out $(PRJ).srec
30 zpu-elf-objcopy -O binary $(PRJ).out $(PRJ).bin
31 bin2rom $(PRJ).bin $(PRJ).rom
33 $(OBJS_ASM): $(SRCS_ASM)
34 zpu-elf-gcc $(OPTIONS) $(PATH_INC) -B. -c -Wa,-ahlms=$(@:.o=.lst) -o $@ $(@:.o=.s)
36 $(OBJS_C): $(SRCS_C) $(INCLUDES)
37 zpu-elf-gcc $(OPTIONS) $(PATH_INC) -B. -c -Wa,-ahlms=$(@:.o=.lst) -o $@ $(@:.o=.c)
39 $(PRJ).out: $(CRT) $(OBJS_C) $(OBJS_ASM)
40 zpu-elf-ld $(LLIB) $(LFLAGS) $(LINK) -Map=$(PRJ).map -o $(PRJ).out $(CRT) $(OBJS_C) $(OBJS_ASM) $(LIBS)
43 clean:
44 -rm *.o
45 -rm *.out
46 -rm *.bin
47 -rm *.map
48 -rm *.lst
49 -rm *.srec
50 -rm *.rom