1 # ====================================================================
5 # ====================================================================
6 #####ECOSGPLCOPYRIGHTBEGIN####
7 ## -------------------------------------------
8 ## This file is part of eCos, the Embedded Configurable Operating System.
9 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
11 ## eCos is free software; you can redistribute it and/or modify it under
12 ## the terms of the GNU General Public License as published by the Free
13 ## Software Foundation; either version 2 or (at your option) any later version.
15 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
16 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 ## You should have received a copy of the GNU General Public License along
21 ## with eCos; if not, write to the Free Software Foundation, Inc.,
22 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
24 ## As a special exception, if other files instantiate templates or use macros
25 ## or inline functions from this file, or you compile this file and link it
26 ## with other works to produce a work based on this file, this file does not
27 ## by itself cause the resulting work to be covered by the GNU General Public
28 ## License. However the source code for this file must still be made available
29 ## in accordance with section (3) of the GNU General Public License.
31 ## This exception does not invalidate any other reasons why a work based on
32 ## this file might be covered by the GNU General Public License.
34 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
35 ## at http://sources.redhat.com/ecos/ecos-license/
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
39 cdl_package CYGPKG_HAL_ARM_TX53KARO {
40 display "Ka-Ro TX53 module"
41 parent CYGPKG_HAL_ARM_MX53
42 requires CYGINT_ISO_CTYPE
45 define_header hal_arm_tx53.h
47 This HAL platform package provides generic
48 support for the Ka-Ro electronics TX53 module."
51 implements CYGINT_HAL_DEBUG_GDB_STUBS
52 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
53 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
55 implements CYGHWR_HAL_ARM_SOC_UART1
56 implements CYGHWR_HAL_ARM_SOC_UART2
57 implements CYGHWR_HAL_ARM_SOC_UART3
58 implements CYGHWR_HAL_ARM_SOC_UART4
60 requires {CYGBLD_BUILD_REDBOOT == 1}
63 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
64 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_soc.h>"
65 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_tx53.h>"
66 puts $::cdl_system_header "#define CYGBLD_HAL_PLF_DEFS_H <cyg/hal/karo_tx53.h>"
67 puts $::cdl_header "#define HAL_PLATFORM_CPU \"Freescale i.MX53 based\""
68 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Ka-Ro TX53 processor module\""
69 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 3279"
70 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK tx53_program_new_stack"
73 cdl_component CYG_HAL_STARTUP {
74 display "Startup type"
76 default_value { "ROMRAM" }
77 legal_values { "ROMRAM" "RAM" }
79 define -file system.h CYG_HAL_STARTUP
81 The only startup type allowed is ROMRAM, since this will allow
82 the program to exist in ROM, but be copied to RAM during startup
83 which is required to boot from NAND flash."
86 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
87 display "Diagnostic serial port baud rate"
89 legal_values 9600 19200 38400 57600 115200
92 This option selects the baud rate used for the console port.
93 Note: this should match the value chosen for the GDB port if the
94 console and GDB port are the same."
97 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
98 display "GDB serial port baud rate"
100 legal_values 9600 19200 38400 57600 115200
103 This option selects the baud rate used for the GDB port.
104 Note: this should match the value chosen for the console port if the
105 console and GDB port are the same."
108 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
109 display "Number of communication channels on the TX53"
114 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
115 display "Debug serial port"
116 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
118 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
121 The TX53 provides access to five serial ports. This option
122 chooses which port will be used to connect to a host
126 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
127 display "Default console channel."
129 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
133 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
134 display "Console serial port"
135 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
137 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
138 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
140 The TX53 provides access to three serial ports. This option
141 chooses which port will be used for console output."
144 cdl_component CYGBLD_GLOBAL_OPTIONS {
145 display "Global build options"
149 Global build options including control over
150 compiler flags, linker flags and choice of toolchain."
155 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
156 display "Global command prefix"
159 default_value { "arm-cortexa8-linux-gnu" . (CYGBLD_ARM_EABI ? "eabi" : "") }
161 This option specifies the command prefix used when
162 invoking the build tools."
165 cdl_option CYGBLD_GLOBAL_CFLAGS {
166 display "Global compiler flags"
169 requires CYGBLD_INFRA_CFLAGS_WARNINGS_AS_ERRORS
170 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . \
171 (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . \
172 (CYGBLD_ARM_EABI ? "-mabi=aapcs-linux -msoft-float " : "-mabi=apcs-gnu ") . \
173 "-march=armv7-a -Wall -Wno-pointer-sign -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-exceptions -fvtable-gc -finit-priority -Werror -pipe" }
175 This option controls the global compiler flags which are used to
176 compile all packages by default. Individual packages may define
177 options which override these global flags."
180 cdl_option CYGBLD_GLOBAL_LDFLAGS {
181 display "Global linker flags"
184 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
186 This option controls the global linker flags. Individual
187 packages may define options which override these global flags."
191 cdl_component CYGPKG_HAL_ARM_TX53_OPTIONS {
192 display "Ka-Ro electronics TX53 module build options"
195 requires { CYGBLD_REDBOOT_FLASH_BOOT_OFFSET == 0 }
197 Package specific build options including control over
198 compiler flags used only in building this package,
199 and details of which tests are built."
201 cdl_option CYGNUM_HAL_ARM_TX53_SDRAM_SIZE {
204 legal_values { 0x40000000 0x20000000 }
205 default_value { 0x20000000 }
206 # This is what I would like to do, but define_proc currently does not allow for
207 # accessing variables
208 # display "SDRAM size in MiB"
209 # legal_values { 1024 512 }
210 # default_value { 1024 }
212 # puts $::cdl_header "#define CYGNUM_HAL_ARM_TX53_SDRAM_SIZE \
213 # [format "0x%08x" [expr $CYGNUM_HAL_ARM_TX53_SDRAM_SIZE * 1048576]]"
216 This option specifies the SDRAM size of the TX53 module."
219 cdl_option CYGNUM_HAL_ARM_TX53_CPU_CLK {
222 legal_values { 800 1000 }
223 default_value { 1000 }
225 This option specifies the CPU clock in MHz of the TX51 module."
228 cdl_option CYGOPT_HAL_ARM_TX53_DEBUG {
229 display "Enable low level debugging with LED"
231 default_value { false }
233 This option enables low level debugging by blink codes
237 cdl_option CYGPKG_HAL_ARM_TX53_CFLAGS_ADD {
238 display "Additional compiler flags"
243 This option modifies the set of compiler flags for
244 building the TX53 HAL. These flags are used in addition
245 to the set of global flags."
248 cdl_option CYGPKG_HAL_ARM_TX53_CFLAGS_REMOVE {
249 display "Suppressed compiler flags"
254 This option modifies the set of compiler flags for
255 building the TX53 HAL. These flags are removed from
256 the set of global flags if present."
259 cdl_option CYGHWR_MX53_LCD_LOGO {
260 display "Show a splash screen from the FIS partition: 'logo'"
261 active_if { CYGPKG_DEVS_IMX_IPU }
264 When this option is enabled, RedBoot will look for a flash partition
265 named 'logo' and display the contents of this partition as initial
267 compile mx53_fastlogo.c
271 cdl_component CYGHWR_MEMORY_LAYOUT {
272 display "Memory layout"
275 calculated { "arm_tx53_romram" }
277 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
278 display "Memory layout linker script fragment"
281 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
282 calculated { "<pkgconf/mlt_arm_tx53_romram.ldi>" }
285 cdl_option CYGHWR_MEMORY_LAYOUT_H {
286 display "Memory layout header file"
289 define -file system.h CYGHWR_MEMORY_LAYOUT_H
290 calculated { "<pkgconf/mlt_arm_tx53_romram.h>" }
294 cdl_option CYGSEM_HAL_ROM_MONITOR {
295 display "Behave as a ROM monitor"
298 parent CYGPKG_HAL_ROM_MONITOR
299 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
301 Enable this option if this program is to be used as a ROM monitor,
302 i.e. applications will be loaded into RAM on the TX53 module, and this
303 ROM monitor may process exceptions or interrupts generated from the
304 application. This enables features such as utilizing a separate
305 interrupt stack when exceptions are generated."
308 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
309 display "Work with a ROM monitor"
311 legal_values { "Generic" "GDB_stubs" }
312 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
313 parent CYGPKG_HAL_ROM_MONITOR
314 requires { CYG_HAL_STARTUP == "RAM" }
316 Support can be enabled for different varieties of ROM monitor.
317 This support changes various eCos semantics such as the encoding
318 of diagnostic output, or the overriding of hardware interrupt
320 Firstly there is \"Generic\" support which prevents the HAL
321 from overriding the hardware vectors that it does not use, to
322 instead allow an installed ROM monitor to handle them. This is
323 the most basic support which is likely to be common to most
324 implementations of ROM monitor.
325 \"GDB_stubs\" provides support when GDB stubs are included in
326 the ROM monitor or boot ROM."
329 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
330 display "Redboot HAL options"
333 parent CYGPKG_REDBOOT
334 active_if CYGPKG_REDBOOT
336 This option lists the target's requirements for a valid Redboot
339 compile -library=libextras.a redboot_cmds.c
341 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
342 display "Build Redboot ROM binary image"
343 active_if CYGBLD_BUILD_REDBOOT
346 description "This option enables the conversion of the Redboot ELF
347 image to a binary image suitable for ROM programming."
350 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
351 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
352 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
353 $(OBJCOPY) -O binary $< $@
354 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
359 cdl_component CYGPKG_REDBOOT_HAL_TX53_OPTIONS {
360 display "Redboot HAL variant options"
363 parent CYGPKG_REDBOOT
364 active_if CYGPKG_REDBOOT
367 requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0x70108000 }
369 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"