1 # ====================================================================
3 # hal_mn10300_am33_asb.cdl
5 # AM33-2/ASB 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####
44 # Original data: nick, bartv
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_MN10300_AM33_ASB {
53 display "Panasonic ASB2303 Evaluation Board"
54 parent CYGPKG_HAL_MN10300
55 requires CYGPKG_HAL_MN10300_AM33
56 requires { CYGHWR_HAL_MN10300_AM33_REVISION == 2 }
57 define_header hal_mn10300_am33_asb.h
60 The ASB HAL package should be used when targetting the
61 actual hardware for the Panasonic ASB2303 Evaluation Board
62 with the MN103E010 microcontroller."
64 compile hal_diag.c plf_stub.c plf_misc.c
66 implements CYGINT_HAL_DEBUG_GDB_STUBS
67 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
68 implements CYGINT_HAL_MN10300_MEM_REAL_REGION_TOP
70 requires CYGSEM_HAL_UNCACHED_FLASH_ACCESS == 1;
73 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_mn10300_am33.h>"
74 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mn10300_am33_asb.h>"
75 puts $::cdl_system_header "#define HAL_PLATFORM_BOARD \"Panasonic ASB2303\""
76 puts $::cdl_system_header "#define HAL_PLATFORM_EXTRA \"\""
77 puts $::cdl_system_header "#define HAL_PLATFORM_CPU \"MN103E010 AM33/2.0\""
78 puts $::cdl_system_header "#define HAL_PLATFORM_SERIAL1_FIRST"
81 cdl_component CYG_HAL_STARTUP {
82 display "Startup type"
84 legal_values {"RAM" "ROM"}
87 define -file system.h CYG_HAL_STARTUP
89 Currently only ROM startup type is supported."
92 cdl_component CYG_HAL_ROM_SLOT {
93 display "ROM slot in which residing"
95 legal_values {"BootPROM" "SysFlash"}
96 default_value {"BootPROM"}
98 define -file system.h CYG_HAL_ROM_SLOT
100 This specifies which ROM slot the program resides in (and is booted
104 cdl_option CYG_HAL_FULL_RAM {
105 display "Use all of RAM for RAM startup"
109 This specifies whether or not RAM startup configurations use all of
110 RAM. This should be true when using the MEI debugger to load the RAM
111 startup program when no monitor is installed on the board."
114 cdl_option CYGHWR_HAL_MN10300_PROCESSOR_OSC_DEFAULT {
115 display "Processor clock rate"
120 cdl_option CYGHWR_HAL_MN10300_PLATFORM_VSR_TABLE_BASE {
121 display "ASB2303 VSR table base address"
123 default_value 0x8C000000
125 Base address of the VSR table on ASB2303 board."
128 cdl_component CYGBLD_GLOBAL_OPTIONS {
129 display "Global build options"
133 Global build options including control over
134 compiler flags, linker flags and choice of toolchain."
137 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
138 display "Global command prefix"
141 default_value { "mn10300-elf" }
143 This option specifies the command prefix used when
144 invoking the build tools."
147 cdl_option CYGBLD_GLOBAL_CFLAGS {
148 display "Global compiler flags"
151 default_value { "-mam33-2 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -Wp,-Wno-paste -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
153 This option controls the global compiler flags which
154 are used to compile all packages by
155 default. Individual packages may define
156 options which override these global flags."
159 cdl_option CYGBLD_GLOBAL_LDFLAGS {
160 display "Global linker flags"
163 default_value { "-mam33-2 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
165 This option controls the global linker flags. Individual
166 packages may define options which override these global flags."
169 cdl_option CYGBLD_BUILD_GDB_STUBS {
170 display "Build GDB stub ROM image"
172 requires { CYG_HAL_STARTUP == "ROM" }
173 requires CYGSEM_HAL_ROM_MONITOR
174 requires CYGBLD_BUILD_COMMON_GDB_STUBS
175 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
176 requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
177 requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
178 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
179 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
182 This option enables the building of the GDB stubs for the
183 board. The common HAL controls takes care of most of the
184 build process, but the final conversion from ELF image to
185 binary data is handled by the platform CDL, allowing
186 relocation of the data if necessary."
189 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
190 $(OBJCOPY) -O binary $< $@
195 cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
196 display "Number of breakpoints supported by the HAL."
200 This option determines the number of breakpoints supported by the HAL."
203 cdl_option CYGSEM_HAL_AM33_PLF_USES_SERIAL0 {
204 display "ASB2303 uses AM33 SERIAL0"
208 Enable this option if AM33 SERIAL0 is to be used as a virtual vector
209 communications channel."
212 cdl_option CYGSEM_HAL_AM33_PLF_USES_SERIAL1 {
213 display "ASB2303 uses AM33 SERIAL1"
217 Enable this option if AM33 SERIAL1 is to be used as a virtual vector
218 communications channel."
221 cdl_component CYGHWR_MEMORY_LAYOUT {
222 display "Memory layout"
225 calculated { CYG_HAL_STARTUP == "RAM" ? \
226 CYG_HAL_FULL_RAM ? "mn10300_am33_asb_fullram" : \
227 "mn10300_am33_asb_ram" : \
228 CYG_HAL_ROM_SLOT == "BootPROM" ? "mn10300_am33_asb_rom" : \
229 "mn10300_am33_asb_flash" }
231 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
232 display "Memory layout linker script fragment"
235 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
236 calculated { CYG_HAL_STARTUP == "RAM" ? \
237 CYG_HAL_FULL_RAM ? "<pkgconf/mlt_mn10300_am33_asb_fullram.ldi>" : \
238 "<pkgconf/mlt_mn10300_am33_asb_ram.ldi>" : \
239 CYG_HAL_ROM_SLOT == "BootPROM" ? "<pkgconf/mlt_mn10300_am33_asb_rom.ldi>" : \
240 "<pkgconf/mlt_mn10300_am33_asb_flash.ldi>" }
243 cdl_option CYGHWR_MEMORY_LAYOUT_H {
244 display "Memory layout header file"
247 define -file system.h CYGHWR_MEMORY_LAYOUT_H
248 calculated { CYG_HAL_STARTUP == "RAM" ? \
249 CYG_HAL_FULL_RAM ? "<pkgconf/mlt_mn10300_am33_asb_fullram.h>" : \
250 "<pkgconf/mlt_mn10300_am33_asb_ram.h>" : \
251 CYG_HAL_ROM_SLOT == "BootPROM" ? "<pkgconf/mlt_mn10300_am33_asb_rom.h>" : \
252 "<pkgconf/mlt_mn10300_am33_asb_flash.h>" }
256 cdl_option CYGSEM_HAL_ROM_MONITOR {
257 display "Behave as a ROM monitor"
260 parent CYGPKG_HAL_ROM_MONITOR
261 requires { CYG_HAL_STARTUP == "ROM" }
263 Enable this option if this program is to be used as a ROM monitor,
264 i.e. applications will be loaded into RAM on the board, and this
265 ROM monitor may process exceptions or interrupts generated from the
266 application. This enables features such as utilizing a separate
267 interrupt stack when exceptions are generated."
270 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
271 display "Work with a ROM monitor"
273 legal_values { "Generic" "GDB_stubs" }
274 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
275 parent CYGPKG_HAL_ROM_MONITOR
276 requires { CYG_HAL_STARTUP == "RAM" }
278 Support can be enabled for three different varieties of ROM monitor.
279 This support changes various eCos semantics such as the encoding
280 of diagnostic output, or the overriding of hardware interrupt
282 Firstly there is \"Generic\" support which prevents the HAL
283 from overriding the hardware vectors that it does not use, to
284 instead allow an installed ROM monitor to handle them. This is
285 the most basic support which is likely to be common to most
286 implementations of ROM monitor.
287 \"GDB_stubs\" provides support when GDB stubs are included in
288 the ROM monitor or boot ROM."
291 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
292 display "Redboot HAL options"
295 parent CYGPKG_REDBOOT
296 active_if CYGPKG_REDBOOT
298 This option lists the target's requirements for a valid Redboot
301 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
302 display "Build Redboot ROM binary image"
303 active_if CYGBLD_BUILD_REDBOOT
306 description "This option enables the conversion of the Redboot ELF
307 image to a binary image suitable for ROM programming."
310 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
311 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
312 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
313 $(OBJCOPY) -O binary $< $@