⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hal_h8s.cdl

📁 ecos移植到R8H系列的源码。源码包来自http://www.cetoni.de/develop/develop_ecosh8s_en.html
💻 CDL
字号:
# ====================================================================
#
#      hal_h8s.cdl
#
#      H8S architectural HAL package configuration data
#
# ====================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
# ====================================================================
######DESCRIPTIONBEGIN####
#
# Author(s):      yoshinori sato
# Original data:  bartv, nickg
# Contributors:   yoshinori sato, Uwe Kindler
# Date:           2003-12-03
#
#####DESCRIPTIONEND####
#
# ====================================================================

cdl_package CYGPKG_HAL_H8S {
    display "H8S architecture"
    parent        CYGPKG_HAL
    hardware
    include_dir   cyg/hal
    define_header hal_h8s.h
    description   "
           The H8S architecture HAL package provides generic
           support for the H8S processor architecture. It is also
           necessary to select a specific target platform HAL
           package."

    cdl_interface CYGINT_HAL_H8S_VARIANT {
        display  "Number of variant implementations in this configuration"
        requires 1 == CYGINT_HAL_H8S_VARIANT
    }
    
    cdl_interface CYGINT_HAL_H8S_USE_COMMON_GDB_STUB {
    	display "Platform uses common GDB debugging stub"
        description "
            If a H8S platform does not need to provide special
            debug functionality (like hardware breakpoint support) then
            it can use the generic GDB stub in h8s_stub.c."
    }
    
    
    cdl_interface CYGINT_HAL_H8S_USE_COMMON_SCI_CODE {
        display "Platform uses common SCI module driver"
        description "
            If a H8S platform contains a standard SCI module then the
            common SCI driver h8s_sci.c can be used."
    }
    
    cdl_interface CYGINT_HAL_H8S_USE_COMMON_DIAG_CODE {
        display "Platform uses common diagnostic code"
        description "
            The platform can use the standard diagnostic code in
            hal_diag.c if nothing special is required."
    }
    
    cdl_interface CYGINT_HAL_H8S_PLATFORM_LINUX_BOOT_SUPPORT {
        display "Platform supports booting of Linux via RedBoot"
        description "
            If a platform supports booting of Linux via RedBoot
            then it should implement the following interface in order
            to enable the H8S Linux boot options."
    }
    
    compile       hal_misc.c hal_syscall.c context.S

    make {
        <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
        $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
        @echo $@ ": \\" > $(notdir $@).deps
        @tail +2 vectors.tmp >> $(notdir $@).deps
        @echo >> $(notdir $@).deps
        @rm vectors.tmp
    }
    
    make {
        <PREFIX>/lib/target.ld: <PACKAGE>/src/h8s.ld
        $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
        @echo $@ ": \\" > $(notdir $@).deps
        @tail +2 target.tmp >> $(notdir $@).deps
        @echo >> $(notdir $@).deps
        @rm target.tmp
    }
     
     cdl_option CYGHWR_HAL_H8S_INT_CTRL_MODE_2 {
             display          "Extended interrupt mode"
             calculated    1
             description      "
                 The H8S architecture supports 2 interrupt modes: interrupt 
                 control mode 0 (normal) and interrupt control mode 2 (extended). 
                 Interrupt operations differ depending on the interrupt control mode. 
                 In interrupt control mode 0, interrupt requests except for NMI are 
                 masked by the I-bit of CCR. In interrupt control mode 2, mask control 
                 is done in eight levels for interrupt requests except for NMI by 
                 comparing the EXR interrupt mask level (I2 to I0 bits) and the IPR 
                 settings. At the moment only ICM2 is supported"
     }
     
     cdl_interface CYGHWR_HAL_H8S_CPU_2600 {
         display          "H8S/2600 CPU"
         description      "
            This option chooses wich cpu type is inside the microcontroller.
            Two types are possible: H8S2600 and H8S2000. The MAC register
            in architecture hal can only be enabled for H8S2600 types"
     }
     
     cdl_option CYGHWR_HAL_H8S_USE_MAC {
             display          "Save Multiply-Accumulate Register (MAC) on context switch"
             default_value    0
             active_if        CYGHWR_HAL_H8S_CPU_2600
             description      "
                 On the H8S/2600 CPU this 64-bit register stores the results of 
                 multiply-and-accumulate operations. It consists of two 32-bit 
                 registers denoted MACH and MACL. The lower 10 bits of MACH are 
                 valid; the upper bits are a sign extension. If this option is 
                 disabled then the MAC registers wont't be safed when switching 
                 tasks or on interrupt occurence. This will save some time but 
                 the content will not be available for GDB. IMPORTANT!!! - If 
                 you would like to debug applications where you use MAC than 
                 RedBoot also have to be build with MAC support because it contains 
                 the whole debugging code. "
     }
     
     
     cdl_option CYGBLD_HAL_H8S_SHADOW_VECTOR_TABLE_POS {
        display      "Position of shadow vector table"
        flavor       data
        legal_values {"ROM" "RAM"}
        active_if    {(CYG_HAL_STARTUP == "ROM") || (CYG_HAL_STARTUP == "ROMRAM")}
        default_value {CYGPKG_REDBOOT ? "RAM" : (CYG_HAL_STARTUP == "RAM" ? "" : "ROM")}
        description "
            For interrupt handling the H8S architecture needs an additional
            shadow vector table of 512 bytes. This option chooses if this
            table should be placed into RAM or ROM. If a ROM monitor is builded
            then the RAM location is the preferred place in order to allow
            RAM applications to use or change this table. For a final ROM 
            application a ROM location of this table would be better because
            this saves RAM memory."         
     }
     
     cdl_component CYGPKG_HAL_H8S_SERVICES {
         display      "H8S services"
         flavor       none
         no_define
         description  "
             H8S architecture provides some services (like debugging stub)
             that can be used by platforms in order to avoid own implementation
             of theses services. If a platform uses a service is configured
             within platform CDL file and the user cannot change this in 
             configtool."
             
     
         cdl_option CYGBLD_HAL_H8S_COMMON_GDB_STUB {
            display       "Use generic debugging stub"
            active_if     1 == CYGINT_HAL_H8S_USE_COMMON_GDB_STUB
            calculated   {1 == CYGINT_HAL_H8S_USE_COMMON_GDB_STUB ? 1 : 0 }
            description   "
                The H8S architecture HAL provides a generic debugging stub that
                should work for all H8S variants - So there should be no need for a
                platform to provide its own debugging stub implementation. 
                If a platform provides an own debug stub (i.e. with hardware breakpoint 
                support) then building this generic stub is not necessary."
             
            compile  h8s_stub.c               
        }
     
         cdl_option CYGBLD_HAL_H8S_COMMON_SCI_CODE {
            display       "Use generic diagnostic SCI driver"
            active_if     1 == CYGINT_HAL_H8S_USE_COMMON_SCI_CODE
            calculated {1 == CYGINT_HAL_H8S_USE_COMMON_SCI_CODE ? 1 : 0 }
            description   "
                The H8S architecture HAL provides a generic SCI device driver in
                h8s_sci.c. If the platfom uses the internal SCI module for console
                and diagnostic output, and the SCI module can be driven by the common
                SCI driver, then this option should be enabled. It enables the 
                compilation of h8s_sci.c. So there is no need for platform HAL to provide
                a diagnostic SCI driver."
             
            compile h8s_sci.c                
        }
        
        cdl_component CYGBLD_HAL_H8S_COMMON_DIAG_CODE {
            display       "Use generic diagnostic code"
            active_if     1 == CYGINT_HAL_H8S_USE_COMMON_DIAG_CODE
            calculated   {1 == CYGINT_HAL_H8S_USE_COMMON_DIAG_CODE ? 1 : 0 }
            description   "
                The H8S architecture HAL provides common diagnostic code in hal_diag.c.
                If there are no special requirements for a platform to provide special
                diagnostic code then this common code can be used. This option enables
                the compilation of hal_diag.c"  
                
            compile hal_diag.c   
            
            cdl_option CYGBLD_HAL_H8S_ADDITIONAL_DIAG_CODE {
                display       "Build additional serial diag. functions"
                active_if     CYGBLD_HAL_H8S_COMMON_DIAG_CODE
                requires      CYGBLD_HAL_H8S_COMMON_DIAG_CODE
                default_value  0
                description   "
                    This option enables additional diagnostic functions to be build for
                    debugging. These functions rely not on virtual vector interface but
                    are hardwired to a special SCI channel provided by plaform HAL and
                    do not rely on functionality from other packages"
            }   
        }
    }      
     
    cdl_component CYGBLD_HAL_H8S_BUILD_OPTIONS {
        display       "H8S build options"
        flavor        none
        description   "
	        Package specific build options including control over
	        compiler flags used only in building this package,
	        and details of which tests are built."
        
        cdl_option CYGBLD_LINKER_SCRIPT {
            display "Linker script"
            flavor data
	        no_define
            calculated  { "src/h8s.ld" }
        }
    }
    
    cdl_component CYGPKG_REDBOOT_H8S_OPTIONS {
    	display       "Redboot H8S options"
        flavor        none
        no_define
        parent        CYGPKG_REDBOOT
        active_if     CYGPKG_REDBOOT
        description   "
            This option lists the target's requirements for a valid Redboot
            configuration."
            
        cdl_component CYGSEM_REDBOOT_H8S_LINUX_BOOT {
            active_if      { CYGBLD_BUILD_REDBOOT_WITH_EXEC && CYGINT_HAL_H8S_PLATFORM_LINUX_BOOT_SUPPORT }
            display        "Support booting Linux via RedBoot"
            flavor         bool
            default_value  { CYGINT_HAL_H8S_PLATFORM_LINUX_BOOT_SUPPORT ? 1 : 0 }
            description    "
               This option enables RedBoot to support booting of a Linux kernel."
            compile -library=libextras.a redboot_linux_exec.c
        }
    } 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -