1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_include_directories(.) 4zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_MEC172X 5 soc_i2c.c 6) 7 8if (DEFINED CONFIG_MCHP_HEADER_VERBOSE_OUTPUT) 9 set(MCHP_HEADER_VERBOSE_OPTION "-v") 10endif() 11 12if (DEFINED CONFIG_MCHP_MEC_UNSIGNED_HEADER) 13 set(MCHP_MEC_BIN_NAME ${CONFIG_KERNEL_BIN_NAME}.mchp.bin) 14 set_property(GLOBAL APPEND PROPERTY extra_post_build_commands 15 COMMAND ${PYTHON_EXECUTABLE} ${SOC_DIR}/${ARCH}/${SOC_FAMILY}/common/spigen/mec_spi_gen.py 16 -i ${KERNEL_BIN_NAME} 17 -o ${MCHP_MEC_BIN_NAME} 18 -c ${CONFIG_MCHP_MEC_HEADER_CHIP} 19 -s ${CONFIG_MCHP_MEC_HEADER_FLASH_SIZE} 20 -f ${CONFIG_MCHP_MEC_HEADER_SPI_FREQ_MHZ} 21 -r ${CONFIG_MCHP_MEC_HEADER_SPI_READ_MODE} 22 -m ${CONFIG_MCHP_MEC_HEADER_FLASH_SPI_MODE} 23 --drvstr ${CONFIG_MCHP_MEC_HEADER_SPI_DRVSTR} 24 --slewrate ${CONFIG_MCHP_MEC_HEADER_SPI_SLEW_RATE} 25 ${MCHP_HEADER_VERBOSE_OPTION} 26 ) 27endif() 28