]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/edb7xxx/v2_0/cdl/hal_arm_edb7xxx.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / edb7xxx / v2_0 / cdl / hal_arm_edb7xxx.cdl
1 # ====================================================================
2 #
3 #      hal_arm_edb7xxx.cdl
4 #
5 #      Cirrus Logic EDB7XXX evaluation board HAL package configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## Copyright (C) 2003 Gary Thomas <gary@mind.be>
13 ##
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
17 ##
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21 ## for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ##
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
33 ##
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
36 ##
37 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38 ## at http://sources.redhat.com/ecos/ecos-license/
39 ## -------------------------------------------
40 #####ECOSGPLCOPYRIGHTEND####
41 # ====================================================================
42 ######DESCRIPTIONBEGIN####
43 #
44 # Author(s):      jskov
45 # Original data:  gthomas
46 # Contributors:
47 # Date:           1999-07-01
48 #
49 #####DESCRIPTIONEND####
50 #
51 # ====================================================================
52
53 cdl_package CYGPKG_HAL_ARM_EDB7XXX {
54     display       "Cirrus Logic ARM7 based development boards"
55     parent        CYGPKG_HAL_ARM
56     include_dir   cyg/hal
57     hardware
58     define_header hal_arm_edb7xxx.h
59     description   "
60 The EDB7XXX HAL package provides the support needed to run eCos on Cirrus Logic
61 CL-PS7111 and EP7xxx based development boards."
62
63     compile       hal_diag.c edb7xxx_misc.c
64
65     implements    CYGINT_HAL_DEBUG_GDB_STUBS
66     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
67     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
68     implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
69     implements    CYGINT_HAL_ARM_ARCH_ARM7
70     implements    CYGINT_HAL_SUPPORTS_MMU_TABLES
71
72     define_proc {
73         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
74         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_edb7xxx.h>"
75         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  131"
76         puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
77     }
78
79     requires { (CYGBLD_BUILD_REDBOOT_WITH_EXEC == 0) || \
80                (CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xC0038000) }
81
82     cdl_option CYGHWR_HAL_ARM_EDB7XXX_VARIANT {
83         display       "Cirrus Logic processor variant"
84         flavor        data
85         legal_values  { "CL_PS7111" "EP7209" "EP7211" "EP7212" "EP7312" }
86         default_value { "EP7211" }
87         description   "
88             The Cirrus Logic processor variant."
89         define -file system.h CYGHWR_HAL_ARM_EDB7XXX_VARIANT
90     }
91
92     cdl_option CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT {
93         display       "Cirrus Logic board variant"
94         flavor        data
95         legal_values  { "CL7111" "EDB7209" "EDB7211" "EDB7212" "EDB7312" }
96         default_value { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "CL_PS7111" ? "CL7111" : \
97                         CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7209" ? "EDB7209" : \
98                         CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7211" ? "EDB7211" : \
99                         CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7212" ? "EDB7212" : \
100                         CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7312" ? "EDB7312" : \
101                         "" }
102         description   "
103             The board type which uses a Cirrus Logic processor variant."
104         define -file system.h CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT
105         define_proc {
106             puts $::cdl_header ""
107             puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_CL7111"
108             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 710C\""
109             puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cirrus Logic CL-PS7111\""
110             puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
111             puts $::cdl_header "#define __CL7111"
112             puts $::cdl_header "#endif //CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_CL7111"
113             puts $::cdl_header ""
114             puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7209"
115             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 720T\""
116             puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cirrus Logic EDB7209\""
117             puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
118             puts $::cdl_header "#define __EDB7209"
119             puts $::cdl_header "#endif //CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7209"
120             puts $::cdl_header ""
121             puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7211"
122             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 720T\""
123             puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cirrus Logic EDB7211\""
124             puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
125             puts $::cdl_header "#define __EDB7211"
126             puts $::cdl_header "#endif //CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7211"
127             puts $::cdl_header ""
128             puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7212"
129             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 720T\""
130             puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cirrus Logic EDB7212\""
131             puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
132             puts $::cdl_header "#define __EDB7209"
133             puts $::cdl_header "#define __EDB7212"
134             puts $::cdl_header "#endif //CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7212"
135             puts $::cdl_header ""
136             puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7312"
137             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 720T\""
138             puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cogent EDB7312\""
139             puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"Cirrus Logic EP7312\""
140             puts $::cdl_header "#define __EDB7312"
141             puts $::cdl_header "#endif //CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT_EDB7312"
142             puts $::cdl_header ""
143         }
144     }
145
146     cdl_component CYG_HAL_STARTUP {
147         display       "Startup type"
148         flavor        data
149         legal_values  { "ROM"
150                         ((CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7209") ? "" : "RAM")
151                         ((CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7312") ? "ROMRAM" : "")
152         }
153         default_value  { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7209" ? "ROM" : "RAM"}
154         no_define
155         define -file system.h CYG_HAL_STARTUP
156         description   "
157             When targetting the Cirrus Logic evaluation boards it is possible to build
158             the system for either RAM bootstrap or ROM bootstrap(s). Select
159             'ram' when building programs to load into RAM using onboard
160             debug software such as Angel or eCos GDB stubs.  Select 'rom'
161             when building a stand-alone application which will be put
162             into ROM."
163     }
164
165     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
166         display       "Diagnostic serial port baud rate"
167         flavor        data
168         legal_values  9600 19200 38400 115200
169         default_value 38400
170         description   "
171             This option selects the baud rate used for the diagnostic port.
172             Note: this should match the value chosen for the GDB port if the
173             diagnostic and GDB port are the same."
174     }
175
176     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
177         display       "GDB serial port baud rate"
178         flavor        data
179         legal_values  9600 19200 38400 115200
180         default_value 38400
181         description   "
182             This option controls the baud rate used for the GDB connection."
183     }
184
185     cdl_component CYGSEM_EDB7XXX_LCD_COMM {
186         display        "Support LCD/touchscreen for comminication channel"
187         active_if      CYGPKG_REDBOOT && {CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7312"}
188         flavor         bool
189         default_value  1
190         compile        lcd_support.c
191         description    "
192           Enabling this option will use the LCD and touchscreen for a
193           communications channel, suitable for RedBoot, etc."
194
195         cdl_option  CYGSEM_EDB7XXX_LCD_COMM_PORTRAIT_MODE {
196             display       "LCD portrait mode"
197             flavor        bool
198             default_value 0
199             description   "
200                 Setting this option will orient the data on the LCD screen
201                 in portrait (240x320) mode."
202         }
203
204         cdl_option  CYGOPT_EDB7XXX_LCD_COMM_LOGO {
205             display       "RedHat logo location"
206             flavor        booldata
207             legal_values  { "TOP" "BOTTOM" }
208             default_value { "TOP" }
209             description   "
210                 Use this option to control where the RedHat logo is placed
211                 on the LCD screen."
212         }
213     }
214     
215     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
216         display      "Number of communication channels on the board"
217         flavor       data
218         calculated   2+CYGSEM_EDB7XXX_LCD_COMM
219     }
220
221     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
222         display      "Default console channel."
223         flavor       data
224         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
225         calculated   0
226     }
227  
228     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
229         display          "Debug serial port"
230         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
231         flavor data
232         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
233         default_value    0
234         description      "
235             The EDB7xxx boards have two serial ports. This option
236             chooses which port will be used to connect to a host
237             running GDB."
238      }
239  
240      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
241          display          "Diagnostic serial port"
242          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
243          flavor data
244          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
245          default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
246          description      "
247             The EDB7xxx boards have two serial ports.  This option
248             chooses which port will be used for diagnostic output."
249      }
250
251     cdl_option CYGHWR_HAL_ARM_EDB7XXX_PROCESSOR_CLOCK {
252         display       "Processor clock rate (kHz)"
253         flavor        data
254             legal_values  18432 36864 49152 73728 90317
255         default_value { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "CL_PS7111" ? 18432 : 73728 }
256         description   "
257             The processor can run at various frequencies."
258     }
259
260     cdl_option CYGHWR_HAL_ARM_EDB7XXX_DRAM_SIZE {
261         display       "Installed DRAM on board"
262         flavor        data
263         legal_values  0 2 16
264         default_value { CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "CL7111" ? 2 : \
265                         CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7209" ? 0 : 16 }
266         description   "
267             The Cirrus Logic boards can have various amounts of DRAM installed.
268             The machine needs to be initialized differently, depending
269             upon the amount installed."
270     }
271
272     cdl_option CYGHWR_HAL_ARM_EDB7XXX_SOFTWARE_DRAM_REFRESH {
273         display "Perform DRAM refresh in software"
274         flavor   bool
275         default_value 0
276         description "
277            This option will add code that refreshes the DRAM by
278            touching all of DRAM during the system clock interrupt
279            processing."
280     }
281     
282     cdl_option CYGHWR_HAL_ARM_EDB7XXX_LCD_INSTALLED {
283         display       "LCD installed"
284         flavor        bool
285         default_value 1
286         description   "
287             If an LCD panel is installed, 128K of DRAM will be dedicated to the
288             LCD buffer by the system intialization.  Note: changing this value
289             from the default will alter the memory map and a new debug enviroment
290             (GDB or RedBoot) may be required."
291     }
292
293     # Real-time clock/counter specifics
294     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
295         display       "Real-time clock constants"
296         flavor        none
297     
298         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
299             display       "Real-time clock numerator"
300             flavor        data
301             default_value 1000000000
302         }
303         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
304             display       "Real-time clock denominator"
305             flavor        data
306             default_value 100
307         }
308         cdl_option CYGNUM_HAL_RTC_PERIOD {
309             display       "Real-time clock period"
310             flavor        data
311             default_value { CYGHWR_HAL_ARM_EDB7XXX_PROCESSOR_CLOCK <= 73728 ? 5120 : 6272 };
312             # Assumes 512KHz clock - usually.
313         }
314     }
315
316     cdl_component CYGBLD_GLOBAL_OPTIONS {
317         display "Global build options"
318         flavor  none
319         description   "
320             Global build options including control over
321             compiler flags, linker flags and choice of toolchain."
322
323         parent  CYGPKG_NONE
324
325         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
326             display "Global command prefix"
327             flavor  data
328             no_define
329             default_value { "arm-elf" }
330             description "
331                 This option specifies the command prefix used when
332                 invoking the build tools."
333         }
334
335         cdl_option CYGBLD_GLOBAL_CFLAGS {
336             display "Global compiler flags"
337             flavor  data
338             no_define
339             default_value { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "CL_PS7111" ? "-mcpu=arm710c -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" : \
340                                                                           "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
341             description   "
342                 This option controls the global compiler flags which are used to
343                 compile all packages by default. Individual packages may define
344                 options which override these global flags."
345         }
346
347         cdl_option CYGBLD_GLOBAL_LDFLAGS {
348             display "Global linker flags"
349             flavor  data
350             no_define
351             default_value { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "CL_PS7111" ? "-mcpu=arm710c -Wl,--gc-sections -Wl,-static -g -nostdlib" : "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib"}
352             description   "
353                 This option controls the global linker flags. Individual
354                 packages may define options which override these global flags."
355         }
356
357         cdl_option CYGBLD_BUILD_GDB_STUBS {
358             display "Build GDB stub ROM image"
359             default_value 0
360             requires { (CYG_HAL_STARTUP == "ROM") || (CYG_HAL_STARTUP == "ROMRAM") }
361             requires CYGSEM_HAL_ROM_MONITOR
362             requires CYGBLD_BUILD_COMMON_GDB_STUBS
363             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
364             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
365             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
366             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
367             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
368             no_define
369             description "
370                 This option enables the building of the GDB stubs for the
371                 board. The common HAL controls takes care of most of the
372                 build process, but the final conversion from ELF image to
373                 binary data is handled by the platform CDL, allowing
374                 relocation of the data if necessary."
375
376             make -priority 320 {
377                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
378                 $(OBJCOPY) -O binary $< $@
379             }
380         }
381
382         cdl_option CYGBLD_BUILD_FLASH_TOOL {
383             display "Build flash programming tool"
384             default_value 0
385             requires { CYG_HAL_STARTUP == "RAM" }
386             requires CYGPKG_LIBC
387             requires CYGPKG_KERNEL
388             no_define
389             description "This option enables the building of the flash programming tool for copying the GDB stubs into flash memory."
390
391             make -priority 320 {
392                 <PREFIX>/bin/prog_flash.img : <PACKAGE>/misc/prog_flash.c
393                 @sh -c "mkdir -p misc $(dir $@)"
394                 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o misc/prog_flash.o $<
395                 @echo $@ ": \\" > $(notdir $@).deps
396                 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
397                 @tail -n +2 deps.tmp >> $(notdir $@).deps
398                 @echo >> $(notdir $@).deps
399                 @rm deps.tmp
400                 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ misc/prog_flash.o
401             }
402         }
403
404         cdl_option CYGBLD_BUILD_AUX_TESTS {
405             display "Build tests for auxiliaries"
406             default_value 0
407             requires { CYG_HAL_STARTUP == "RAM" }
408             requires CYGPKG_LIBC
409             requires CYGPKG_KERNEL
410             no_define
411             description "
412                This option enables the building of some tests for the
413                auxiliary devices."
414
415             make -priority 320 {
416                 <PREFIX>/bin/lcd_test.img : <PACKAGE>/misc/lcd_test.c
417                 @sh -c "mkdir -p misc $(dir $@)"
418                 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o misc/lcd_test.o $<
419                 @echo $@ ": \\" > $(notdir $@).deps
420                 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
421                 @tail -n +2 deps.tmp >> $(notdir $@).deps
422                 @echo >> $(notdir $@).deps
423                 @rm deps.tmp
424                 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ misc/lcd_test.o
425             }
426
427             make -priority 320 {
428                 <PREFIX>/bin/panel_test.img : <PACKAGE>/misc/panel_test.c
429                 @sh -c "mkdir -p misc $(dir $@)"
430                 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o misc/panel_test.o $<
431                 @echo $@ ": \\" > $(notdir $@).deps
432                 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
433                 @tail -n +2 deps.tmp >> $(notdir $@).deps
434                 @echo >> $(notdir $@).deps
435                 @rm deps.tmp
436                 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ misc/panel_test.o
437             }
438
439             make -priority 320 {
440                 <PREFIX>/bin/kbd_test.img : <PACKAGE>/misc/kbd_test.c
441                 @sh -c "mkdir -p misc $(dir $@)"
442                 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o misc/kbd_test.o $<
443                 @echo $@ ": \\" > $(notdir $@).deps
444                 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
445                 @tail -n +2 deps.tmp >> $(notdir $@).deps
446                 @echo >> $(notdir $@).deps
447                 @rm deps.tmp
448                 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ misc/kbd_test.o
449             }
450
451             make -priority 320 {
452                 <PREFIX>/bin/i2s_audio_test.img : <PACKAGE>/misc/i2s_audio_test.c <PACKAGE>/misc/i2s_audio_fiq.S
453                 @sh -c "mkdir -p misc $(dir $@)"
454                 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o misc/i2s_audio_test.o $<
455                 @echo $@ ": \\" > $(notdir $@).deps
456                 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
457                 @tail -n +2 deps.tmp >> $(notdir $@).deps
458                 @echo >> $(notdir $@).deps
459                 # warning: no proper deps here
460                 $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o misc/i2s_audio_fiq.o $(REPOSITORY)/$(PACKAGE)/misc/i2s_audio_fiq.S
461                 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ misc/i2s_audio_test.o misc/i2s_audio_fiq.o
462             }
463
464         }
465     }
466
467
468     cdl_component CYGPKG_HAL_ARM_EDB7XXX_OPTIONS {
469         display "Cirrus Logic build options"
470         flavor  none
471         description   "
472             Package specific build options including control over
473             compiler flags used only in building this package,
474             and details of which tests are built."
475
476 # Note: now defined in <pkgconf/hal.h>
477 #            default_value { CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "CL_PS7111" ? "-D__CL7111" : 
478 #                            CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7209" ? "-D__EDB7209" : 
479 #                            CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7211" ? "-D__EDB7211" : 
480 #                            CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7212" ? "-D__EDB7209 -D__EDB7212" : 
481 #                            CYGHWR_HAL_ARM_EDB7XXX_VARIANT == "EP7312" ? "-D__EDB7312" : 
482 #                            "" }
483
484         cdl_option CYGPKG_HAL_ARM_EDB7XXX_CFLAGS_ADD {
485             display "Additional compiler flags"
486             flavor  data
487             no_define
488             default_value { "" }
489             description   "
490                 This option modifies the set of compiler flags for
491                 building the Cirrus Logic HAL. These flags are used in addition
492                 to the set of global flags."
493         }
494
495         cdl_option CYGPKG_HAL_ARM_EDB7XXX_CFLAGS_REMOVE {
496             display "Suppressed compiler flags"
497             flavor  data
498             no_define
499             default_value { "" }
500             description   "
501                 This option modifies the set of compiler flags for
502                 building the Cirrus Logic HAL. These flags are removed from
503                 the set of global flags if present."
504         }
505
506         cdl_option CYGPKG_HAL_ARM_EDB7XXX_TESTS {
507             display "Cirrus Logic tests"
508             flavor  data
509             no_define
510             calculated { "tests/dram_test" }
511             description   "
512                 This option specifies the set of tests for the Cirrus Logic HAL."
513         }
514     }
515
516     cdl_component CYGHWR_MEMORY_LAYOUT {
517         display "Memory layout"
518         flavor data
519         no_define
520         calculated { 
521           CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "CL7111" ? 
522             (CYG_HAL_STARTUP == "RAM" ? "arm_cl7111_ram" : \
523              CYG_HAL_STARTUP == "ROM" ? "arm_cl7111_rom" : "BOGUS.mlt" ) : \
524           CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7209" ? 
525             (CYG_HAL_STARTUP == "ROM" ? "arm_edb7209_rom" : "BOGUS.mlt" ) : \
526           CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7211" ? 
527             (CYG_HAL_STARTUP == "RAM" ? "arm_edb7211_ram" : \
528              CYG_HAL_STARTUP == "ROM" ? "arm_edb7211_rom" : "BOGUS.mlt" ) : \
529           CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7212" ? 
530             (CYG_HAL_STARTUP == "RAM" ? "arm_edb7212_ram" : \
531              CYG_HAL_STARTUP == "ROM" ? "arm_edb7212_rom" : "BOGUS.mlt" ) : \
532           CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7312" ? 
533             (CYG_HAL_STARTUP == "RAM" ? "arm_edb7312_ram" : \
534              CYG_HAL_STARTUP == "ROMRAM" ? "arm_edb7312_romram" : \
535              CYG_HAL_STARTUP == "ROM" ? "arm_edb7312_rom" : "BOGUS.mlt" ) : \
536           "BOGUS.mlt"
537         }
538
539         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
540             display "Memory layout linker script fragment"
541             flavor data
542             no_define
543             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
544             calculated { 
545               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "CL7111" ?
546                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cl7111_ram.ldi>" :  \
547                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_cl7111_rom.ldi>" :  "BOGUS.ldi" ) : \
548               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7209" ?
549                 (CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7209_rom.ldi>" :  "BOGUS.ldi" ) : \
550               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7211" ?
551                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7211_ram.ldi>" :  \
552                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7211_rom.ldi>" :  "BOGUS.ldi" ) : \
553               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7212" ?
554                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7212_ram.ldi>" :  \
555                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7212_rom.ldi>" :  "BOGUS.ldi" ) : \
556               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7312" ?
557                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7312_ram.ldi>" :  \
558                  CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_arm_edb7312_romram.ldi>" : \
559                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7312_rom.ldi>" :  "BOGUS.ldi" ) : \
560               "BOGUS.ldi" }
561         }
562
563         cdl_option CYGHWR_MEMORY_LAYOUT_H {
564             display "Memory layout header file"
565             flavor data
566             no_define
567             define -file system.h CYGHWR_MEMORY_LAYOUT_H
568             calculated {
569               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "CL7111" ?
570                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cl7111_ram.h>" :  \
571                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_cl7111_rom.h>" :  "BOGUS.h" ) : \
572               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7209" ?
573                 (CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7209_rom.h>" :  "BOGUS.h" ) : \
574               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7211" ?
575                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7211_ram.h>" :  \
576                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7211_rom.h>" :  "BOGUS.h" ) : \
577               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7212" ?
578                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7212_ram.h>" :  \
579                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7212_rom.h>" :  "BOGUS.h" ) : \
580               CYGHWR_HAL_ARM_EDB7XXX_BOARD_VARIANT == "EDB7312" ?
581                 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_edb7312_ram.h>" :  \
582                  CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_arm_edb7312_romram.h>" : \
583                  CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_edb7312_rom.h>" :  "BOGUS.h" ) : \
584               "BOGUS.h" }
585         }
586     }
587
588     cdl_option CYGSEM_HAL_ROM_MONITOR {
589         display       "Behave as a ROM monitor"
590         flavor        bool
591         default_value 0
592         parent        CYGPKG_HAL_ROM_MONITOR
593         requires      { (CYG_HAL_STARTUP == "ROM") || (CYG_HAL_STARTUP == "ROMRAM") }
594         description   "
595             Enable this option if this program is to be used as a ROM monitor,
596             i.e. applications will be loaded into RAM on the board, and this
597             ROM monitor may process exceptions or interrupts generated from the
598             application. This enables features such as utilizing a separate
599             interrupt stack when exceptions are generated."
600     }
601
602     cdl_component CYGPKG_CYGMON_HAL_OPTIONS {
603         display       "CygMon HAL options"
604         flavor        none
605         no_define
606         parent        CYGPKG_CYGMON
607         active_if     CYGPKG_CYGMON
608         requires      CYGPKG_IO_SERIAL_ARM_EDB7XXX
609         requires      {(CYGDAT_CYGMON_CONSOLE_DEV != "\"/dev/ser1\"") || \
610                        (CYGPKG_IO_SERIAL_ARM_EDB7XXX_SERIAL1)}
611         requires      {(CYGDAT_CYGMON_CONSOLE_DEV != "\"/dev/ser2\"") || \
612                        (CYGPKG_IO_SERIAL_ARM_EDB7XXX_SERIAL2)}
613         description   "
614             This option lists the target's requirements for a valid CygMon
615             configuration."
616
617
618         cdl_option CYGDAT_CYGMON_CONSOLE_DEV {
619             display       "Serial port for default console"
620             flavor data
621             default_value { "\"/dev/ser1\"" }
622             description   "
623                This option selects the physical device to use as the default
624                console device for CygMon."
625     
626         }
627     
628         cdl_option CYGBLD_BUILD_CYGMON_BIN {
629             display       "Build CygMon ROM binary image"
630             active_if     CYGBLD_BUILD_CYGMON
631             default_value 1
632             no_define
633             description "This option enables the conversion of the CygMon ELF
634                          image to a binary image suitable for ROM programming."
635     
636             make -priority 325 {
637                 <PREFIX>/bin/cygmon.bin : <PREFIX>/bin/cygmon.elf
638                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
639                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
640                 $(OBJCOPY) -O binary $< $@
641             }
642         }
643     }
644
645     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
646          display       "Work with a ROM monitor"
647          flavor        booldata
648          legal_values  { "Generic" "GDB_stubs" }
649          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
650          parent        CYGPKG_HAL_ROM_MONITOR
651          requires      { CYG_HAL_STARTUP == "RAM" }
652          description   "
653              Support can be enabled for different varieties of ROM monitor.
654              This support changes various eCos semantics such as the encoding
655              of diagnostic output, or the overriding of hardware interrupt
656              vectors.
657              Firstly there is \"Generic\" support which prevents the HAL
658              from overriding the hardware vectors that it does not use, to
659              instead allow an installed ROM monitor to handle them. This is
660              the most basic support which is likely to be common to most
661              implementations of ROM monitor.
662              \"GDB_stubs\" provides support when GDB stubs are included in
663              the ROM monitor or boot ROM."
664      }
665
666     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
667         display       "Redboot HAL options"
668         flavor        none
669         no_define
670         parent        CYGPKG_REDBOOT
671         active_if     CYGPKG_REDBOOT
672         description   "
673             This option lists the target's requirements for a valid Redboot
674             configuration."
675     
676         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
677             display       "Build Redboot ROM binary image"
678             active_if     CYGBLD_BUILD_REDBOOT
679             default_value 1
680             no_define
681             description "This option enables the conversion of the Redboot ELF
682                          image to a binary image suitable for ROM programming."
683     
684             make -priority 325 {
685                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
686                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
687                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
688                 $(OBJCOPY) -O binary $< $@
689             }
690         }
691     }
692
693 }