boards: mec15xxevb_assy6853: enable flashing with build command

This utilizes the newly introduced dediprog west flash runner to flash
the image onto the onboard SPI chip.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-10-24 15:30:37 -07:00 committed by Anas Nashif
parent fca4ead397
commit 265b6ff59e
3 changed files with 25 additions and 1 deletions

View File

@ -45,7 +45,7 @@ if(DEFINED EVERGLADES_SPI_GEN)
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
COMMAND ${EVERGLADES_SPI_GEN}
-i ${EVERGLADES_SPI_CFG}
-o ${PROJECT_BINARY_DIR}/spi_image.bin
-o ${PROJECT_BINARY_DIR}/${SPI_IMAGE_NAME}
)
unset(EVERGLADES_SPI_GEN)

View File

@ -0,0 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
set(SPI_IMAGE_NAME spi_image.bin)
board_set_flasher_ifnset(dediprog)
# --vcc=0 - use 3.5V to flash
board_finalize_runner_args(dediprog
"--spi-image=${PROJECT_BINARY_DIR}/${SPI_IMAGE_NAME}"
"--vcc=0"
)

View File

@ -274,6 +274,17 @@ Flashing
.. note:: Remember that SPI MISO/MOSI are swapped on dediprog headers!
- Flash your board using west:
.. code-block:: console
$ west flash
Make sure that the program ``dpcmd`` (on Linux) or
``dpcmd.exe`` (on Windows) can be found in your ``PATH``.
The Windows version is installed with your DediProg software.
The source code of the Linux version can be found at `SF100 Linux GitHub`_.
#. Run your favorite terminal program to listen for output. Under Linux the
terminal should be :code:`/dev/ttyACM0`. For example:
@ -324,3 +335,5 @@ References
https://github.com/MicrochipTech/CPGZephyrDocs/blob/master/MEC1501/SPI%20Dongles%20and%20Aardvark%20Interposer%20Assy%206791%20Rev%20A1p1%20-%20SCH.pdf
.. _SPI Image Gen:
https://github.com/MicrochipTech/CPGZephyrDocs/tree/master/MEC1501/SPI_image_gen
.. _SF100 Linux GitHub:
https://github.com/DediProgSW/SF100Linux