1 # ====================================================================
3 # hal_arm_arm9_smdk2410.cdl
5 # Samsung ARM9/SMDK2410 evaluation board 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): michael anburaj <michaelanburaj@hotmail.com>
44 # Contributors: michael anburaj <michaelanburaj@hotmail.com>
47 #####DESCRIPTIONEND####
49 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_ARM9_SMDK2410 {
52 display "Samsung ARM9/SMDK2410 development board"
53 parent CYGPKG_HAL_ARM_ARM9
54 requires CYGPKG_HAL_ARM_ARM9_ARM920T
57 define_header hal_arm_arm9_smdk2410.h
59 The SMDK2410 HAL package provides the support needed to run eCos on Samsung
60 S3C2410X (ARM920T) based boards."
62 compile smdk2410_misc.c hal_diag.c
64 implements CYGINT_HAL_DEBUG_GDB_STUBS
65 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
70 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_arm9.h>"
71 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_arm9_smdk2410.h>"
72 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM9\""
73 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"SMDK2410 system\""
74 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
76 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 106"
79 cdl_component CYG_HAL_STARTUP {
80 display "Startup type"
82 legal_values { "RAM" "ROM" "ROMRAM" }
83 default_value { "RAM" }
85 define -file system.h CYG_HAL_STARTUP
87 When targetting the SMDK2410 evaluation board 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 eCos GDB stubs.
90 Select 'rom' when building a stand-alone application which will be
91 put into ROM, or for the special case of building the eCos GDB stubs
95 # Both PLLs are in bypass mode on startup.
96 # FIXME: Add proper configury
97 cdl_option CYGNUM_HAL_ARM_SMDK2410_CPU_CLOCK {
100 legal_values 176000000 180000000 184000000 192000000 200000000
101 default_value { 184000000 }
103 This is the actual CPU operating frequency (FCLK)."
106 cdl_option CYGNUM_HAL_ARM_SMDK2410_BUS_CLOCK {
107 display "ARM920T bus speed"
109 calculated { CYGNUM_HAL_ARM_SMDK2410_CPU_CLOCK / 2 }
111 This is the ARM920T AHB bus operating frequency (HCLK)."
114 cdl_option CYGNUM_HAL_ARM_SMDK2410_PERIPHERAL_CLOCK {
115 display "Peripheral bus speed"
117 calculated { CYGNUM_HAL_ARM_SMDK2410_CPU_CLOCK / 4 }
119 This is the peripheral (APB) bus operating frequency (PCLK)."
122 cdl_option CYGNUM_HAL_ARM_SMDK2410_TIMER_PRESCALE {
123 display "Timer prescale"
125 legal_values 0 to 255
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."
133 # Real-time clock/counter specifics
134 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
135 display "Real-time clock constants"
139 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
140 display "Real-time clock numerator"
142 calculated 1000000000
144 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
145 display "Real-time clock denominator"
149 cdl_option CYGNUM_HAL_RTC_PERIOD {
150 display "Real-time clock period"
152 calculated ((CYGNUM_HAL_ARM_SMDK2410_PERIPHERAL_CLOCK/CYGNUM_HAL_ARM_SMDK2410_TIMER_PRESCALE/2)/CYGNUM_HAL_RTC_DENOMINATOR)
154 Assuming 1/2 post prescale divider."
158 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
159 display "Diagnostic serial port baud rate"
161 legal_values 9600 19200 38400 57600 115200
164 This option selects the baud rate used for the diagnostic port.
165 Note: this should match the value chosen for the GDB port if the
166 diagnostic and GDB port are the same."
169 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
170 display "GDB serial port baud rate"
172 legal_values 9600 19200 38400 57600 115200
175 This option selects the baud rate used for the diagnostic port.
176 Note: this should match the value chosen for the GDB port if the
177 diagnostic and GDB port are the same."
180 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
181 display "Number of communication channels on the board"
186 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
187 display "Default console channel."
189 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
193 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
194 display "Debug serial port"
195 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
197 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
200 The SMDK2410 boards have two serial ports. This option
201 chooses which port will be used to connect to a host
205 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
206 display "Diagnostic serial port"
207 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
209 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
210 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
212 The SMDK2410 boards have two serial ports. This option
213 chooses which port will be used for diagnostic output."
216 cdl_component CYGBLD_GLOBAL_OPTIONS {
217 display "Global build options"
221 Global build options including control over
222 compiler flags, linker flags and choice of toolchain."
226 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
227 display "Global command prefix"
230 default_value { "arm-elf" }
232 This option specifies the command prefix used when
233 invoking the build tools."
236 cdl_option CYGBLD_GLOBAL_CFLAGS {
237 display "Global compiler flags"
240 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" }
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."
247 cdl_option CYGBLD_GLOBAL_LDFLAGS {
248 display "Global linker flags"
251 default_value { "--no-target-default-spec -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
253 This option controls the global linker flags. Individual
254 packages may define options which override these global flags."
257 cdl_option CYGBLD_BUILD_GDB_STUBS {
258 display "Build GDB stub ROM image"
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
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."
277 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
278 $(OBJCOPY) -O binary $< $@
284 cdl_component CYGPKG_HAL_ARM_ARM9_SMDK2410_OPTIONS {
285 display "ARM9/SMDK2410 build options"
289 Package specific build options including control over
290 compiler flags used only in building this package,
291 and details of which tests are built."
293 cdl_option CYGPKG_HAL_ARM_ARM9_SMDK2410_CFLAGS_ADD {
294 display "Additional compiler flags"
299 This option modifies the set of compiler flags for
300 building the ARM9 SMDK2410 HAL. These flags are used in addition
301 to the set of global flags."
304 cdl_option CYGPKG_HAL_ARM_ARM9_SMDK2410_CFLAGS_REMOVE {
305 display "Suppressed compiler flags"
310 This option modifies the set of compiler flags for
311 building the ARM9 SMDK2410 HAL. These flags are removed from
312 the set of global flags if present."
315 cdl_option CYGPKG_HAL_ARM_ARM9_SMDK2410_TESTS {
316 display "ARM9/SMDK2410 tests"
321 This option specifies the set of tests for the ARM9/SMDK2410 HAL."
325 cdl_component CYGHWR_MEMORY_LAYOUT {
326 display "Memory layout"
329 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_arm9_smdk2410_ram" : \
330 CYG_HAL_STARTUP == "ROM" ? "arm_arm9_smdk2410_rom" : \
331 "arm_arm9_smdk2410_romram" }
333 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
334 display "Memory layout linker script fragment"
337 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
338 calculated {CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_arm9_smdk2410_ram.ldi>" : \
339 CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_arm9_smdk2410_rom.ldi>" : \
340 "<pkgconf/mlt_arm_arm9_smdk2410_romram.ldi>" }
343 cdl_option CYGHWR_MEMORY_LAYOUT_H {
344 display "Memory layout header file"
347 define -file system.h CYGHWR_MEMORY_LAYOUT_H
348 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_arm9_smdk2410_ram.h>" : \
349 CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_arm9_smdk2410_rom.h>" : \
350 "<pkgconf/mlt_arm_arm9_smdk2410_romram.h>" }
354 cdl_option CYGSEM_HAL_ROM_MONITOR {
355 display "Behave as a ROM monitor"
358 parent CYGPKG_HAL_ROM_MONITOR
359 requires { (CYG_HAL_STARTUP == "ROM") || (CYG_HAL_STARTUP == "ROMRAM") }
361 Enable this option if this program is to be used as a ROM monitor,
362 i.e. applications will be loaded into RAM on the board, and this
363 ROM monitor may process exceptions or interrupts generated from the
364 application. This enables features such as utilizing a separate
365 interrupt stack when exceptions are generated."
368 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
369 display "Work with a ROM monitor"
371 legal_values { "GDB_stubs" }
372 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
373 parent CYGPKG_HAL_ROM_MONITOR
374 requires { CYG_HAL_STARTUP == "RAM" }
376 Support can be enabled for different varieties of ROM monitor.
377 This support changes various eCos semantics such as the encoding
378 of diagnostic output, or the overriding of hardware interrupt
380 \"GDB_stubs\" provides support when GDB stubs are included in
381 the ROM monitor or boot ROM."
384 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
385 display "Redboot HAL options"
388 parent CYGPKG_REDBOOT
389 active_if CYGPKG_REDBOOT
391 This option lists the target's requirements for a valid Redboot
394 # The backup image is not needed, since ROMRAM is the normal
395 # RedBoot startup type.
396 requires {!CYGPKG_REDBOOT_FLASH || CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP == 0}
399 requires { CYGPKG_REDBOOT_ARM_LINUX_EXEC }
400 requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0x00008000 }
402 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
405 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
406 display "Build Redboot ROM binary image"
407 active_if CYGBLD_BUILD_REDBOOT
410 description "This option enables the conversion of the Redboot ELF
411 image to a binary image suitable for ROM programming."
414 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
415 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
416 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
417 $(OBJCOPY) -O binary $< $@