1 # ====================================================================
3 # hal_arm_arm9_innovator.cdl
5 # TI Innovator platform HAL package configuration data
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.
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.
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
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.
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.
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.
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####
43 # Author(s): Patrick Doyle <wpd@delcomsys.com>
44 # Contributors: Patrick Doyle <wpd@delcomsys.com>
47 #####DESCRIPTIONEND####
49 # ====================================================================
50 cdl_package CYGPKG_HAL_ARM_ARM9_INNOVATOR {
52 parent CYGPKG_HAL_ARM_ARM9
53 requires CYGPKG_HAL_ARM_ARM9_ARM925T
56 define_header hal_arm_arm9_innovator.h
58 This HAL platform package provides generic
59 support for the OMAP Innovator platform."
61 compile innovator_misc.c hal_diag.c
63 implements CYGINT_HAL_DEBUG_GDB_STUBS
64 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
68 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
69 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_arm9.h>"
70 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_arm9_innovator.h>"
71 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM9\""
72 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Innovator\""
73 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
74 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK innovator_program_new_stack"
75 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 234"
79 cdl_component CYG_HAL_STARTUP {
80 display "Startup type"
83 legal_values {"RAM" "ROM" }
85 define -file system.h CYG_HAL_STARTUP
87 When targetting the Innovator it is possible to build
88 the system for either RAM bootstrap or ROM bootstrap(s). Select
89 'RAM' when building programs to load into RAM using RedBoot.
90 Select 'ROM' when building a stand-alone application
91 which will be put into ROM, or for the special cases of
92 building the eCos GDB stubs or RedBoot."
94 cdl_option CYGPRI_HAL_ROM_MLT {
95 display "Memory Layout for ROM Startup"
97 legal_values {"FLASH" "SRAM"}
98 default_value {"FLASH"}
100 This option selects which memory layout file should be
101 used when configuring the Innovator for ROM startup.
102 The FLASH option selects the memory layout for an image
103 stored at the beginning of the FLASH. It should be
104 used almost all of the time.
106 The SRAM option is used to place the ROM image in
107 internal SRAM. It may be used in order to test startup
108 code without burning the code into FLASH first." }
111 # Both PLLs are in bypass mode on startup.
112 # FIXME: Add proper configury
113 cdl_option CYGNUM_HAL_ARM_INNOVATOR_CPU_CLOCK {
114 display "CPU bus speed"
116 calculated { 60000000 }
118 This is the actual CPU operating frequency. Someday you
119 might be able to change this here."
122 # cdl_option CYGNUM_HAL_ARM_INNOVATOR_PERIPHERAL_CLOCK {
123 # display "Peripheral bus speed"
125 # calculated { CYGNUM_HAL_ARM_INNOVATOR_CPU_CLOCK / 2 }
127 # This is the peripheral bus operating frequency
128 # (Traffic Controller)."
131 # cdl_option CYGNUM_HAL_ARM_INNOVATOR_TIMER_PRESCALE {
132 # display "Timer prescale"
134 # legal_values 0 to 255
137 # This is the prescale value used on the clock used to drive
138 # the kernel counter. Note that some parts of the code may fail
139 # if this is changed due to over/underflows of expressions."
142 # # Real-time clock/counter specifics
143 # cdl_component CYGNUM_HAL_RTC_CONSTANTS {
144 # display "Real-time clock constants. WARNING -- the Real Time Clock is not fully supported (if at all) yet."
148 # cdl_option CYGNUM_HAL_RTC_NUMERATOR {
149 # display "Real-time clock numerator"
151 # calculated 1000000000
153 # cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
154 # display "Real-time clock denominator"
158 # cdl_option CYGNUM_HAL_RTC_PERIOD {
159 # display "Real-time clock period"
162 ## calculated (CYGNUM_HAL_ARM_INNOVATOR_PERIPHERAL_CLOCK/(CYGNUM_HAL_ARM_INNOVATOR_TIMER_PRESCALE*CYGNUM_HAL_RTC_DENOMINATOR))-1
166 # cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
167 # display "Diagnostic serial port baud rate"
169 # legal_values 9600 19200 38400 57600 115200
170 # default_value 115200
172 # This option selects the baud rate used for the diagnostic port.
173 # Note: this should match the value chosen for the GDB port if the
174 # diagnostic and GDB port are the same."
177 # cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
178 # display "GDB serial port baud rate"
180 # legal_values 9600 19200 38400 57600 115200
181 # default_value 115200
183 # This option selects the baud rate used for the diagnostic port.
184 # Note: this should match the value chosen for the GDB port if the
185 # diagnostic and GDB port are the same."
188 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
189 display "Number of communication channels on the board"
194 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
195 display "Debug serial port"
196 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
198 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
201 The Innovator has two serial ports. When we add support
202 for the second one, you will be able to choose which one is
203 used to connect to a host running GDB."
206 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
207 display "Default console channel."
209 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
213 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
214 display "Diagnostic serial port"
215 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
217 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
218 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
220 The Innovator has two serial ports. When we add support
221 for the second one, you will be able to choose which one is
222 used for diagnostic output."
225 cdl_component CYGBLD_GLOBAL_OPTIONS {
226 display "Global build options"
230 Global build options including control over
231 compiler flags, linker flags and choice of toolchain."
236 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
237 display "Global command prefix"
240 default_value { "arm-elf" }
242 This option specifies the command prefix used when
243 invoking the build tools."
246 cdl_option CYGBLD_GLOBAL_CFLAGS {
247 display "Global compiler flags"
250 default_value { "-mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
252 This option controls the global compiler flags which are used to
253 compile all packages by default. Individual packages may define
254 options which override these global flags."
257 cdl_option CYGBLD_GLOBAL_LDFLAGS {
258 display "Global linker flags"
261 default_value { "--no-target-default-spec -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
263 This option controls the global linker flags. Individual
264 packages may define options which override these global flags."
267 cdl_option CYGBLD_BUILD_GDB_STUBS {
268 display "Build GDB stub ROM image"
270 requires { CYG_HAL_STARTUP == "ROM" }
271 requires CYGSEM_HAL_ROM_MONITOR
272 requires CYGBLD_BUILD_COMMON_GDB_STUBS
273 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
274 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
275 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
276 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
277 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
280 This option enables the building of the GDB stubs for the
281 board. The common HAL controls takes care of most of the
282 build process, but the final conversion from ELF image to
283 binary data is handled by the platform CDL, allowing
284 relocation of the data if necessary."
287 <PREFIX>/bin/gdb_module.srec : <PREFIX>/bin/gdb_module.img
288 $(OBJCOPY) --remove-section=.fixed_vectors $< gdb_module.tmp
293 cdl_component CYGPKG_HAL_ARM_ARM9_INNOVATOR_OPTIONS {
294 display "Innovator build options"
298 Package specific build options including control over
299 compiler flags used only in building this package,
300 and details of which tests are built."
303 cdl_option CYGPKG_HAL_ARM_ARM9_INNOVATOR_CFLAGS_ADD {
304 display "Additional compiler flags"
309 This option modifies the set of compiler flags for
310 building the Innovator HAL. These flags are
311 used in addition to the set of global flags."
314 cdl_option CYGPKG_HAL_ARM_ARM9_INNOVATOR_CFLAGS_REMOVE {
315 display "Suppressed compiler flags"
320 This option modifies the set of compiler flags for
321 building the Innovator HAL. These flags are
322 removed from the set of global flags if present."
325 cdl_option CYGPKG_HAL_ARM_ARM9_INNOVATOR_TESTS {
326 display "Innovator tests"
331 This option specifies the set of tests for the Innovator."
335 cdl_component CYGHWR_MEMORY_LAYOUT {
336 display "Memory layout"
339 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_arm9_innovator_ram" : \
340 "arm_arm9_innovator_rom" }
342 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
343 display "Memory layout linker script fragment"
346 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
347 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_arm9_innovator_ram.ldi>" : \
348 CYGPRI_HAL_ROM_MLT == "FLASH" ? "<pkgconf/mlt_arm_arm9_innovator_rom.ldi>" : \
349 "<pkgconf/mlt_arm_arm9_innovator_sram.ldi>" }
352 cdl_option CYGHWR_MEMORY_LAYOUT_H {
353 display "Memory layout header file"
356 define -file system.h CYGHWR_MEMORY_LAYOUT_H
357 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_arm9_innovator_ram.h>" : \
358 CYGPRI_HAL_ROM_MLT == "FLASH" ? "<pkgconf/mlt_arm_arm9_innovator_rom.h>" : \
359 "<pkgconf/mlt_arm_arm9_innovator_sram.h>" }
363 cdl_option CYGSEM_HAL_ROM_MONITOR {
364 display "Behave as a ROM monitor"
367 parent CYGPKG_HAL_ROM_MONITOR
368 requires { CYG_HAL_STARTUP == "ROM" }
370 Enable this option if this program is to be used as a ROM monitor,
371 i.e. applications will be loaded into RAM on the board, and this
372 ROM monitor may process exceptions or interrupts generated from the
373 application. This enables features such as utilizing a separate
374 interrupt stack when exceptions are generated."
377 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
378 display "Work with a ROM monitor"
380 legal_values { "GDB_stubs" }
381 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
382 parent CYGPKG_HAL_ROM_MONITOR
383 requires { CYG_HAL_STARTUP == "RAM" }
385 Support can be enabled for different varieties of ROM monitor.
386 This support changes various eCos semantics such as the encoding
387 of diagnostic output, or the overriding of hardware interrupt
389 \"GDB_stubs\" provides support when GDB stubs are included in
390 the ROM monitor or boot ROM."
393 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
394 display "Redboot HAL options"
397 parent CYGPKG_REDBOOT
398 active_if CYGPKG_REDBOOT
400 This option lists the target's requirements for a valid Redboot
404 requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0x10008000 }
406 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
409 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
410 display "Build Redboot ROM binary image"
411 active_if CYGBLD_BUILD_REDBOOT
414 description "This option enables the conversion of the Redboot ELF
415 image to the various relocated SREC images needed
418 compile -library=libextras.a redboot_cmds.c
421 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
422 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
423 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
424 $(OBJCOPY) -O binary $< $@