-
Notifications
You must be signed in to change notification settings - Fork 211
/
Makefile
35 lines (26 loc) · 1.01 KB
/
Makefile
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
#
# Makefile for FreeRTOS demo on Raspberry Pi
#
BASE=$(shell pwd)/
BUILD_DIR=$(shell pwd)/build/
MODULE_NAME="RaspberryPi BSP"
TARGETS=kernel.img kernel.list kernel.syms kernel.elf
LINKER_SCRIPT=raspberrypi.ld
-include .dbuild/dbuild.mk
all: kernel.list kernel.img kernel.syms
@$(SIZE) kernel.elf
kernel.img: kernel.elf
$(Q)$(PRETTY) IMAGE $(MODULE_NAME) $@
$(Q)$(OBJCOPY) kernel.elf -O binary $@
kernel.list: kernel.elf
$(Q)$(PRETTY) LIST $(MODULE_NAME) $@
$(Q)$(OBJDUMP) -D -S kernel.elf > $@
kernel.syms: kernel.elf
$(Q)$(PRETTY) SYMS $(MODULE_NAME) $@
$(Q)$(OBJDUMP) -t kernel.elf > $@
#kernel.elf: LDFLAGS += -L "/opt/Xilinx/14.2/ISE_DS/EDK/gnu/arm/lin64/lib/gcc/arm-xilinx-eabi/4.6.1/" -lgcc
#kernel.elf: LDFLAGS += -L "/opt/Xilinx/14.2/ISE_DS/EDK/gnu/arm/lin64/arm-xilinx-eabi/lib/" -lc
kernel.elf: LDFLAGS += -L "/usr/lib/gcc/arm-none-eabi/4.7.4" -lgcc
kernel.elf: LDFLAGS += -L "/usr/arm-none-eabi/lib" -lc
kernel.elf: $(OBJECTS)
$(Q)$(LD) $(OBJECTS) -Map kernel.map -o $@ -T $(LINKER_SCRIPT) $(LDFLAGS)