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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [sa11x0/] [nano/] [v2_0/] [cdl/] [hal_arm_sa11x0_nano.cdl] - Blame information for rev 565

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

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_arm_sa11x0_nano.cdl
4
#
5
#      ARM SA1110/nanoEngine 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 Red Hat, 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 version.
16
##
17
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
## for more details.
21
##
22
## You should have received a copy of the GNU General Public License along
23
## with eCos; if not, write to the Free Software Foundation, Inc.,
24
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25
##
26
## As a special exception, if other files instantiate templates or use macros
27
## or inline functions from this file, or you compile this file and link it
28
## with other works to produce a work based on this file, this file does not
29
## by itself cause the resulting work to be covered by the GNU General Public
30
## License. However the source code for this file must still be made available
31
## in accordance with section (3) of the GNU General Public License.
32
##
33
## This exception does not invalidate any other reasons why a work based on
34
## this file might be covered by the GNU General Public License.
35
##
36
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37
## at http://sources.redhat.com/ecos/ecos-license/
38
## -------------------------------------------
39
#####ECOSGPLCOPYRIGHTEND####
40
# ====================================================================
41
######DESCRIPTIONBEGIN####
42
#
43
# Author(s):      gthomas
44
# Original data:  gthomas
45
# Contributors:   hmt
46
# Date:           2001-02-12
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
cdl_package CYGPKG_HAL_ARM_SA11X0_NANO {
52
    display       "ARM SA1110/nanoEngine evaluation board"
53
    parent        CYGPKG_HAL_ARM_SA11X0
54
    hardware
55
    include_dir   cyg/hal
56
    define_header hal_arm_sa11x0_nano.h
57
    description   "
58
        This HAL platform package provides
59
        support for the Intel StrongARM SA1110 based evalation board,
60
        made by Bright Star Engineering (BSE), known as 'nanoEngine'."
61
 
62
    compile       nano_misc.c
63
 
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
65
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67
    implements    CYGINT_HAL_ARM_MEM_REAL_REGION_TOP
68
 
69
    implements    CYGHWR_HAL_ARM_SA11X0_UART1
70
    implements    CYGHWR_HAL_ARM_SA11X0_UART3
71
 
72
    define_proc {
73
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
74
        puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  "
75
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
76
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"StrongARM 1110\""
77
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"nanoEngine\""
78
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"by Bright Star Engineering\""
79
        puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK nano_program_new_stack"
80
    }
81
 
82
    cdl_component CYG_HAL_STARTUP {
83
        display       "Startup type"
84
        flavor        data
85
        default_value {"RAM"}
86
        legal_values  {"RAM" "ROM"}
87
        no_define
88
        define -file system.h CYG_HAL_STARTUP
89
        description   "
90
           When targetting the nanoEngine it is possible to build
91
           the system for either RAM bootstrap or ROM bootstrap(s). Select
92
           'ram' when building programs to load into RAM using eCos GDB
93
           stubs.  Select 'rom' when building a stand-alone application
94
           which will be put into ROM, or for the special case of
95
           building the eCos GDB stubs themselves."
96
 
97
        cdl_component CYGBLD_HAL_STARTUP_ROM_POST_BEFORE_ECOS {
98
            display "POST code exists at base of flash"
99
            active_if  { CYG_HAL_STARTUP == "ROM" }
100
            calculated 1 ; # REQUIRED for BSE BOOT PROM
101
            description "
102
            To accommodate POST (power-on self-test) code,
103
            or other preboot loader code such as the BSE nanoEngine Firmware,
104
            in the start of
105
            the flash, that is run at startup, we can link RedBoot (or any
106
            ROM start eCos application) for a higher address, specifically
107
            256kBytes higher than usual in this case."
108
 
109
            cdl_option CYGBLD_HAL_STARTUP_ROM_POST_OMIT_SDRAM_INIT {
110
                display "Omit SDRAM initialization if already set up"
111
                calculated 1 ; # REQUIRED for BSE BOOT PROM
112
                description "
113
            POST code will likely already initialize SDRAM.  This option
114
            enables code that omits SDRAM initialization, if it appears
115
            already to be set up."
116
            }
117
        }
118
    }
119
 
120
 
121
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
122
        display       "Diagnostic serial port baud rate"
123
        flavor        data
124
        legal_values  9600 19200 38400 115200
125
        default_value 38400 ; # BUT BSE BOOT PROM IS 9600
126
        description   "
127
            This option selects the baud rate used for the diagnostic port.
128
            Note: this should match the value chosen for the GDB port if the
129
            diagnostic and GDB port are the same."
130
    }
