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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [pid/] [current/] [cdl/] [hal_arm_pid.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_arm_pid.cdl
4
#
5
#      PID 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 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):      bartv
43
# Original data:  gthomas
44
# Contributors:
45
# Date:           1999-06-13
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_ARM_PID {
52
    display       "ARM PID evaluation board"
53
    parent        CYGPKG_HAL_ARM
54
    define_header hal_arm_pid.h
55
    include_dir   cyg/hal
56
    hardware
57
    description   "
58
        The pid HAL package provides the support needed to run
59
        eCos on an ARM PID evaluation board."
60
 
61
    compile       hal_diag.c pid_misc.c
62
 
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66
    implements    CYGINT_HAL_ARM_THUMB_ARCH
67
    implements    CYGINT_HAL_ARM_BIGENDIAN
68
    implements    CYGINT_HAL_ARM_ARCH_ARM7
69
    implements    CYGINT_HAL_ARM_ARCH_ARM9
70
    implements    CYGINT_HAL_TESTS_NO_CACHES
71
 
72
    define_proc {
73
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
74
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
75
        puts $::cdl_header ""
76
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 7TDMI\""
77
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"PID\""
78
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
79
        puts $::cdl_header ""
80
 
81
        puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
82
    }
83
 
84
 
85
    cdl_component CYG_HAL_STARTUP {
86
        display       "Startup type"
87
        flavor        data
88
        legal_values  {"RAM" "ROM"}
89
        default_value {"RAM"}
90
        no_define
91
        define -file system.h CYG_HAL_STARTUP
92
        description   "
93
            When targetting the PID eval board it is possible to build
94
            the system for either RAM bootstrap or ROM bootstrap(s). Select
95
            'ram' when building programs to load into RAM using onboard
96
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
97
            when building a stand-alone application which will be put
98
            into ROM."
99
 
100
    }
101
 
102
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
103
        display       "Diagnostic serial port baud rate"
104
        flavor        data
105
        legal_values  9600 19200 38400 115200
106
        default_value 38400
107
        description   "
108
            This option selects the baud rate used for the diagnostic port.
109
            Note: this should match the value chosen for the GDB port if the
110
            diagnostic and GDB port are the same."
111
    }
112
 
113
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
114
        display       "GDB serial port baud rate"
115
        flavor        data
116
        legal_values  9600 19200 38400 115200
117
        default_value 38400
118
        description   "
119
            This option controls the baud rate used for the GDB connection."
120
    }
121
 
122
    cdl_option CYGSEM_HAL_ARM_PID_ANGEL_BOOT {
123
        display          "Support startup from Angel"
124
        default_value    0
125
        description      "
126
            The Angel monitor can be used for some simple initial bootstrap
127
            operations.  However, since Angel starts applications in user
128
            mode, the eCos startup code must jump through certain hoops
129
            to get started."
130
    }
131
 
132
    cdl_option CYGHWR_HAL_ARM_PID_DIAG_LEDS {
133
        display          "Enable use of PPx LEDs"
134
        default_value    0
135
        description      "
136
            The PID board has four LEDs labelled PP0-PP3. These can be
137
            controlled by eCos if jumpers 9-16 on LK11 are
138
            shorted. Note that this prevents the parallel port from
139
            being used. See the PID board manual for details.
140
 
141
            Enabling this option causes eCos to flash the LEDs during
142
            early board initialization. See vectors.S for
143
            details. Before calling cyg_start, PP0 is switched on,
144
            PP1-3 are switched off. The application code can use the
145
            function hal_diag_led() to control the LEDs after this
146
            point."
147
   }
148
 
149
 
150
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
151
        display      "Default console channel."
152
        flavor       data
153
        calculated   0
154
    }
155
 
156
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
157
        display      "Number of communication channels on the board"
158
        flavor       data
159
        calculated   2
160
    }
161
 
162
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
163
        display          "Debug serial port"
164
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
165
        flavor data
166
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
167
        default_value    0
168
        description      "
169
            The PID board has two serial ports. This option
170
            chooses which port will be used to connect to a host
171
            running GDB."
172
     }
173
 
174
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
175
         display          "Diagnostic serial port"
176
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
177
         flavor data
178
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
179
         default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
180
         description      "
181
            The PID board has two serial ports.  This option
182
            chooses which port will be used for diagnostic output."
183
     }
184
 
185
    # Real-time clock/counter specifics
186
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
187
        display       "Real-time clock constants"
188
        flavor        none
189
 
190
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
191
            display       "Real-time clock numerator"
192
            flavor        data
193
            default_value 1000000000
194
        }
195
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
196
            display       "Real-time clock denominator"
197
            flavor        data
198
            default_value 100
199
        }
