Commit f209af22 authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

boards: mec15xxevb_assy6853: allow custom SPI config file



This adds a way to specify a custom SPI configuration file to be
used with the image generation tool. For example, this can be
used to reduce the SPI image size to allow faster flashing
(e.g. 512KB instead of 16MB).

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent f473cd49
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -36,11 +36,18 @@ else()
endif()

if(DEFINED EVERGLADES_SPI_GEN)
  if(DEFINED ENV{EVERGLADES_SPI_CFG})
    set(EVERGLADES_SPI_CFG $ENV{EVERGLADES_SPI_CFG})
  else()
    set(EVERGLADES_SPI_CFG ${BOARD_DIR}/support/spi_cfg.txt)
  endif()

  set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
    COMMAND ${EVERGLADES_SPI_GEN}
    -i ${BOARD_DIR}/support/spi_cfg.txt
    -i ${EVERGLADES_SPI_CFG}
    -o ${PROJECT_BINARY_DIR}/spi_image.bin
  )

  unset(EVERGLADES_SPI_GEN)
  unset(EVERGLADES_SPI_CFG)
endif()
+7 −0
Original line number Diff line number Diff line
@@ -237,6 +237,13 @@ Setup

   Note that the tools for Linux and Windows have different file names.

#. If needed, a custom SPI image configuration file can be specified
   to override the default one.

   .. code-block:: console

      export EVERGLADES_SPI_CFG=custom_spi_cfg.txt

Building
========