1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 * Here we define the shared memory buffers for the RPMSG IPC back-end in simulation. 9 * In real HW, these are booked in RAM thru device tree configuration. 10 * In this simulated target, we just define them at build time to have the size defined 11 * in device tree. 12 * 13 * Note that this file is only compiled as part of the application core image, and therefore 14 * when the network core is built with the IPC service, we cannot produce an executable 15 * with the network core image alone, as we would lack this buffer during linking. 16 */ 17 18 #include "nsi_cpu_if.h" 19 #include <zephyr/device.h> 20 21 #define DT_DRV_COMPAT zephyr_ipc_openamp_static_vrings 22 23 #define DEFINE_BACKEND_BUFFER(i) \ 24 NATIVE_SIMULATOR_IF \ 25 char IPC##i##_shm_buffer[DT_REG_SIZE(DT_INST_PHANDLE(i, memory_region))]; 26 27 DT_INST_FOREACH_STATUS_OKAY(DEFINE_BACKEND_BUFFER) 28