blob: 9186ef802a45585ce6c144dc5abe109786b2fdea [file] [log] [blame]
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -07001#
2# The TARGET is expected to indicate which *specific* AT91SAM7 chip
3# is being used, since features and memory vary from chip to chip
4#
5# chip ram rom EMAC CAN
6# AT91CHIP := sam7s64 16k 64k N N
7# AT91CHIP := sam7s256 64k 256k N N
8# AT91CHIP := sam7x256 64k 256k Y Y
9#
10
11# ROMBASE, MEMBASE, and MEMSIZE are required for the linker script
12ROMBASE := 0x0
13MEMBASE := 0x200000
14
15TMP_CFG := bad
16ifeq ($(AT91CHIP), sam7x256)
17DEFINES += AT91_SAM7X=1
18DEFINES += AT91_RAMSIZE=65536
19DEFINES += AT91_ROMSIZE=262144
20MEMSIZE := 65536
21TMP_CFG := ok
22endif
23ifeq ($(AT91CHIP), sam7s256)
24DEFINES += AT91_SAM7S=1
25DEFINES += AT91_RAMSIZE=65536
26DEFINES += AT91_ROMSIZE=262144
27MEMSIZE := 65536
28TMP_CFG := ok
29endif
30ifeq ($(AT91CHIP), sam7s64)
31DEFINES += AT91_SAM7S=1
32DEFINES += AT91_RAMSIZE=16384
33DEFINES += AT91_ROMSIZE=65536
34MEMSIZE := 16384
35TMP_CFG := ok
36endif
37
38ifeq ($(TMP_CFG), bad)
39$(error The AT91SAM7 platform requires AT91CHIP be set by the target)
40endif
41
42LOCAL_DIR := $(GET_LOCAL_DIR)
43
44ARCH := arm
45ARM_CPU := arm7tdmi
46
47DEFINES += AT91_MCK_MHZ=48000000
48
49INCLUDES += \
50 -I$(LOCAL_DIR)/include
51
52OBJS += \
53 $(LOCAL_DIR)/debug.o \
54 $(LOCAL_DIR)/interrupts.o \
55 $(LOCAL_DIR)/platform_early.o \
56 $(LOCAL_DIR)/platform.o \
57 $(LOCAL_DIR)/timer.o \
58 $(LOCAL_DIR)/init_clock.o \
59 $(LOCAL_DIR)/init_clock_48mhz.o \
60 $(LOCAL_DIR)/mux.o \
61 $(LOCAL_DIR)/emac_dev.o
62
63# use a two segment memory layout, where all of the read-only sections
64# of the binary reside in rom, and the read/write are in memory. The
65# ROMBASE, MEMBASE, and MEMSIZE make variables are required to be set
66# for the linker script to be generated properly.
67#
68LINKER_SCRIPT += \
69 $(BUILDDIR)/system-twosegment.ld
70