comparison packages/hal/arm/aeb/current/cdl/hal_arm_aeb.cdl @ 76:435cced73e2f ecos-v1_3_1-release

eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
author jlarmour
date Tue, 28 Mar 2000 14:10:45 +0000
parents
children 7f461c3a372c
comparison
equal deleted inserted replaced
75:41bf073c0c32 76:435cced73e2f
1 # ====================================================================
2 #
3 # hal_arm_aeb.cdl
4 #
5 # AEB1 board HAL package configuration data
6 #
7 # ====================================================================
8 #####COPYRIGHTBEGIN####
9 #
10 # -------------------------------------------
11 # The contents of this file are subject to the Red Hat eCos Public License
12 # Version 1.1 (the "License"); you may not use this file except in
13 # compliance with the License. You may obtain a copy of the License at
14 # http://www.redhat.com/
15 #
16 # Software distributed under the License is distributed on an "AS IS"
17 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 # License for the specific language governing rights and limitations under
19 # the License.
20 #
21 # The Original Code is eCos - Embedded Configurable Operating System,
22 # released September 30, 1998.
23 #
24 # The Initial Developer of the Original Code is Red Hat.
25 # Portions created by Red Hat are
26 # Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
27 # All Rights Reserved.
28 # -------------------------------------------
29 #
30 #####COPYRIGHTEND####
31 # ====================================================================
32 ######DESCRIPTIONBEGIN####
33 #
34 # Author(s): bartv
35 # Original data: gthomas
36 # Contributors:
37 # Date: 1999-06-13
38 #
39 #####DESCRIPTIONEND####
40 #
41 # ====================================================================
42
43 cdl_package CYGPKG_HAL_ARM_AEB {
44 display "ARM AEB-1 evaluation board"
45 parent CYGPKG_HAL_ARM
46 requires ! CYGHWR_THUMB
47 define_header hal_arm_aeb.h
48 include_dir cyg/hal
49 hardware
50 description "
51 The aeb HAL package provides the support needed to run
52 eCos on a ARM AEB-1 eval board."
53
54 compile hal_diag.c plf_stub.c aeb_misc.c
55
56 implements CYGINT_HAL_DEBUG_GDB_STUBS
57 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
58
59 define_proc {
60 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
61 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_aeb.h>"
62 }
63
64 cdl_component CYG_HAL_STARTUP {
65 display "Startup type"
66 flavor data
67 default_value {"RAM"}
68 legal_values {"RAM" "ROM"}
69 no_define
70 define -file system.h CYG_HAL_STARTUP
71 description "
72 When targetting the AEB-1 eval board it is possible to build
73 the system for either RAM bootstrap or ROM bootstrap(s). Select
74 'ram' when building programs to load into RAM using onboard
75 debug software such as Angel or eCos GDB stubs. Select 'rom'
76 when building a stand-alone application which will be put
77 into ROM."
78 }
79
80
81 cdl_option CYGHWR_HAL_ARM_AEB_REVISION {
82 display "AEB board revision"
83 flavor data
84 default_value {"B"}
85 legal_values {"B" "C"}
86 description "
87 The AEB-1 eval board exists in two revisions. Revision B
88 has 128kB of memory and a flawed CPU which means caches
89 must be disabled. Revision C has 256kB of memory and can
90 run with caches enabled."
91 }
92
93 # Real-time clock/counter specifics
94 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
95 display "Real-time clock constants"
96 flavor none
97
98 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
99 display "Real-time clock numerator"
100 flavor data
101 calculated 1000000000
102 }
103 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
104 display "Real-time clock denominator"
105 flavor data
106 calculated 100
107 }
108 cdl_option CYGNUM_HAL_RTC_PERIOD {
109 display "Real-time clock period"
110 flavor data
111 calculated (240000/16)
112 }
113 }
114
115 cdl_component CYGBLD_GLOBAL_OPTIONS {
116 display "Global build options"
117 flavor none
118 parent CYGPKG_NONE
119 description "
120 Global build options including control over
121 compiler flags, linker flags and choice of toolchain."
122
123
124 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
125 display "Global command prefix"
126 flavor data
127 no_define
128 default_value { "arm-elf" }
129 description "
130 This option specifies the command prefix used when
131 invoking the build tools."
132 }
133
134 cdl_option CYGBLD_GLOBAL_CFLAGS {
135 display "Global compiler flags"
136 flavor data
137 no_define
138 default_value { "-mcpu=arm7di -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
139 description "
140 This option controls the global compiler flags which are used to
141 compile all packages by default. Individual packages may define
142 options which override these global flags."
143 }
144
145 cdl_option CYGBLD_GLOBAL_LDFLAGS {
146 display "Global linker flags"
147 flavor data
148 no_define
149 default_value { "-mcpu=arm7di -Wl,--gc-sections -Wl,-static -g -nostdlib" }
150 description "
151 This option controls the global linker flags. Individual
152 packages may define options which override these global flags."
153 }
154
155 cdl_option CYGBLD_BUILD_GDB_STUBS {
156 display "Build GDB stub ROM image"
157 default_value 0
158 requires { CYG_HAL_STARTUP == "ROM" }
159 requires CYGSEM_HAL_ROM_MONITOR
160 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
161 requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
162 requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
163 requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
164 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
165 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
166 no_define
167 description "
168 This option enables the building of the GDB stubs for the
169 board. This is a bit convoluted as it involves prepending
170 the image with a special header used by the AEB firmware
171 to keep track of multiple ROM images. This header includes
172 a checksum making it necessary to build twice."
173
174 make -priority 320 {
175 <PREFIX>/bin/gdb_module.bin : <PACKAGE>/src/gdb_module.c
176 @sh -c "mkdir -p src $(dir $@)"
177 # First build version with no checksum.
178 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
179 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
180 $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
181 $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
182 @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
183 # Prepare dependency file
184 @echo $@ ": \\" > $(notdir $@).deps
185 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
186 @tail +2 deps.tmp >> $(notdir $@).deps
187 @echo >> $(notdir $@).deps
188 @rm deps.tmp
189 # Then build version with checksum from previously built image.
190 $(CC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
191 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
192 $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
193 $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
194 uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
195 @rm src/gdb_module.tmp src/gdb_module_ncs.bin
196 @mv src/gdb_module.bin $@
197 }
198 }
199 }
200
201 cdl_component CYGHWR_MEMORY_LAYOUT {
202 display "Memory layout"
203 flavor data
204 no_define
205 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
206 CYG_HAL_STARTUP == "RAM") ? "arm_aeb_ram" : \
207 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
208 CYG_HAL_STARTUP == "ROM") ? "arm_aeb_rom" : \
209 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
210 CYG_HAL_STARTUP == "RAM") ? "arm_aebC_ram" : \
211 "arm_aebC_rom" }
212
213 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
214 display "Memory layout linker script fragment"
215 flavor data
216 no_define
217 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
218 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
219 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aeb_ram.ldi>" : \
220 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
221 CYG_HAL_STARTUP == "ROM") ? "<pkgconf/mlt_arm_aeb_rom.ldi>" : \
222 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
223 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aebC_ram.ldi>" : \
224 "<pkgconf/mlt_arm_aebC_rom.ldi>" }
225 }
226
227 cdl_option CYGHWR_MEMORY_LAYOUT_H {
228 display "Memory layout header file"
229 flavor data
230 no_define
231 define -file system.h CYGHWR_MEMORY_LAYOUT_H
232 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
233 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aeb_ram.h>" : \
234 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
235 CYG_HAL_STARTUP == "ROM") ? "<pkgconf/mlt_arm_aeb_rom.h>" : \
236 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
237 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aebC_ram.h>" : \
238 "<pkgconf/mlt_arm_aebC_rom.h>" }
239 }
240 }
241
242 cdl_option CYGSEM_HAL_ROM_MONITOR {
243 display "Behave as a ROM monitor"
244 flavor bool
245 default_value 0
246 parent CYGPKG_HAL_ROM_MONITOR
247 requires { CYG_HAL_STARTUP == "ROM" }
248 description "
249 Enable this option if this program is to be used as a ROM monitor,
250 i.e. applications will be loaded into RAM on the board, and this
251 ROM monitor may process exceptions or interrupts generated from the
252 application. This enables features such as utilizing a separate
253 interrupt stack when exceptions are generated."
254 }
255 }