131
 
132
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
133
        display       "GDB serial port baud rate"
134
        flavor        data
135
        legal_values  9600 19200 38400 115200
136
        default_value 38400 ; # BUT BSE BOOT PROM IS 9600
137
        description   "
138
            This option selects the baud rate used for the diagnostic port.
139
            Note: this should match the value chosen for the GDB port if the
140
            diagnostic and GDB port are the same."
141
    }
142
 
143
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
144
        display      "Number of communication channels on the board"
145
        flavor       data
146
        calculated   2
147
        description "
148
            Channel 1 is the little 6-way phone socket, connected to UART3.
149
            Channel 0 is the little 6-way phone socket, connected to UART1.
150
            Channel 0 is nearest the power socket and reset button.
151
            Channel 0 is the default for all serial I/O."
152
    }
153
 
154
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
155
        display          "Debug serial port"
156
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
157
        flavor data
158
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
159
        default_value    0
160
        description      "
161
            The nanoEngine board has two serial ports. This option
162
            chooses which port will be used to connect to a host
163
            running GDB."
164
    }
165
 
166
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
167
        display      "Default console channel."
168
        flavor       data
169
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
170
        calculated   0
171
    }
172
 
173
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
174
        display          "Diagnostic serial port"
175
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
176
        flavor data
177
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
178
        default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
179
        description      "
180
        The nanoEngine board has two serial ports.  This option
181
        chooses which port will be used for diagnostic output."
182
    }
183
 
184
    cdl_component CYGBLD_GLOBAL_OPTIONS {
185
        display "Global build options"
186
        flavor  none
187
        no_define
188
        description   "
189
            Global build options including control over
190
            compiler flags, linker flags and choice of toolchain."
191
 
192
 
193
        parent  CYGPKG_NONE
194
 
195
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
196
            display "Global command prefix"
197
            flavor  data
198
            no_define
199
            default_value { "arm-elf" }
200
            description "
201
                This option specifies the command prefix used when
202
                invoking the build tools."
203
        }
204
 
205
        cdl_option CYGBLD_GLOBAL_CFLAGS {
206
            display "Global compiler flags"
207
            flavor  data
208
            no_define
209
            default_value { "-mcpu=strongarm1100 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
210
            description   "
211
                This option controls the global compiler flags which are used to
212
                compile all packages by default. Individual packages may define
213
                options which override these global flags."
214
        }
215
 
216
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
217
            display "Global linker flags"
218
            flavor  data
219
            no_define
220
            default_value { "-Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
221
            description   "
222
                This option controls the global linker flags. Individual
223
                packages may define options which override these global flags."
224
        }
225
 
226
        cdl_option CYGBLD_BUILD_GDB_STUBS {
227
            display "Build GDB stub ROM image"
228
            default_value 0
229
            requires { CYG_HAL_STARTUP == "ROM" }
230
            requires CYGSEM_HAL_ROM_MONITOR
231
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
232
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
233
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
234
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
235
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
236
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
237
            no_define
238
            description "
239
                This option enables the building of the GDB stubs for the
240
                board. The common HAL controls takes care of most of the
241
                build process, but the final conversion from ELF image to
242
                binary data is handled by the platform CDL, allowing
243
                relocation of the data if necessary."
244
 
245
            make -priority 320 {
246
                /bin/gdb_module.bin : /bin/gdb_module.img
247
                $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
248
            }
249
        }
250
    }
251
 