200
        cdl_option CYGNUM_HAL_RTC_PERIOD {
201
            display       "Real-time clock period"
202
            flavor        data
203
           default_value 12500
204
        }
205
    }
206
 
207
    cdl_component CYGBLD_GLOBAL_OPTIONS {
208
        display "Global build options"
209
        flavor  none
210
        parent  CYGPKG_NONE
211
        description   "
212
            Global build options including control over
213
            compiler flags, linker flags and choice of toolchain."
214
 
215
 
216
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
217
            display "Global command prefix"
218
            flavor  data
219
            no_define
220
            default_value { "arm-eabi"}
221
            description "
222
                This option specifies the command prefix used when
223
                invoking the build tools."
224
        }
225
 
226
        cdl_option CYGBLD_GLOBAL_CFLAGS {
227
            display "Global compiler flags"
228
            flavor  data
229
            no_define
230
            default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
231
                        (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9" ? "-mcpu=arm9 " : "-mcpu=arm7tdmi ") .
232
                            " -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
233
            description   "
234
                This option controls the global compiler flags which
235
                are used to compile all packages by default.
236
                Individual packages may define options which override
237
                these global flags."
238
        }
239
 
240
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
241
            display "Global linker flags"
242
            flavor  data
243
            no_define
244
            default_value { CYGBLD_ARCH_LDFLAGS . (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9" ? "-mcpu=arm9 " : "-mcpu=arm7tdmi ") .
245
                                "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
246
            description   "
247
                This option controls the global linker flags. Individual
248
                packages may define options which override these global flags."
249
        }
250
 
251
        cdl_option CYGBLD_BUILD_GDB_STUBS {
252
            display "Build GDB stub ROM image"
253
            default_value 0
254
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
255
            requires { CYG_HAL_STARTUP == "ROM" }
256
            requires CYGSEM_HAL_ROM_MONITOR
257
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
258
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
259
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
260
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
261
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
262
            no_define
263
            description "
264
                This option enables the building of the GDB stubs for the
265
                board. The address of the ELF headers in the image are
266
                adjusted to ensure loading at an address in memory used
267
                by the flash tool."
268
 
269
            make -priority 320 {
270
                /bin/gdb_module.bin : /bin/gdb_module.img
271
                @mv $< $(<:.img=.elf)
272
                $(OBJCOPY) --strip-debug --change-addresses=0xFC060000 $(<:.img=.elf) $<
273
                $(OBJCOPY) -O binary $(<:.img=.elf) $@
274
            }
275
        }
276
 
277
        cdl_option CYGBLD_BUILD_FLASH_TOOL {
278
            display "Build flash programming tool"
279
            default_value 0
280
            requires { CYG_HAL_STARTUP == "RAM" }
281
            requires CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL == 1
282
            requires CYGPKG_LIBC
283
            requires CYGPKG_KERNEL
284
            no_define
285
            description "This option enables the building of the flash programming tool for copying the GDB stubs into flash memory."
286
            make -priority 320 {
287
                /bin/prog_flash.img : /src/prog_flash.c
288
                @sh -c "mkdir -p src $(dir $@)"
289
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/prog_flash.o $<
290
                @echo $@ ": \\" > $(notdir $@).deps
291
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
292
                @tail -n +2 deps.tmp >> $(notdir $@).deps
293
                @echo >> $(notdir $@).deps
294
                @rm deps.tmp
295
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/prog_flash.o
296
            }
297
        }
298
 
299
        cdl_option CYGBLD_BUILD_FLASH_TOOL_BE {
300
            display "Build flash programming tool for BE images on LE boards"
301
            default_value 0
302
            requires { CYG_HAL_STARTUP == "RAM" }
303
            requires CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL == 1
304
            requires CYGPKG_LIBC
305
            requires CYGPKG_KERNEL
306
            no_define
307
            description "This option enables the building of the flash
308
                         programming tool for copying the GDB stubs
309
                         into flash memory. The tool built by enabling
310
                         this option must be used when programming BE
311
                         images on LE boards."
312
            make -priority 320 {
313
                /bin/prog_flash_BE_image_LE_system.img : /src/prog_flash.c
314
                @sh -c "mkdir -p src $(dir $@)"
315
                $(CC) -DBE_IMAGE -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/prog_flash_be.o $<
316
                @echo $@ ": \\" > $(notdir $@).deps
317
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
318
                @tail -n +2 deps.tmp >> $(notdir $@).deps
319
                @echo >> $(notdir $@).deps
320
                @rm deps.tmp
321
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/prog_flash_be.o
322
            }
323
        }
324
    }
325
 
326
    cdl_component CYGHWR_MEMORY_LAYOUT {
327
        display "Memory layout"
328
        flavor data
329
        no_define
330
        calculated { CYG_HAL_STARTUP == "RAM" ? "arm_pid_ram" : \
331
                                                "arm_pid_rom" }
332
 
333
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
334
            display "Memory layout linker script fragment"
335
            flavor data
336
            no_define
337
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
338
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
339
                                                    "" }
340
        }
