In the current code the naming of the
CONFIG_RPMSG_MULTI_INSTANCE_?_IPM_{TX,RX}_NAME symbol is 1-based. While
this is not currently an issue, it could easily become such if the
symbol is programmatically used as part of a preprocessor enumeration
(for example when using DT_INST_FOREACH_STATUS_OKAY(...) & co).
To avoid trouble, just make the index starting from 0 instead than 1.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
83 lines
2.1 KiB
Plaintext
83 lines
2.1 KiB
Plaintext
# Copyright (c) 2021 Nordic Semiconductor (ASA)
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Workaround for not being able to have commas in macro arguments
|
|
DT_CHOSEN_Z_IPC_SHM := zephyr,ipc_shm
|
|
|
|
menuconfig RPMSG_MULTI_INSTANCE
|
|
bool "RPMsg multiple instance"
|
|
select IPM
|
|
select OPENAMP
|
|
help
|
|
Enables support for RPMsg multiple instance.
|
|
|
|
if RPMSG_MULTI_INSTANCE
|
|
|
|
choice RPMSG_ROLE
|
|
prompt "RPMSG device role"
|
|
default RPMSG_MULTI_INSTANCE_REMOTE
|
|
|
|
config RPMSG_MULTI_INSTANCE_REMOTE
|
|
bool "Remote"
|
|
|
|
config RPMSG_MULTI_INSTANCE_MASTER
|
|
bool "Master"
|
|
endchoice
|
|
|
|
config RPMSG_MULTI_INSTANCES_NO
|
|
int "Number of RPMSG instances."
|
|
default 2
|
|
range 1 8
|
|
help
|
|
How many instances are to be used.
|
|
|
|
ipm_name_instance_num = 0
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 1
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 2
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 3
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 4
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 5
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 6
|
|
rsource "Kconfig.ipm_name_instance"
|
|
ipm_name_instance_num = 7
|
|
rsource "Kconfig.ipm_name_instance"
|
|
|
|
config RPMSG_MULTI_INSTANCE_SHM_BASE_ADDRESS
|
|
hex
|
|
default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_IPC_SHM))"
|
|
help
|
|
This option specifies base address of the memory region to
|
|
be used for the OpenAMP IPC shared memory.
|
|
|
|
config RPMSG_MULTI_INSTANCE_SHM_SIZE
|
|
hex
|
|
default "$(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_IPC_SHM))"
|
|
help
|
|
This option specifies size of the memory region to be used
|
|
for the OpenAMP IPC shared memory.
|
|
|
|
config RPMSG_MULTI_INSTANCE_INIT_PRIORITY
|
|
int "Initialization priority of RPMsg muliple instances"
|
|
default 46
|
|
help
|
|
If in doubt, do not modify this value.
|
|
|
|
config IPM_MSG_ID
|
|
int "IPM message identifier."
|
|
default 0
|
|
help
|
|
Values are constrained by ipm_max_data_size_get since many boards
|
|
only allow for a subset of bits in a 32-bit register to store the ID.
|
|
|
|
module = RPMSG_MULTI_INSTANCE
|
|
module-str = RPMsg multi instance
|
|
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
|
|
|
|
endif # RPMSG_MULTI_INSTANCE
|