2 PATH_SW
= /home
/antonan
/desarrollo
/zpu
/sw
3 INCLUDES
= $(PATH_SW
)/freertos
/Source
/portable
/GCC
/ZPU
/portmacro.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 \
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 \
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
)