-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applications: Add ipc_radio firmware code
Add ipc_radio firmware code for network core. This image serves purpose as universal network core image for hci_rpmsg rpc_host and IEEE 802.15.4 remote image. Jira: NCSDK-23798 Signed-off-by: Dominik Chat <[email protected]>
- Loading branch information
1 parent
94e2c1c
commit b379434
Showing
15 changed files
with
767 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(ipc_radio) | ||
|
||
target_include_directories(app PRIVATE ./src) | ||
|
||
target_sources_ifdef(CONFIG_IPC_RADIO_802154 app PRIVATE src/802154.c) | ||
|
||
if(CONFIG_IPC_RADIO_BT_HCI_IPC) | ||
target_sources(app PRIVATE src/bt_hci_ipc.c) | ||
else() | ||
target_sources(app PRIVATE src/bt_empty.c) | ||
endif() | ||
|
||
# NORDIC SDK APP START | ||
target_sources(app PRIVATE | ||
src/main.c | ||
) | ||
# NORDIC SDK APP END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
mainmenu "Nordic ipc_radio firmware" | ||
|
||
config IPC_RADIO_802154 | ||
bool "IPC IEEE 802.15.4 radio" | ||
select NRF_802154_SER_RADIO | ||
help | ||
Enable the IPC IEEE 802.15.4 radio serialization. | ||
|
||
config IPC_RADIO_BT | ||
bool "IPC Bluetooth" | ||
help | ||
Enable the IPC Bluetooth radio serialization. | ||
|
||
if IPC_RADIO_BT | ||
|
||
choice IPC_RADIO_BT_SER | ||
default IPC_RADIO_BT_HCI_IPC | ||
prompt "Bluetooth serialization type" | ||
help | ||
Type of the IPC Bluetooth radio serialization used. | ||
|
||
config IPC_RADIO_BT_HCI_IPC | ||
bool "Bluetooth HCI serialization" | ||
depends on IPC_SERVICE | ||
depends on BT_HCI_RAW | ||
help | ||
Use Bluetooth HCI serialization over ipc_service. | ||
|
||
config IPC_RADIO_BT_RPC | ||
bool "Bluetooth host API serialization over RPC" | ||
depends on BT_RPC_HOST | ||
help | ||
Use nRF RPC serialization for Bluetooth. | ||
|
||
endchoice # IPC_RADIO_BT_SER | ||
|
||
config BT_MAX_CONN | ||
default 4 if IPC_RADIO_802154 | ||
default 16 if !IPC_RADIO_802154 | ||
|
||
endif # IPC_RADIO_BT | ||
|
||
module = IPC_RADIO | ||
module-str = "ipc_radio" | ||
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" | ||
|
||
source "Kconfig.zephyr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_NRF_802154_SER_RADIO=y | ||
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2 | ||
|
||
CONFIG_IPC_RADIO_802154=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_HEAP_MEM_POOL_SIZE=8192 | ||
CONFIG_MAIN_STACK_SIZE=2048 | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 | ||
|
||
CONFIG_MBOX=y | ||
CONFIG_IPC_SERVICE=y | ||
|
||
CONFIG_BT=y | ||
CONFIG_BT_HCI_RAW=y | ||
CONFIG_BT_CTLR_ASSERT_HANDLER=y | ||
CONFIG_BT_HCI_RAW_RESERVE=1 | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_DEBUG_INFO=y | ||
CONFIG_EXCEPTION_STACK_TRACE=y | ||
|
||
CONFIG_IPC_RADIO_BT=y | ||
CONFIG_IPC_RADIO_BT_HCI_IPC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_HEAP_MEM_POOL_SIZE=4096 | ||
CONFIG_NRF_RPC_THREAD_STACK_SIZE=4096 | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 | ||
|
||
CONFIG_BT=y | ||
CONFIG_BT_RPC=y | ||
CONFIG_BT_RPC_HOST=y | ||
|
||
CONFIG_BT_PERIPHERAL=y | ||
CONFIG_BT_MAX_CONN=1 | ||
CONFIG_BT_MAX_PAIRED=1 | ||
CONFIG_BT_SMP=y | ||
|
||
# Host side registers all GATT services using dynamic database | ||
CONFIG_BT_GATT_DYNAMIC_DB=y | ||
|
||
# Enable bonding | ||
CONFIG_BT_SETTINGS=y | ||
CONFIG_FLASH=y | ||
CONFIG_FLASH_PAGE_LAYOUT=y | ||
CONFIG_FLASH_MAP=y | ||
CONFIG_NVS=y | ||
CONFIG_SETTINGS=y | ||
|
||
CONFIG_IPC_RADIO_BT=y | ||
CONFIG_IPC_RADIO_BT_RPC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
CONFIG_SERIAL=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_LOG=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
sample: | ||
name: IPC radio firmware | ||
description: IPC radio firmware application | ||
tests: | ||
applications.ipc_radio.hci: | ||
build_only: true | ||
platform_allow: nrf5340dk_nrf5340_cpunet thingy53_nrf5340_cpunet | ||
tags: bluetooth ci_build | ||
integration_platforms: | ||
- nrf5340dk_nrf5340_cpunet | ||
- thingy53_nrf5340_cpunet | ||
extra_args: EXTRA_CONF_FILE=overlay-bt_hci_ipc.conf | ||
applications.ipc_radio.rpc: | ||
build_only: true | ||
platform_allow: nrf5340dk_nrf5340_cpunet thingy53_nrf5340_cpunet | ||
tags: bluetooth ci_build | ||
integration_platforms: | ||
- nrf5340dk_nrf5340_cpunet | ||
- thingy53_nrf5340_cpunet | ||
extra_args: EXTRA_CONF_FILE=overlay-bt_rpc.conf | ||
applications.ipc_radio.802154: | ||
build_only: true | ||
platform_allow: nrf5340dk_nrf5340_cpunet thingy53_nrf5340_cpunet | ||
tags: ci_build | ||
integration_platforms: | ||
- nrf5340dk_nrf5340_cpunet | ||
- thingy53_nrf5340_cpunet | ||
extra_args: EXTRA_CONF_FILE=overlay-802154.conf | ||
applications.ipc_radio.hci802154: | ||
build_only: true | ||
platform_allow: nrf5340dk_nrf5340_cpunet thingy53_nrf5340_cpunet | ||
tags: bluetooth ci_build | ||
integration_platforms: | ||
- nrf5340dk_nrf5340_cpunet | ||
- thingy53_nrf5340_cpunet | ||
extra_args: EXTRA_CONF_FILE="overlay-bt_hci_ipc.conf;overlay-802154.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2023 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include <stddef.h> | ||
#include <zephyr/kernel.h> | ||
#include <nrf_802154_serialization_error.h> | ||
|
||
void nrf_802154_serialization_error(const nrf_802154_ser_err_data_t *err) | ||
{ | ||
ARG_UNUSED(err); | ||
__ASSERT(false, "802.15.4 serialization error"); | ||
k_oops(); | ||
} | ||
|
||
void nrf_802154_sl_fault_handler(uint32_t id, int32_t line, const char *err) | ||
{ | ||
__ASSERT(false, "module_id: %u, line: %d, %s", id, line, err); | ||
k_oops(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2023 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include <errno.h> | ||
#include <zephyr/logging/log.h> | ||
|
||
#include "ipc_bt.h" | ||
|
||
LOG_MODULE_DECLARE(ipc_radio, CONFIG_IPC_RADIO_LOG_LEVEL); | ||
|
||
int ipc_bt_init(void) | ||
{ | ||
LOG_DBG("Empty ipc_bt_init called."); | ||
return -ENOSYS; | ||
} | ||
|
||
int ipc_bt_process(void) | ||
{ | ||
LOG_DBG("Empty ipc_bt_process called."); | ||
return -ENOSYS; | ||
} |
Oops, something went wrong.