This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SPI/FLash how to include in library


I have written an SPI driver for the Oki 4060 and included in in the ecos.db in my target, I have successfully integrated in my configuration file as well. However, I am not sure, what the procedure is in getting the driver to actually compile Just building the library does not seem to compile the spi driver. I created two components one for the processor itself and another for the board that makes use of it.
I assumed that just declaring the packages as part of my target for compile them. I must me missing something.


Moussa

# ====================================================================
#
#      spi_ml67q.cdl
#
#      Atmel ML67Q (ARM) SPI driver configuration data
#
# ====================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
##...
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
# ====================================================================
######DESCRIPTIONBEGIN####
#
# Author(s):      Moussa Ba <mba@embedded-zone.com>
# Date:           2006-07-07
#
#####DESCRIPTIONEND####
#
# ====================================================================

cdl_package CYGPKG_DEVS_SPI_ARM_ML67Q {
  parent        CYGPKG_IO_SPI
  active_if     CYGPKG_IO_SPI
  display       "Oki ML67Q SPI driver"
  requires      CYGPKG_HAL_ARM_MLM
  hardware
  include_dir   cyg/io
  compile       spi_ml67q.c
  compile       -library=libextras.a spi_ml67q_init.cxx

  cdl_component CYGPKG_DEVS_SPI_ARM_ML67Q_OPTIONS {
      display "Atmel ML67Q SPI driver 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 CYGPKG_DEVS_SPI_ARM_ML67Q_CFLAGS_ADD {
          display "Additional compiler flags"
          flavor  data
          no_define
          default_value { "" }
          description   "
              This option modifies the set of compiler flags for
              building the SPI device. These flags are used in addition
              to the set of global flags."
      }

      cdl_option CYGPKG_DEVS_SPI_ARM_ML67Q_CFLAGS_REMOVE {
          display "Suppressed compiler flags"
          flavor  data
          no_define
          default_value { "" }
          description   "
              This option modifies the set of compiler flags for
              building the SPI device. These flags are removed from
              the set of global flags if present."
      }
  }
}

# EOF spi_ml67q.cdl


# ==================================================================== # # spi_mlm.cdl # # Oki ML67Q MLM board SPI devices configuration data # # ==================================================================== # . . . #####ECOSGPLCOPYRIGHTEND#### # ==================================================================== ######DESCRIPTIONBEGIN#### # # Author(s): Moussa Ba <mba@embedded-zone.com> # Date: 2006-07-12 # #####DESCRIPTIONEND#### # # ====================================================================

cdl_package CYGPKG_DEVS_SPI_ARM_MLM {
  parent        CYGPKG_IO_SPI
  active_if     CYGPKG_IO_SPI
  active_if     CYGPKG_DEVS_SPI_ARM_ML67Q
  display       "OKi ML67Q SPI devices"
  hardware
  include_dir   cyg/io
  compile       spi_mlm.c

  define_proc {
      puts $::cdl_system_header "/***** SPI exported devices begin *****/"
      puts $::cdl_system_header "#include <cyg/io/spi_mlm.h>"
      puts $::cdl_system_header "/***** SPI exported devices end *****/"
  }
    cdl_component CYGPKG_DEVS_SPI_ARM_MLM_OPTIONS {
      display "Oki ML67Q SPI devices 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 CYGPKG_DEVS_SPI_ARM_MLM_CFLAGS_ADD {
          display "Additional compiler flags"
          flavor  data
          no_define
          default_value { "" }
          description   "
              This option modifies the set of compiler flags for
              building the SPI device. These flags are used in addition
              to the set of global flags."
      }

      cdl_option CYGPKG_DEVS_SPI_ARM_MLM_CFLAGS_REMOVE {
          display "Suppressed compiler flags"
          flavor  data
          no_define
          default_value { "" }
          description   "
              This option modifies the set of compiler flags for
              building the SPI device. These flags are removed from
              the set of global flags if present."
      }
  }
}

# EOF spi_mlm.cdl



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]