source: umon/ports/beagleboneblack/Makefile @ 6504fc5

Last change on this file since 6504fc5 was 6504fc5, checked in by Jarielle Catbagan <jcatbagan93@…>, on 06/20/15 at 02:57:55

Removed ad7843.* from BBB port

The AD7843 Interface routines are not relevant to the BBB, therefore it is removed.
ad7843.c has been removed from the compilation process in Makefile.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1###############################################################################
2#
3# Beaglebone Black makefile
4#
5#
6PLATFORM                = BEAGLEBONEBLACK
7TOPDIR                  = $(UMONTOP)
8TGTDIR                  = beagleboneblack
9CPUTYPE                 = arm
10FILETYPE                = elf
11
12# Using tools installed by "sudo apt-get install gcc-arm-none-eabi"...
13ABIDIR          = /usr/lib/gcc/arm-none-eabi/4.8.2
14LIBABIDIR       = -L $(ABIDIR)
15TOOL_PREFIX     = /usr/bin/arm-none-eabi
16
17COMMON_AFLAGS   = -c -D PLATFORM_$(PLATFORM)=1 -D ASSEMBLY_ONLY
18CUSTOM_CFLAGS   = -mcpu=arm1136j-s -O2 -isystem $(ABIDIR)/include -Wno-char-subscripts
19
20
21###############################################################################
22#
23# Memory map configuration:
24# The following variables are used to establish the system's memory map.
25#
26BOOTROMBASE=0x08000000
27BOOTROMLEN=0x100000
28BOOTRAMBASE=0x80000000
29BOOTRAMLEN=0x100000
30RAMTSTROMBASE=0x80100000
31RAMTSTROMLEN=0x100000
32ATAGSIZE=0x1000
33
34# These next two hard-coded values are used by the ramtst version of
35# uMon to allow it to know where these flash-based structures are located.
36MACADDRBASE=0x08000020
37ALTTFSDEVTBLBASE=0x08000040
38
39include $(TOPDIR)/make/common.make
40
41# Build each variable from a list of individual filenames...
42#
43LOCSSRC         =
44CPUSSRC         = vectors_arm.S
45LOCCSRC         = cpuio.c etherdev.c nand740.c
46COMCSRC         = arp.c cast.c cache.c chario.c cmdtbl.c \
47                          docmd.c dhcp_00.c dhcpboot.c dns.c edit.c env.c ethernet.c \
48                          flash.c gdb.c icmp.c if.c ledit_vt100.c monprof.c \
49                          fbi.c font.c mprintf.c memcmds.c malloc.c moncom.c memtrace.c \
50                          misccmds.c misc.c nand.c password.c redirect.c \
51                          reg_cache.c sbrk.c sd.c \
52                          start.c struct.c symtbl.c syslog.c tcpstuff.c tfs.c tfsapi.c \
53                          tfsclean1.c tfscli.c tfsloader.c tfslog.c tftp.c timestuff.c \
54                          tsi.c xmodem.c
55CPUCSRC         = ldatags.c except_arm.c misc_arm.c strace_arm.c
56IODEVSRC        = smsc911x.c uart16550.c fb_draw.c
57FLASHSRC        = s29gl512n_16x1.c
58
59
60include $(TOPDIR)/make/objects.make
61
62OBJS    =       $(LOCSOBJ) $(CPUSOBJ) $(LOCCOBJ) $(CPUCOBJ) $(COMCOBJ) \
63                        $(FLASHOBJ) $(IODEVOBJ)
64
65#########################################################################
66#
67# Targets...
68
69# boot:
70# The default target is "boot", a shortcut to $(BUILDDIR)/boot.$(FILETYPE).
71# This builds the bootflash image that can be used by 'newmon' to
72# load a new version onto an already running system.
73#
74boot:   $(BUILDDIR)/boot.$(FILETYPE)
75        @echo Boot version of uMon built under $(BUILDDIR) ...
76        @ls $(BUILDDIR)/boot*
77
78# ramtst:
79# A shortcut to $(BUILDDIR)/ramtst.$(FILETYPE).  This is a version of uMon
80# that resides strictly in RAM and is used for two main purposes:
81# 1. To test new monitor features prior to burning the boot flash.
82# 2. To be downloaded into the RAM space of a board that has no programmed
83#    boot flash.  This provides a running monitor that can then accept
84#    an incoming bootflash image using 'newmon'.
85#
86ramtst: $(BUILDDIR)/ramtst.$(FILETYPE)
87        @echo Ram-resident test version of uMon built under $(BUILDDIR) ...
88        @ls $(BUILDDIR)/ramtst*
89
90$(BUILDDIR)/boot.$(FILETYPE): $(BUILDDIR) $(OBJS) libz.a \
91                libg.a Makefile
92        $(CC) $(ASMFLAGS) -o rom_reset.o rom_reset.S
93        $(MAKE_MONBUILT)
94        sed -e s/ROMBASE/$(BOOTROMBASE)/ -e s/ROMLEN/$(BOOTROMLEN)/ \
95                -e s/DRAMBASE/$(BOOTRAMBASE)/ -e s/DRAMLEN/$(BOOTRAMLEN)/ -e s/ATAGSIZE/$(ATAGSIZE)/ \
96                $(PLATFORM)_$(@F:.$(FILETYPE)=.ldt) > $(PLATFORM)_$(@F:.$(FILETYPE)=.ld)
97        $(LINK) -e coldstart $(OBJS) monbuilt.o libz.a \
98                libg.a $(LIBABIDIR) $(LIBGCC)
99        $(MAKE_BINARY)
100        $(MAKE_GNUSYMS)
101
102$(BUILDDIR)/ramtst.$(FILETYPE): $(BUILDDIR) $(OBJS) libz.a \
103                libg.a Makefile
104        $(CC) $(ASMFLAGS) -o ram_reset.o ram_reset.S
105        $(MAKE_MONBUILT)
106        sed -e s/RAMTSTROMBASE/$(RAMTSTROMBASE)/ \
107                -e s/RAMTSTROMLEN/$(RAMTSTROMLEN)/ -e s/ATAGSIZE/$(ATAGSIZE)/ \
108                -e s/MACADDRBASE/$(MACADDRBASE)/ -e s/ALTTFSDEVTBLBASE/$(ALTTFSDEVTBLBASE)/ \
109                $(PLATFORM)_$(@F:.$(FILETYPE)=.ldt) > $(PLATFORM)_$(@F:.$(FILETYPE)=.ld)
110
111        $(LINK) -e coldstart $(OBJS) monbuilt.o libz.a libg.a $(LIBGCC)
112        $(MAKE_BINARY)
113        $(MAKE_GNUSYMS)
114
115include $(TOPDIR)/make/rules.make
116
117
118#########################################################################
119#
120# Miscellaneous...
121cscope_local:
122        ls rom_reset.S ram_reset.S >cscope.files
123        ls $(FLASHDIR)/s29gl512n_16x1.c >>cscope.files
124        ls $(FLASHDIR)/s29gl512n_16x1.h >>cscope.files
125
126help_local:
127
128varcheck:
Note: See TracBrowser for help on using the repository browser.