341
 
342
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
343
            display "Memory layout header file"
344
            flavor data
345
            no_define
346
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
347
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
348
                                                    "" }
349
        }
350
    }
351
 
352
 
353
    cdl_option CYGSEM_HAL_ROM_MONITOR {
354
        display       "Behave as a ROM monitor"
355
        flavor        bool
356
        default_value 0
357
        parent        CYGPKG_HAL_ROM_MONITOR
358
        requires      { CYG_HAL_STARTUP == "ROM" }
359
        description   "
360
            Enable this option if this program is to be used as a ROM monitor,
361
            i.e. applications will be loaded into RAM on the board, and this
362
            ROM monitor may process exceptions or interrupts generated from the
363
            application. This enables features such as utilizing a separate
364
            interrupt stack when exceptions are generated."
365
    }
366
 
367
    cdl_component CYGPKG_CYGMON_HAL_OPTIONS {
368
        display       "CygMon HAL options"
369
        flavor        none
370
        no_define
371
        parent        CYGPKG_CYGMON
372
        active_if     CYGPKG_CYGMON
373
        description   "
374
            This option also lists the target's requirements for a valid CygMon
375
            configuration."
376
 
377
 
378
        cdl_option CYGBLD_BUILD_CYGMON_BIN {
379
            display       "Build CygMon ROM binary image"
380
            active_if     CYGBLD_BUILD_CYGMON
381
            default_value 1
382
            no_define
383
            description "This option enables the conversion of the CygMon ELF
384
                         image to a binary image suitable for ROM programming."
385
 
386
            make -priority 325 {
387
                /bin/cygmon.bin : /bin/cygmon.elf
388
                $(OBJCOPY) --strip-debug --change-addresses=0xFC060000 $< $(@:.bin=.img)
389
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
390
                $(OBJCOPY) -O binary $< $@
391
            }
392
        }
393
    }
394
 
395
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
396
         display       "Work with a ROM monitor"
397
         flavor        booldata
398
         legal_values  { "Generic" "GDB_stubs" }
399
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
400
         parent        CYGPKG_HAL_ROM_MONITOR
401
         requires      { CYG_HAL_STARTUP == "RAM" }
402
         description   "
403
             Support can be enabled for different varieties of ROM monitor.
404
             This support changes various eCos semantics such as the encoding
405
             of diagnostic output, or the overriding of hardware interrupt
406
             vectors.
407
             Firstly there is \"Generic\" support which prevents the HAL
408
             from overriding the hardware vectors that it does not use, to
409
             instead allow an installed ROM monitor to handle them. This is
410
             the most basic support which is likely to be common to most
411
             implementations of ROM monitor.
412
             \"GDB_stubs\" provides support when GDB stubs are included in
413
             the ROM monitor or boot ROM."
414
     }
415
 
416
    # custom rule to create a shell script to execute SID
417
    make {
418
        /runsid : /include/pkgconf/hal_arm_pid.h
419
        @echo "arm-elf-sid CYGTST_SID_FLAGS \$$@" > $(notdir $@).tmp
420
        $(CC) -E -P -c -xc -undef -imacros $< -o $@ $(notdir $@).tmp
421
        @rm $(notdir $@).tmp
422
    }
423
 
424
    cdl_option CYGTST_SID_FLAGS {
425
        display "SID execution flags"
426
        flavor data
427
        default_value { CYGHWR_HAL_ARM_BIGENDIAN ? "--board=pid7t -EB" : "--board=pid7t -EL" }
428
    }
429
 
430
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
431
        display       "Redboot HAL options"
432
        flavor        none
433
        no_define
434
        parent        CYGPKG_REDBOOT
435
        active_if     CYGPKG_REDBOOT
436
        description   "
437
            This option lists the target's requirements for a valid Redboot
438
            configuration."
439
 
440
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
441
            display       "Build Redboot ROM binary image"
442
            active_if     CYGBLD_BUILD_REDBOOT
443
            default_value 1
444
            no_define
445
            description "This option enables the conversion of the Redboot ELF
446
                         image to a binary image suitable for ROM programming."
447
 
448
            make -priority 325 {
449
                /bin/redboot.bin : /bin/redboot.elf
450
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
451
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
452
                $(OBJCOPY) -O binary $< $@
453
            }
454
        }
455
    }
456
}

powered by: WebSVN 2.1.0

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