Skip to content

Commit

Permalink
samples: driver: ipm: esp32 sysbuild refactor
Browse files Browse the repository at this point in the history
Make APP_CPU board name auto generated and remove the related config.
Remove the boards overlay and replace with a socs overlays.

Signed-off-by: Marek Matej <[email protected]>
  • Loading branch information
Marek Matej committed Dec 10, 2024
1 parent 69d3153 commit 568f499
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 0 additions & 6 deletions samples/drivers/ipm/ipm_esp32/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@
# SPDX-License-Identifier: Apache-2.0

source "share/sysbuild/Kconfig"

config IPM_REMOTE_BOARD
string
default "esp32_devkitc_wrover/esp32/appcpu" if $(BOARD) = "esp32_devkitc_wroom"
default "esp32_devkitc_wroom/esp32/appcpu" if $(BOARD) = "esp32_devkitc_wroom"
default "esp32s3_devkitm/esp32s3/appcpu" if $(BOARD) = "esp32s3_devkitm"

This file was deleted.

3 changes: 0 additions & 3 deletions samples/drivers/ipm/ipm_esp32/boards/yd_esp32_procpu.overlay

This file was deleted.

3 changes: 3 additions & 0 deletions samples/drivers/ipm/ipm_esp32/src/procpu_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#if defined(CONFIG_IPM) || defined(CONIFG_MBOX)

#include <stdlib.h>

#include <zephyr/device.h>
Expand Down Expand Up @@ -57,3 +59,4 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_amp,
);

SHELL_CMD_REGISTER(amp, &sub_amp, "AMP debug commands.", NULL);
#endif
11 changes: 10 additions & 1 deletion samples/drivers/ipm/ipm_esp32/sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
#
# Copyright 2024 Espressif

# Prepare the full board name to be used for the remote target
string(REPLACE "procpu" "appcpu" REMOTE_CPU "${BOARD_QUALIFIERS}")
string(CONFIGURE "${BOARD}${REMOTE_CPU}" IPM_REMOTE_BOARD)

if(${REMOTE_CPU} STREQUAL ${BOARD_QUALIFIERS})
# Make sure the remote build is using different target than host CPU
message(FATAL_ERROR "BOARD_QUALIFIERS name error. Please check the target board name string.")
endif()

# Add external project
ExternalZephyrProject_Add(
APPLICATION ipm_esp32_remote
SOURCE_DIR ${APP_DIR}/remote
BOARD ${SB_CONFIG_IPM_REMOTE_BOARD}
BOARD ${IPM_REMOTE_BOARD}
)

# Add dependencies so that the remote sample will be built first
Expand Down

0 comments on commit 568f499

Please sign in to comment.