Mercurial > ecos
annotate packages/hal/powerpc/adder/current/cdl/hal_powerpc_adder.cdl @ 860:8e23fe1ac05e
Improve processor type support. Add baud rate generator allocation.
| author | gthomas |
|---|---|
| date | Sun, 23 Mar 2003 16:22:13 +0000 |
| parents | ed761349f500 |
| children | 725ba4e57f0c |
| rev | line source |
|---|---|
| 432 | 1 # ==================================================================== |
| 2 # | |
| 3 # hal_powerpc_adder.cdl | |
| 4 # | |
| 5 # PowerPC/ADDER 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. | |
|
860
8e23fe1ac05e
Improve processor type support. Add baud rate generator allocation.
gthomas
parents:
555
diff
changeset
|
12 ## Copyright (C) 2002, 2003 Gary Thomas |
| 432 | 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: hmt | |
| 46 # Contributors: gthomas | |
| 47 # Date: 1999-11-02 | |
| 48 # | |
| 49 #####DESCRIPTIONEND#### | |
| 50 # | |
| 51 # ==================================================================== | |
| 52 | |
| 53 cdl_package CYGPKG_HAL_POWERPC_ADDER { | |
| 54 display "A&M ADDER PowerPC evaluation board" | |
| 55 parent CYGPKG_HAL_POWERPC | |
| 56 requires CYGPKG_HAL_POWERPC_MPC8xx | |
| 57 define_header hal_powerpc_adder.h | |
| 58 include_dir cyg/hal | |
| 59 description " | |
| 60 The ADDER HAL package provides the support needed to run | |
| 61 eCos on a A&M ADDER board equipped with a PowerPC processor." | |
| 62 | |
| 63 compile hal_diag.c hal_aux.c adder.S | |
| 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 CYGNUM_HAL_QUICC_SMC2 | |
| 69 implements CYGNUM_HAL_QUICC_SCC3 | |
| 70 | |
|
860
8e23fe1ac05e
Improve processor type support. Add baud rate generator allocation.
gthomas
parents:
555
diff
changeset
|
71 requires { CYGHWR_HAL_POWERPC_MPC8XX == "850" } |
|
8e23fe1ac05e
Improve processor type support. Add baud rate generator allocation.
gthomas
parents:
555
diff
changeset
|
72 |
| 432 | 73 define_proc { |
| 74 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_powerpc_mpc8xx.h>" | |
| 75 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_adder.h>" | |
| 76 | |
| 77 puts $::cdl_header "#define HAL_PLATFORM_CPU \"PowerPC 850\"" | |
| 78 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"A&M ADDER\"" | |
| 79 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\"" | |
| 80 } | |
| 81 | |
| 82 cdl_component CYG_HAL_STARTUP { | |
| 83 display "Startup type" | |
| 84 flavor data | |
| 85 legal_values {"RAM" "ROM" "ROMRAM"} | |
| 86 default_value {"RAM"} | |
| 87 no_define | |
| 88 define -file system.h CYG_HAL_STARTUP | |
| 89 description " | |
| 90 This option is used to control where the application program will | |
| 91 run, either from RAM or ROM (flash) memory. ROM based applications | |
| 92 must be self contained, while RAM applications will typically assume | |
| 93 the existence of a debug environment, such as GDB stubs." | |
| 94 } | |
| 95 | |
| 96 cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED { | |
| 97 display "Development board clock speed (MHz)" | |
| 98 flavor data | |
| 99 legal_values { 47 } | |
| 100 default_value 47 | |
| 101 description " | |
| 102 ADDER Development Boards have various system clock speeds | |
| 103 depending on the processor fitted. Select the clock speed | |
| 104 appropriate for your board so that the system can set the serial | |
| 105 baud rate correctly, amongst other things." | |
| 106 } | |
| 107 | |
| 108 # Real-time clock/counter specifics | |
| 109 cdl_component CYGNUM_HAL_RTC_CONSTANTS { | |
| 110 display "Real-time clock constants." | |
| 111 description " | |
| 112 Period is busclock/16/100." | |
| 113 flavor none | |
| 114 | |
| 115 cdl_option CYGNUM_HAL_RTC_NUMERATOR { | |
| 116 display "Real-time clock numerator" | |
| 117 flavor data | |
| 118 calculated 1000000000 | |
| 119 } | |
| 120 cdl_option CYGNUM_HAL_RTC_DENOMINATOR { | |
| 121 display "Real-time clock denominator" | |
| 122 flavor data | |
| 123 calculated 100 | |
| 124 } | |
| 125 cdl_option CYGNUM_HAL_RTC_PERIOD { | |
| 126 display "Real-time clock period" | |
| 127 flavor data | |
| 128 calculated { ((((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/4)/16)/100) } | |
| 129 } | |
| 130 } | |
| 131 | |
| 132 cdl_component CYGBLD_GLOBAL_OPTIONS { | |
| 133 display "Global build options" | |
| 134 flavor none | |
| 135 description " | |
| 136 Global build options including control over | |
| 137 compiler flags, linker flags and choice of toolchain." | |
| 138 | |
| 139 | |
| 140 parent CYGPKG_NONE | |
| 141 | |
| 142 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX { | |
| 143 display "Global command prefix" | |
| 144 flavor data | |
| 145 no_define | |
| 146 default_value { "powerpc-eabi" } | |
| 147 description " | |
| 148 This option specifies the command prefix used when | |
| 149 invoking the build tools." | |
| 150 } | |
| 151 | |
| 152 cdl_option CYGBLD_GLOBAL_CFLAGS { | |
| 153 display "Global compiler flags" | |
| 154 flavor data | |
| 155 no_define | |
| 156 default_value { "-msoft-float -mcpu=860 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" } | |
| 157 description " | |
| 158 This option controls the global compiler flags which | |
| 159 are used to compile all packages by | |
| 160 default. Individual packages may define | |
| 161 options which override these global flags." | |
| 162 } | |
| 163 | |
| 164 cdl_option CYGBLD_GLOBAL_LDFLAGS { | |
| 165 display "Global linker flags" | |
| 166 flavor data | |
| 167 no_define | |
| 168 default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" } | |
| 169 description " | |
| 170 This option controls the global linker flags. Individual | |
| 171 packages may define options which override these global flags." | |
| 172 } | |
| 173 | |
| 174 cdl_option CYGBLD_BUILD_GDB_STUBS { | |
| 175 display "Build GDB stub ROM image" | |
| 176 default_value 0 | |
| 177 requires { CYG_HAL_STARTUP == "ROM" } | |
| 178 requires CYGSEM_HAL_ROM_MONITOR | |
| 179 requires CYGBLD_BUILD_COMMON_GDB_STUBS | |
| 180 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS | |
| 181 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT | |
| 182 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT | |
| 183 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT | |
| 184 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM | |
| 185 no_define | |
| 186 description " | |
| 187 This option enables the building of the GDB stubs for the | |
| 188 board. The common HAL controls takes care of most of the | |
| 189 build process, but the platform CDL takes care of creating | |
| 190 an S-Record data file suitable for programming using | |
| 191 the board's EPPC-Bug firmware monitor." | |
| 192 | |
| 193 make -priority 320 { | |
| 194 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img | |
| 195 $(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec) | |
| 196 $(OBJCOPY) -O binary $< $@ | |
| 197 } | |
| 198 } | |
| 199 } | |
| 200 | |
| 201 cdl_component CYGPKG_HAL_POWERPC_ADDER_OPTIONS { | |
| 202 display "ADDER build options" | |
| 203 flavor none | |
| 204 description " | |
| 205 Package specific build options including control over | |
| 206 compiler flags used only in building this package, | |
| 207 and details of which tests are built." | |
| 208 | |
| 209 | |
| 210 cdl_option CYGPKG_HAL_POWERPC_ADDER_CFLAGS_ADD { | |
| 211 display "Additional compiler flags" | |
| 212 flavor data | |
| 213 no_define | |
| 214 default_value { "" } | |
| 215 description " | |
| 216 This option modifies the set of compiler flags for | |
| 217 building the ADDER HAL. These flags are used in addition | |
| 218 to the set of global flags." | |
| 219 } | |
| 220 | |
| 221 cdl_option CYGPKG_HAL_POWERPC_ADDER_CFLAGS_REMOVE { | |
| 222 display "Suppressed compiler flags" | |
| 223 flavor data | |
| 224 no_define | |
| 225 default_value { "" } | |
| 226 description " | |
| 227 This option modifies the set of compiler flags for | |
| 228 building the ADDER HAL. These flags are removed from | |
| 229 the set of global flags if present." | |
| 230 } | |
| 231 | |
| 232 cdl_option CYGPKG_HAL_POWERPC_ADDER_TESTS { | |
| 233 display "ADDER tests" | |
| 234 flavor data | |
| 235 no_define | |
| 555 | 236 default_value { "" } |
| 432 | 237 description " |
| 238 This option specifies the set of tests for the ADDER HAL." | |
| 239 } | |
| 240 } | |
| 241 | |
| 242 cdl_component CYGHWR_MEMORY_LAYOUT { | |
| 243 display "Memory layout" | |
| 244 flavor data | |
| 245 no_define | |
| 246 calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_adder_ram" : \ | |
| 247 CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_adder_romram" : \ | |
| 248 "powerpc_adder_rom" } | |
| 249 | |
| 250 cdl_option CYGHWR_MEMORY_LAYOUT_LDI { | |
| 251 display "Memory layout linker script fragment" | |
| 252 flavor data | |
| 253 no_define | |
| 254 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI | |
| 255 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_adder_ram.ldi>" : \ | |
| 256 CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_powerpc_adder_romram.ldi>" : \ | |
| 257 "<pkgconf/mlt_powerpc_adder_rom.ldi>" } | |
| 258 } | |
| 259 | |
| 260 cdl_option CYGHWR_MEMORY_LAYOUT_H { | |
| 261 display "Memory layout header file" | |
| 262 flavor data | |
| 263 no_define | |
| 264 define -file system.h CYGHWR_MEMORY_LAYOUT_H | |
| 265 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_adder_ram.h>" : \ | |
| 266 CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_powerpc_adder_romram.h>" : \ | |
| 267 "<pkgconf/mlt_powerpc_adder_rom.h>" } | |
| 268 } | |
| 269 } | |
| 270 | |
| 271 cdl_option CYGSEM_HAL_ROM_MONITOR { | |
| 272 display "Behave as a ROM monitor" | |
| 273 flavor bool | |
| 274 default_value 0 | |
| 275 parent CYGPKG_HAL_ROM_MONITOR | |
| 276 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" } | |
| 277 description " | |
| 278 Enable this option if this program is to be used as a ROM monitor, | |
| 279 i.e. applications will be loaded into RAM on the board, and this | |
| 280 ROM monitor may process exceptions or interrupts generated from the | |
| 281 application. This enables features such as utilizing a separate | |
| 282 interrupt stack when exceptions are generated." | |
| 283 } | |
| 284 | |
| 285 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS { | |
| 286 display "Redboot HAL options" | |
| 287 flavor none | |
| 288 no_define | |
| 289 parent CYGPKG_REDBOOT | |
| 290 active_if CYGPKG_REDBOOT | |
| 291 description " | |
| 292 This option lists the target's requirements for a valid Redboot | |
| 293 configuration." | |
| 294 | |
| 295 cdl_option CYGSEM_REDBOOT_HAL_LINUX_BOOT { | |
| 296 active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC | |
| 297 display "Support booting Linux via RedBoot" | |
| 298 flavor bool | |
| 299 default_value 1 | |
| 300 description " | |
| 301 This option enables RedBoot to support booting of a Linux kernel." | |
| 302 | |
| 303 compile -library=libextras.a redboot_linux_exec.c | |
| 304 } | |
| 305 | |
| 306 cdl_option CYGBLD_BUILD_REDBOOT_BIN { | |
| 307 display "Build Redboot ROM binary image" | |
| 308 active_if CYGBLD_BUILD_REDBOOT | |
| 309 default_value 1 | |
| 310 no_define | |
| 311 description "This option enables the conversion of the Redboot ELF | |
| 312 image to a binary image suitable for ROM programming." | |
| 313 | |
| 314 # compile -library=libextras.a redboot_cmds.c | |
| 315 | |
| 316 make -priority 325 { | |
| 317 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf | |
| 318 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) | |
| 319 $(OBJCOPY) -O srec $< $(@:.bin=.srec) | |
| 320 $(OBJCOPY) -O binary $< $@ | |
| 321 } | |
| 322 } | |
| 323 } | |
| 324 } |
