Skip to content

Commit

Permalink
samples: ipc: add esp32s3_devkitm as supported board
Browse files Browse the repository at this point in the history
Add IPC same code for esp32s3_devkitm enabling second core.

(cherry picked from commit 41e615c)

Original-Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
GitOrigin-RevId: 41e615c
Change-Id: I922de19e5f217a8d97416d568c563a813f7e773a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4896608
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
  • Loading branch information
sylvioalves authored and Chromeos LUCI committed Sep 27, 2023
1 parent b25ccc6 commit 815a86d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
6 changes: 4 additions & 2 deletions samples/subsys/ipc/rpmsg_service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ elseif("${BOARD}" STREQUAL "v2m_musca_b1")
set(BOARD_REMOTE "v2m_musca_b1_ns")
elseif("${BOARD}" STREQUAL "esp32")
set(BOARD_REMOTE "esp32_net")
elseif("${BOARD}" STREQUAL "esp32s3_devkitm")
set(BOARD_REMOTE "esp32s3_devkitm_appcpu")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")
endif()
Expand All @@ -33,7 +35,7 @@ enable_language(C ASM)

target_sources(app PRIVATE src/main.c)

if("${BOARD}" STREQUAL "esp32")
if("${BOARD}" STREQUAL "esp32" OR "${BOARD}" STREQUAL "esp32s3_devkitm")
set_source_files_properties(${REMOTE_ZEPHYR_DIR}/esp32_net_firmware.c PROPERTIES GENERATED TRUE)
target_sources(app PRIVATE src/main.c ${REMOTE_ZEPHYR_DIR}/esp32_net_firmware.c)
endif()
Expand All @@ -52,7 +54,7 @@ ExternalProject_Add(

if(("${BOARD}" STREQUAL "lpcxpresso54114_m4"))
add_dependencies(core_m0_inc_target rpmsg_service_remote)
elseif("${BOARD}" STREQUAL "esp32")
elseif("${BOARD}" STREQUAL "esp32" OR "${BOARD}" STREQUAL "esp32s3_devkitm")
add_dependencies(app rpmsg_service_remote)
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_SOC_ESP32S3_PROCPU=y
19 changes: 19 additions & 0 deletions samples/subsys/ipc/rpmsg_service/boards/esp32s3_devkitm.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 Felipe Neves <ryukokki.felipe@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
/*
* shared memory reserved for the inter-processor communication
*/
zephyr,ipc_shm = &shm0;
zephyr,ipc = &ipm0;
};
};

&ipm0 {
status = "okay";
};
3 changes: 2 additions & 1 deletion samples/subsys/ipc/rpmsg_service/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if("${BOARD}" STREQUAL "nrf5340dk_nrf5340_cpunet"
OR "${BOARD}" STREQUAL "lpcxpresso54114_m0"
OR "${BOARD}" STREQUAL "mps2_an521_remote"
OR "${BOARD}" STREQUAL "v2m_musca_b1_ns"
OR "${BOARD}" STREQUAL "esp32_net")
OR "${BOARD}" STREQUAL "esp32_net"
OR "${BOARD}" STREQUAL "esp32s3_devkitm_appcpu")
message(STATUS "${BOARD} compile as slave in this sample")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")
Expand Down

0 comments on commit 815a86d

Please sign in to comment.