OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [arm9/] [excalibur/] [current/] [cdl/] [hal_arm_arm9_excalibur.cdl] - Blame information for rev 838

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_arm_arm9_excalibur.cdl
4
#
5
#      Altera ARM9/EXCALIBUR platform 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 Free Software Foundation, Inc.
12
##
13
## eCos is free software; you can redistribute it and/or modify it under
14
## the terms of the GNU General Public License as published by the Free
15
## Software Foundation; either version 2 or (at your option) any later
16
## version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT
19
## ANY 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
24
## along with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
##
27
## As a special exception, if other files instantiate templates or use
28
## macros or inline functions from this file, or you compile this file
29
## and link it with other works to produce a work based on this file,
30
## this file does not by itself cause the resulting work to be covered by
31
## the GNU General Public License. However the source code for this file
32
## must still be made available in accordance with section (3) of the GNU
33
## General Public License v2.
34
##
35
## This exception does not invalidate any other reasons why a work based
36
## on this file might be covered by the GNU General Public License.
37
## -------------------------------------------
38
## ####ECOSGPLCOPYRIGHTEND####
39
# ====================================================================
40
######DESCRIPTIONBEGIN####
41
#
42
# Author(s):      jskov
43
# Contributors:   jskov, gthomas
44
# Date:           2001-08-06
45
#
46
#####DESCRIPTIONEND####
47
#
48
# ====================================================================
49
cdl_package CYGPKG_HAL_ARM_ARM9_EXCALIBUR {
50
    display       "Altera ARM9/Excalibur board"
51
    parent        CYGPKG_HAL_ARM_ARM9
52
    requires      CYGPKG_HAL_ARM_ARM9_ARM922T
53
    hardware
54
    include_dir   cyg/hal
55
    define_header hal_arm_arm9_excalibur.h
56
    description   "
57
        This HAL platform package provides generic
58
        support for the Altera ARM9 based board, known as 'excalibur'."
59
 
60
    compile       excalibur_misc.c hal_diag.c
61
 
62
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
64
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
65
 
66
    define_proc {
67
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
68
        puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  "
69
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
70
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM9\""
71
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"EXCALIBUR system\""
72
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
73
        puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK excalibur_program_new_stack"
74
 
75
        puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  62"
76
    }
77
 
78
    cdl_component CYG_HAL_STARTUP {
79
        display       "Startup type"
80
        flavor        data
81
        default_value {"RAM"}
82
        legal_values  {"RAM" "ROM" "ROMRAM" "REDBOOT" }
83
        no_define
84
        define -file system.h CYG_HAL_STARTUP
85
        description   "
86
           When targetting the Excalibur eval board it is possible to build
87
           the system for either RAM bootstrap or ROM bootstrap(s). Select
88
           'ram' when building programs to load into RAM using eCos GDB
89
           stubs.  Select 'rom' when building a stand-alone application
90
           which will be put into ROM, or for the special case of
91
           building the eCos GDB stubs themselves. Select 'redboot' when
92
           building RedBoot to place RedBoot at top of memory, leaving
93
           the bottom of memory (from 0x8000) to applications."
94
    }
95
 
96
    # Both PLLs are in bypass mode on startup.
97
    # FIXME: Add proper configury
98
    cdl_option CYGNUM_HAL_ARM_EXCALIBUR_CPU_CLOCK {
99
        display       "CPU bus speed"
100
        flavor        data
101
        calculated    { 150000000 }
102
        description   "
103
            This is the actual CPU operating frequency (AHB1)."
104
    }
105
 
106
    cdl_option CYGNUM_HAL_ARM_EXCALIBUR_PERIPHERAL_CLOCK {
107
        display       "Peripheral bus speed"
108
        flavor        data
109
        calculated    { CYGNUM_HAL_ARM_EXCALIBUR_CPU_CLOCK / 2 }
110
        description   "
111
            This is the peripheral bus operating frequency (AHB2)."
112
    }
113
 
114
    cdl_option CYGNUM_HAL_ARM_EXCALIBUR_SDRAM_CLOCK {
115
        display       "SDRAM clock"
116
        flavor        data
117
        calculated    { 75000000 }
118
        description   "
119
            This is the SDRAM bus operating frequency (SD_CLK)."
120
    }
121
 
122
    cdl_option CYGNUM_HAL_ARM_EXCALIBUR_TIMER_PRESCALE {
123
        display       "Timer prescale"
124
        flavor        data
125
        legal_values  0 to 255
126
        default_value 16
127
        description   "
128
            This is the prescale value used on the clock used to drive
129
            the kernel counter. Note that some parts of the code may fail
130
            if this is changed due to over/underflows of expressions."
131
    }
132
 
133
    # Real-time clock/counter specifics
134
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
135
        display       "Real-time clock constants"
136
        flavor        none
137
        no_define
138
 
139
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
140
            display       "Real-time clock numerator"
141
            flavor        data
142
            default_value 1000000000
143
        }
