Skip to content

Commit e1b4320

Browse files
Marek Matejkartben
authored andcommitted
samples: driver: ipm: esp32 sysbuild refactor
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 <marek.matej@espressif.com>
1 parent c69ecab commit e1b4320

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

samples/drivers/ipm/ipm_esp32/Kconfig.sysbuild

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
source "share/sysbuild/Kconfig"
6-
7-
config IPM_REMOTE_BOARD
8-
string
9-
default "esp32_devkitc_wrover/esp32/appcpu" if $(BOARD) = "esp32_devkitc_wroom"
10-
default "esp32_devkitc_wroom/esp32/appcpu" if $(BOARD) = "esp32_devkitc_wroom"
11-
default "esp32s3_devkitm/esp32s3/appcpu" if $(BOARD) = "esp32s3_devkitm"

samples/drivers/ipm/ipm_esp32/boards/esp32s3_devkitm_procpu.overlay

Lines changed: 0 additions & 3 deletions
This file was deleted.

samples/drivers/ipm/ipm_esp32/boards/yd_esp32_procpu.overlay

Lines changed: 0 additions & 3 deletions
This file was deleted.

samples/drivers/ipm/ipm_esp32/src/procpu_shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#if defined(CONFIG_IPM) || defined(CONFIG_MBOX)
8+
79
#include <stdlib.h>
810

911
#include <zephyr/device.h>
@@ -57,3 +59,4 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_amp,
5759
);
5860

5961
SHELL_CMD_REGISTER(amp, &sub_amp, "AMP debug commands.", NULL);
62+
#endif

samples/drivers/ipm/ipm_esp32/sysbuild.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
#
33
# Copyright 2024 Espressif
44

5+
# Prepare the full board name to be used for the remote target
6+
string(REPLACE "procpu" "appcpu" REMOTE_CPU "${BOARD_QUALIFIERS}")
7+
string(CONFIGURE "${BOARD}${REMOTE_CPU}" IPM_REMOTE_BOARD)
8+
9+
if(${REMOTE_CPU} STREQUAL ${BOARD_QUALIFIERS})
10+
# Make sure the remote build is using different target than host CPU
11+
message(FATAL_ERROR "BOARD_QUALIFIERS name error. Please check the target board name string.")
12+
endif()
13+
514
# Add external project
615
ExternalZephyrProject_Add(
716
APPLICATION ipm_esp32_remote
817
SOURCE_DIR ${APP_DIR}/remote
9-
BOARD ${SB_CONFIG_IPM_REMOTE_BOARD}
18+
BOARD ${IPM_REMOTE_BOARD}
1019
)
1120

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

0 commit comments

Comments
 (0)