samples: ipm_mcux: add lpc55s69 support

Adds multicore support for lpcxpresso55s69 board.
Documentation to be updated in a later commit.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
This commit is contained in:
Andrei Gansari 2020-12-16 20:03:43 +02:00 committed by Anas Nashif
commit 8a94ea112b
3 changed files with 31 additions and 15 deletions

View file

@ -3,14 +3,25 @@ cmake_minimum_required(VERSION 3.13.1)
#
# SPDX-License-Identifier: Apache-2.0
#
set(BOARD lpcxpresso54114_m4)
set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/ipm_mcux_remote-prefix/src/ipm_mcux_remote-build/zephyr)
if("${BOARD}" STREQUAL "lpcxpresso54114_m4")
set(BOARD_REMOTE "lpcxpresso54114_m0")
elseif("${BOARD}" STREQUAL "lpcxpresso55s69_cpu0")
set(BOARD_REMOTE "lpcxpresso55s69_cpu1")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")
endif()
message(INFO " ${BOARD} compile as Master in this sample")
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(ipm_mcux)
if(NOT ("${BOARD}" STREQUAL "lpcxpresso54114_m4"))
message(FATAL_ERROR "${BOARD} was specified, but this sample only supports lpcxpresso54114_m4")
endif()
enable_language(C ASM)
target_sources(app PRIVATE src/main_master.c)
include(ExternalProject)
@ -18,10 +29,12 @@ ExternalProject_Add(
ipm_mcux_remote
SOURCE_DIR ${APPLICATION_SOURCE_DIR}/remote
INSTALL_COMMAND "" # This particular build system has no install command
BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/ipm_mcux_remote-prefix/src/ipm_mcux_remote-build/zephyr/${KERNEL_BIN_NAME}"
CMAKE_CACHE_ARGS -DBOARD:STRING=${BOARD_REMOTE}
CMAKE_CACHE_ARGS -DDTC_OVERLAY_FILE:STRING=${DTC_OVERLAY_FILE}
BUILD_BYPRODUCTS "${REMOTE_ZEPHYR_DIR}/${KERNEL_BIN_NAME}"
BUILD_ALWAYS True
)
project(ipm_mcux)
add_dependencies(second_core_inc_target ipm_mcux_remote)
target_sources(app PRIVATE src/main_master.c)
add_dependencies(core_m0_inc_target ipm_mcux_remote)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

View file

@ -1,7 +1,7 @@
CONFIG_PRINTK=y
CONFIG_IPM=y
CONFIG_IPM_MCUX=y
CONFIG_SLAVE_CORE_MCUX=y
CONFIG_SLAVE_IMAGE_MCUX="${ZEPHYR_BINARY_DIR}/../ipm_mcux_remote-prefix/src/ipm_mcux_remote-build/zephyr/${KERNEL_BIN_NAME}"
CONFIG_SECOND_CORE_MCUX=y
CONFIG_SECOND_IMAGE_MCUX="${ZEPHYR_BINARY_DIR}/../ipm_mcux_remote-prefix/src/ipm_mcux_remote-build/zephyr/${KERNEL_BIN_NAME}"
CONFIG_TIMESLICE_SIZE=1
CONFIG_MAIN_STACK_SIZE=2048

View file

@ -3,13 +3,16 @@ cmake_minimum_required(VERSION 3.13.1)
#
# SPDX-License-Identifier: Apache-2.0
#
set(BOARD lpcxpresso54114_m0)
if(("${BOARD}" STREQUAL "lpcxpresso54114_m0")
OR "${BOARD}" STREQUAL "lpcxpresso55s69_cpu1")
message(INFO " ${BOARD} compiles as remote in this sample")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")
endif()
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(ipm_mcux_remote)
if(NOT ("${BOARD}" STREQUAL "lpcxpresso54114_m0"))
message(FATAL_ERROR "${BOARD} was specified, but this sample only supports lpcxpresso54114_m0")
endif()
target_sources(app PRIVATE src/main_remote.c)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..)