252
    cdl_component CYGPKG_HAL_ARM_SA11X0_NANO_OPTIONS {
253
        display "StrongARM SA1110/BRIGHTSTAR NANOENGINE build options"
254
        flavor  none
255
        no_define
256
        description   "
257
            Package specific build options including control over
258
            compiler flags used only in building this package,
259
            and details of which tests are built."
260
 
261
 
262
        cdl_option CYGPKG_HAL_ARM_SA11X0_NANO_CFLAGS_ADD {
263
            display "Additional compiler flags"
264
            flavor  data
265
            no_define
266
            default_value { "" }
267
            description   "
268
                This option modifies the set of compiler flags for
269
                building the StrongARM nanoEngine HAL. These flags are used in addition
270
                to the set of global flags."
271
        }
272
 
273
        cdl_option CYGPKG_HAL_ARM_SA11X0_NANO_CFLAGS_REMOVE {
274
            display "Suppressed compiler flags"
275
            flavor  data
276
            no_define
277
            default_value { "" }
278
            description   "
279
                This option modifies the set of compiler flags for
280
                building the StrongARM nanoEngine HAL. These flags are removed from
281
                the set of global flags if present."
282
        }
283
 
284
        cdl_option CYGPKG_HAL_ARM_SA11X0_NANO_TESTS {
285
            display "StrongARM SA1110/nanoEngine tests"
286
            flavor  data
287
            no_define
288
#            calculated { "tests/dram-test" }
289
            calculated { "" }
290
            description   "
291
                This option specifies the set of tests for the StrongARM nanoEngine HAL."
292
        }
293
    }
294
 
295
    cdl_component CYGHWR_MEMORY_LAYOUT {
296
        display "Memory layout"
297
        flavor data
298
        no_define
299
        calculated { CYG_HAL_STARTUP == "RAM" ? "arm_sa11x0_nano_ram" : \
300
      CYGBLD_HAL_STARTUP_ROM_POST_BEFORE_ECOS ? "arm_sa11x0_nano_post" : \
301
                                                "arm_sa11x0_nano_rom" }
302
 
303
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
304
            display "Memory layout linker script fragment"
305
            flavor data
306
            no_define
307
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
308
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
309
          CYGBLD_HAL_STARTUP_ROM_POST_BEFORE_ECOS ? "" : \
310
                                                    "" }
311
        }
312
 
313
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
314
            display "Memory layout header file"
315
            flavor data
316
            no_define
317
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
318
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
319
          CYGBLD_HAL_STARTUP_ROM_POST_BEFORE_ECOS ? "" : \
320
                                                    "" }
321
        }
322
    }
323
 
324
    cdl_option CYGSEM_HAL_ROM_MONITOR {
325
        display       "Behave as a ROM monitor"
326
        flavor        bool
327
        default_value 0
328
        parent        CYGPKG_HAL_ROM_MONITOR
329
        requires      { CYG_HAL_STARTUP == "ROM" }
330
        description   "
331
            Enable this option if this program is to be used as a ROM monitor,
332
            i.e. applications will be loaded into RAM on the board, and this
333
            ROM monitor may process exceptions or interrupts generated from the
334
            application. This enables features such as utilizing a separate
335
            interrupt stack when exceptions are generated."
336
    }
337
 
338
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
339
         display       "Work with a ROM monitor"
340
         flavor        booldata
341
         legal_values  { "Generic" "GDB_stubs" }
342
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
343
         parent        CYGPKG_HAL_ROM_MONITOR
344
         requires      { CYG_HAL_STARTUP == "RAM" }
345
         description   "
346
             Support can be enabled for different varieties of ROM monitor.
347
             This support changes various eCos semantics such as the encoding
348
             of diagnostic output, or the overriding of hardware interrupt
349
             vectors.
350
             Firstly there is \"Generic\" support which prevents the HAL
351
             from overriding the hardware vectors that it does not use, to
352
             instead allow an installed ROM monitor to handle them. This is
353
             the most basic support which is likely to be common to most
354
             implementations of ROM monitor.
355
             \"GDB_stubs\" provides support when GDB stubs are included in
356
             the ROM monitor or boot ROM."
357
     }
358
 
359
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
360
        display       "Redboot HAL options"
361
        flavor        none
362
        no_define
363
        parent        CYGPKG_REDBOOT
364
        active_if     CYGPKG_REDBOOT
365
        description   "
366
            This option lists the target's requirements for a valid Redboot
367
            configuration."
368
 
369
        # compile -library=libextras.a redboot_cmds.c
370
 
371
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
372
            display       "Build Redboot ROM binary image"
373
            active_if     CYGBLD_BUILD_REDBOOT
374
            default_value 1
375
            no_define
376
            description "This option enables the conversion of the Redboot ELF
377
                         image to a binary image suitable for ROM programming."
378
 
379
            make -priority 325 {
380
                /bin/redboot.bin : /bin/redboot.elf
381
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
382
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
383
                $(OBJCOPY) -O binary $< $@
384
            }
385
        }
386
    }
387
 
388
}

powered by: WebSVN 2.1.0

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