144
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
145
            display       "Real-time clock denominator"
146
            flavor        data
147
            default_value 100
148
        }
149
        cdl_option CYGNUM_HAL_RTC_PERIOD {
150
            display       "Real-time clock period"
151
            flavor        data
152
            default_value (CYGNUM_HAL_ARM_EXCALIBUR_PERIPHERAL_CLOCK/(CYGNUM_HAL_ARM_EXCALIBUR_TIMER_PRESCALE*CYGNUM_HAL_RTC_DENOMINATOR))-1
153
        }
154
    }
155
 
156
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
157
        display       "Diagnostic serial port baud rate"
158
        flavor        data
159
        legal_values  9600 19200 38400 57600 115200
160
        default_value 57600
161
        description   "
162
            This option selects the baud rate used for the diagnostic port.
163
            Note: this should match the value chosen for the GDB port if the
164
            diagnostic and GDB port are the same."
165
    }
166
 
167
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
168
        display       "GDB serial port baud rate"
169
        flavor        data
170
        legal_values  9600 19200 38400 57600 115200
171
        default_value 57600
172
        description   "
173
            This option selects the baud rate used for the diagnostic port.
174
            Note: this should match the value chosen for the GDB port if the
175
            diagnostic and GDB port are the same."
176
    }
177
 
178
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
179
        display      "Number of communication channels on the board"
180
        flavor       data
181
        calculated   1
182
    }
183
 
184
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
185
        display          "Debug serial port"
186
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
187
        flavor data
188
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
189
        default_value    0
190
        description      "
191
            The excalibur board has two serial ports. This option
192
            chooses which port will be used to connect to a host
193
            running GDB."
194
     }
195
 
196
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
197
         display      "Default console channel."
198
         flavor       data
199
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
200
         calculated   0
201
     }
202
 
203
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
204
         display          "Diagnostic serial port"
205
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
206
         flavor data
207
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
208
         default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
209
         description      "
210
            The excalibur board has two serial ports.  This option
211
            chooses which port will be used for diagnostic output."
212
     }
213
 
214
    cdl_component CYGBLD_GLOBAL_OPTIONS {
215
        display "Global build options"
216
        flavor  none
217
        no_define
218
        description   "
219
            Global build options including control over
220
            compiler flags, linker flags and choice of toolchain."
221
 
222
 
223
        parent  CYGPKG_NONE
224
 
225
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
226
            display "Global command prefix"
227
            flavor  data
228
            no_define
229
            default_value { "arm-eabi"}
230
            description "
231
                This option specifies the command prefix used when
232
                invoking the build tools."
233
        }
234
 
235
        cdl_option CYGBLD_GLOBAL_CFLAGS {
236
            display "Global compiler flags"
237
            flavor  data
238
            no_define
239
            default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
240
                            "-mcpu=arm9 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
241
            description   "
242
                This option controls the global compiler flags which are used to
243
                compile all packages by default. Individual packages may define
244
                options which override these global flags."
245
        }
246
 
247
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
248
            display "Global linker flags"
249
            flavor  data
250
            no_define
251
            default_value { CYGBLD_ARCH_LDFLAGS . "-mcpu=arm9 --no-target-default-spec -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
252
            description   "
253
                This option controls the global linker flags. Individual
254
                packages may define options which override these global flags."
255
        }
256
 
257
        cdl_option CYGBLD_BUILD_GDB_STUBS {
258
            display "Build GDB stub ROM image"
259
            default_value 0
260
            requires { CYG_HAL_STARTUP == "ROM" }
261
            requires CYGSEM_HAL_ROM_MONITOR
262
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
263
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
264
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
265
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
266
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
267
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
268
            no_define
269
            description "
270
                This option enables the building of the GDB stubs for the
271
                board. The common HAL controls takes care of most of the
272
                build process, but the final conversion from ELF image to
273
                binary data is handled by the platform CDL, allowing
274
                relocation of the data if necessary."
275
 
276
            make -priority 320 {
277
                /bin/gdb_module.srec : /bin/gdb_module.img
278
                $(OBJCOPY) --remove-section=.fixed_vectors $< gdb_module.tmp
279
            }
280
        }
281
    }
282
 
