source: umon/ports/csb740/Makefile @ b987a75

Last change on this file since b987a75 was b987a75, checked in by Jarielle Catbagan <jcatbagan93@…>, on 06/19/15 at 21:32:43

Removed execution mode file attribute from all ASCII text files

  • Property mode set to 100644
File size: 4.2 KB
RevLine 
[87db514]1###############################################################################
2#
3# CSB740 board makefile.
4#
5#
6PLATFORM                = CSB740
7TOPDIR                  = $(UMONTOP)
8TGTDIR                  = csb740
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)/target/make/common.make
40
41# Build each variable from a list of individual filenames...
42#
43LOCSSRC         =
44CPUSSRC         = vectors_arm.S
45LOCCSRC         = ad7843.c cpuio.c etherdev.c nand740.c omap3530_gpio.c \
46                          omap3530_lcd.c omap3530_sdmmc.c
47COMCSRC         = arp.c cast.c cache.c chario.c cmdtbl.c \
48                          docmd.c dhcp_00.c dhcpboot.c dns.c edit.c env.c ethernet.c \
49                          flash.c gdb.c icmp.c if.c ledit_vt100.c monprof.c \
50                          fbi.c font.c mprintf.c memcmds.c malloc.c moncom.c memtrace.c \
51                          misccmds.c misc.c nand.c password.c redirect.c \
52                          reg_cache.c sbrk.c sd.c \
53                          start.c struct.c symtbl.c syslog.c tcpstuff.c tfs.c tfsapi.c \
54                          tfsclean1.c tfscli.c tfsloader.c tfslog.c tftp.c timestuff.c \
55                          tsi.c xmodem.c
56CPUCSRC         = ldatags.c except_arm.c misc_arm.c strace_arm.c
57IODEVSRC        = smsc911x.c uart16550.c fb_draw.c
58FLASHSRC        = s29gl512n_16x1.c
59
60
61include $(TOPDIR)/target/make/objects.make
62
63OBJS    =       $(LOCSOBJ) $(CPUSOBJ) $(LOCCOBJ) $(CPUCOBJ) $(COMCOBJ) \
64                        $(FLASHOBJ) $(IODEVOBJ)
65
66#########################################################################
67#
68# Targets...
69
70# boot:
71# The default target is "boot", a shortcut to $(BUILDDIR)/boot.$(FILETYPE).
72# This builds the bootflash image that can be used by 'newmon' to
73# load a new version onto an already running system.
74#
75boot:   $(BUILDDIR)/boot.$(FILETYPE)
76        @echo Boot version of uMon built under $(BUILDDIR) ...
77        @ls $(BUILDDIR)/boot*
78
79# ramtst:
80# A shortcut to $(BUILDDIR)/ramtst.$(FILETYPE).  This is a version of uMon
81# that resides strictly in RAM and is used for two main purposes:
82# 1. To test new monitor features prior to burning the boot flash.
83# 2. To be downloaded into the RAM space of a board that has no programmed
84#    boot flash.  This provides a running monitor that can then accept
85#    an incoming bootflash image using 'newmon'.
86#
87ramtst: $(BUILDDIR)/ramtst.$(FILETYPE)
88        @echo Ram-resident test version of uMon built under $(BUILDDIR) ...
89        @ls $(BUILDDIR)/ramtst*
90
91$(BUILDDIR)/boot.$(FILETYPE): $(BUILDDIR) $(OBJS) libz.a \
92                libg.a makefile
93        $(CC) $(ASMFLAGS) -o rom_reset.o rom_reset.S
94        $(MAKE_MONBUILT)
95        sed -e s/ROMBASE/$(BOOTROMBASE)/ -e s/ROMLEN/$(BOOTROMLEN)/ \
96                -e s/DRAMBASE/$(BOOTRAMBASE)/ -e s/DRAMLEN/$(BOOTRAMLEN)/ -e s/ATAGSIZE/$(ATAGSIZE)/ \
97                $(PLATFORM)_$(@F:.$(FILETYPE)=.ldt) > $(PLATFORM)_$(@F:.$(FILETYPE)=.ld)
98        $(LINK) -e coldstart $(OBJS) monbuilt.o libz.a \
99                libg.a $(LIBABIDIR) $(LIBGCC)
100        $(MAKE_BINARY)
101        $(MAKE_GNUSYMS)
102
103$(BUILDDIR)/ramtst.$(FILETYPE): $(BUILDDIR) $(OBJS) libz.a \
104                libg.a makefile
105        $(CC) $(ASMFLAGS) -o ram_reset.o ram_reset.S
106        $(MAKE_MONBUILT)
107        sed -e s/RAMTSTROMBASE/$(RAMTSTROMBASE)/ \
108                -e s/RAMTSTROMLEN/$(RAMTSTROMLEN)/ -e s/ATAGSIZE/$(ATAGSIZE)/ \
109                -e s/MACADDRBASE/$(MACADDRBASE)/ -e s/ALTTFSDEVTBLBASE/$(ALTTFSDEVTBLBASE)/ \
110                $(PLATFORM)_$(@F:.$(FILETYPE)=.ldt) > $(PLATFORM)_$(@F:.$(FILETYPE)=.ld)
111
112        $(LINK) -e coldstart $(OBJS) monbuilt.o libz.a libg.a $(LIBGCC)
113        $(MAKE_BINARY)
114        $(MAKE_GNUSYMS)
115
116include $(TOPDIR)/target/make/rules.make
117
118
119#########################################################################
120#
121# Miscellaneous...
122cscope_local:
123        ls rom_reset.S ram_reset.S >cscope.files
124        ls $(FLASHDIR)/s29gl512n_16x1.c >>cscope.files
125        ls $(FLASHDIR)/s29gl512n_16x1.h >>cscope.files
126
127help_local:
128
129varcheck:
Note: See TracBrowser for help on using the repository browser.