283
    cdl_component CYGPKG_HAL_ARM_ARM9_EXCALIBUR_OPTIONS {
284
        display "ARM9/EXCALIBUR build options"
285
        flavor  none
286
        no_define
287
        description   "
288
            Package specific build options including control over
289
            compiler flags used only in building this package,
290
            and details of which tests are built."
291
 
292
 
293
        cdl_option CYGPKG_HAL_ARM_ARM9_EXCALIBUR_CFLAGS_ADD {
294
            display "Additional compiler flags"
295
            flavor  data
296
            no_define
297
            default_value { "" }
298
            description   "
299
                This option modifies the set of compiler flags for
300
                building the ARM9 EXCALIBUR HAL. These flags are used in addition
301
                to the set of global flags."
302
        }
303
 
304
        cdl_option CYGPKG_HAL_ARM_ARM9_EXCALIBUR_CFLAGS_REMOVE {
305
            display "Suppressed compiler flags"
306
            flavor  data
307
            no_define
308
            default_value { "" }
309
            description   "
310
                This option modifies the set of compiler flags for
311
                building the ARM9 EXCALIBUR HAL. These flags are removed from
312
                the set of global flags if present."
313
        }
314
 
315
        cdl_option CYGPKG_HAL_ARM_ARM9_EXCALIBUR_TESTS {
316
            display "ARM9/EXCALIBUR tests"
317
            flavor  data
318
            no_define
319
            calculated { "" }
320
            description   "
321
                This option specifies the set of tests for the ARM9 Excalibur HAL."
322
        }
323
    }
324
 
325
    cdl_component CYGHWR_MEMORY_LAYOUT {
326
        display "Memory layout"
327
        flavor data
328
        no_define
329
        calculated { CYG_HAL_STARTUP == "RAM" ? "arm_arm9_excalibur_ram" : \
330
                     CYG_HAL_STARTUP == "ROM" ? "arm_arm9_excalibur_rom" : \
331
                     CYG_HAL_STARTUP == "ROMRAM" ? "arm_arm9_excalibur_romram" : \
332
                                                "arm_arm9_excalibur_redboot" }
333
 
334
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
335
            display "Memory layout linker script fragment"
336
            flavor data
337
            no_define
338
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
339
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
340
                         CYG_HAL_STARTUP == "ROM" ? "" : \
341
                         CYG_HAL_STARTUP == "ROMRAM" ? "" : \
342
                                                    "" }
343
        }
344
 
345
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
346
            display "Memory layout header file"
347
            flavor data
348
            no_define
349
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
350
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
351
                         CYG_HAL_STARTUP == "ROM" ? "" : \
352
                         CYG_HAL_STARTUP == "ROMRAM" ? "" : \
353
                                                    "" }
354
        }
355
    }
356
 
357
    cdl_option CYGSEM_HAL_ROM_MONITOR {
358
        display       "Behave as a ROM monitor"
359
        flavor        bool
360
        default_value 0
361
        parent        CYGPKG_HAL_ROM_MONITOR
362
        requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" || CYG_HAL_STARTUP == "REDBOOT" }
363
        description   "
364
            Enable this option if this program is to be used as a ROM monitor,
365
            i.e. applications will be loaded into RAM on the board, and this
366
            ROM monitor may process exceptions or interrupts generated from the
367
            application. This enables features such as utilizing a separate
368
            interrupt stack when exceptions are generated."
369
    }
370
 
371
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
372
         display       "Work with a ROM monitor"
373
         flavor        booldata
374
         legal_values  { "GDB_stubs" }
375
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
376
         parent        CYGPKG_HAL_ROM_MONITOR
377
         requires      { CYG_HAL_STARTUP == "RAM" }
378
         description   "
379
             Support can be enabled for different varieties of ROM monitor.
380
             This support changes various eCos semantics such as the encoding
381
             of diagnostic output, or the overriding of hardware interrupt
382
             vectors.
383
             \"GDB_stubs\" provides support when GDB stubs are included in
384
             the ROM monitor or boot ROM."
385
     }
386
 
387
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
388
        display       "Redboot HAL options"
389
        flavor        none
390
        no_define
391
        parent        CYGPKG_REDBOOT
392
        active_if     CYGPKG_REDBOOT
393
        description   "
394
            This option lists the target's requirements for a valid Redboot
395
            configuration."
396
 
397
        # The backup image is not needed, since ROMRAM/REDBOOT is the normal
398
        # RedBoot startup type.
399
        requires {!CYGPKG_REDBOOT_FLASH || CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP == 0}
400
 
401
        # RedBoot details
402
        requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0x00008000 }
403
        define_proc {
404
            puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
405
        }
406
 
407
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
408
            display       "Build Redboot ROM binary image"
409
            active_if     CYGBLD_BUILD_REDBOOT
410
            default_value 1
411
            no_define
412
            description "This option enables the conversion of the Redboot ELF
413
                         image to the various relocated SREC images needed
414
                         for flash updating."
415
 
416
            make -priority 325 {
417
                /bin/redboot.bin : /bin/redboot.elf
418
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
419
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
420
                $(OBJCOPY) --change-address 0xc0000000 -O ihex $< $(@:.bin=.hex)
421
                $(OBJCOPY) -O binary $< $@
422
            }
423
        }
424
    }
425
 
426
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.