Skip to content

Commit 9a2d3a7

Browse files
committed
lib: Bump Aliro stack to revision db4c065
- updated/added stack binaries for nRF54L15, nRF5340 and nRF52840 - aligned app sources and configuration to the new lib revision and all supported platforms - updated docs to include support for nRF54L15, nRF5340 and nRF52840 - added sample.yml for Twister integration Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
1 parent 2841ea8 commit 9a2d3a7

38 files changed

Lines changed: 730 additions & 402 deletions

app/CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,20 @@ target_sources(app PRIVATE
1717
${app_sources}
1818
)
1919

20-
set(ALIRO_LIB ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro/bin)
2120
set(PUBLIC_API ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro)
2221

23-
zephyr_link_libraries(${ALIRO_LIB}/libaliro.a)
22+
if(CONFIG_SOC_SERIES_NRF52X)
23+
set(ALIRO_LIB_PATH ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro/bin/cortex-m4)
24+
elseif(CONFIG_SOC_SERIES_NRF54LX OR CONFIG_SOC_SERIES_NRF53X)
25+
set(ALIRO_LIB_PATH ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro/bin/cortex-m33)
26+
endif()
27+
28+
add_library(aliro_stack STATIC IMPORTED GLOBAL)
29+
30+
set_target_properties(aliro_stack PROPERTIES IMPORTED_LOCATION ${ALIRO_LIB_PATH}/libaliro.a)
31+
32+
target_link_libraries(app PRIVATE aliro_stack)
33+
target_link_libraries(aliro_stack INTERFACE zephyr_interface)
2434

2535
zephyr_include_directories(${PUBLIC_API}/include)
2636
zephyr_include_directories(${PUBLIC_API}/interfaces)

app/Kconfig.sysbuild

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
source "share/sysbuild/Kconfig"
8+
9+
config NRF_DEFAULT_IPC_RADIO
10+
default y
11+
12+
config NETCORE_IPC_RADIO_BT_HCI_IPC
13+
default y
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&pinctrl {
8+
spi0_default_alt: spi0_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,
11+
<NRF_PSEL(SPIM_MOSI, 1, 13)>,
12+
<NRF_PSEL(SPIM_MISO, 1, 14)>;
13+
};
14+
};
15+
16+
spi0_sleep_alt: spi0_sleep_alt {
17+
group1 {
18+
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,
19+
<NRF_PSEL(SPIM_MOSI, 1, 13)>,
20+
<NRF_PSEL(SPIM_MISO, 1, 14)>;
21+
low-power-enable;
22+
};
23+
};
24+
};
25+
26+
&spi0 {
27+
compatible = "nordic,nrf-spi";
28+
status = "okay";
29+
cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
30+
31+
pinctrl-0 = <&spi0_default_alt>;
32+
pinctrl-1 = <&spi0_sleep_alt>;
33+
pinctrl-names = "default", "sleep";
34+
nucleo_nfc@0 {
35+
compatible = "x-nucleo-nfc";
36+
reg = <0>;
37+
spi-max-frequency = <4000000>;
38+
irq-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
39+
};
40+
};
41+
42+
&spi1 {
43+
status = "disabled";
44+
};
45+
46+
&spi2 {
47+
status = "disabled";
48+
};
49+
50+
&spi3 {
51+
status = "disabled";
52+
};
53+
54+
/ {
55+
psa_rng: psa-rng {
56+
compatible = "zephyr,psa-crypto-rng";
57+
status = "okay";
58+
};
59+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&pinctrl {
8+
spi1_default_alt: spi1_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,
11+
<NRF_PSEL(SPIM_MOSI, 1, 13)>,
12+
<NRF_PSEL(SPIM_MISO, 1, 14)>;
13+
};
14+
};
15+
16+
spi1_sleep_alt: spi1_sleep_alt {
17+
group1 {
18+
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>,
19+
<NRF_PSEL(SPIM_MOSI, 1, 13)>,
20+
<NRF_PSEL(SPIM_MISO, 1, 14)>;
21+
low-power-enable;
22+
};
23+
};
24+
25+
};
26+
27+
28+
&spi1 {
29+
compatible = "nordic,nrf-spim";
30+
status = "okay";
31+
cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
32+
33+
pinctrl-0 = <&spi1_default_alt>;
34+
pinctrl-1 = <&spi1_sleep_alt>;
35+
pinctrl-names = "default", "sleep";
36+
nucleo_nfc@0 {
37+
compatible = "x-nucleo-nfc";
38+
reg = <0>;
39+
spi-max-frequency = <4000000>;
40+
irq-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
41+
};
42+
};
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/{
8+
/* Disable buttons to avoid collision with interrupt and SCK pins for NFC tag reader. */
9+
/delete-node/ buttons;
10+
11+
aliases {
12+
/delete-property/ sw0;
13+
/delete-property/ sw1;
14+
/delete-property/ sw2;
15+
/delete-property/ sw3;
16+
};
17+
};
18+
19+
&pinctrl {
20+
spi21_default: spi21_default {
21+
group1 {
22+
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
23+
<NRF_PSEL(SPIM_MOSI, 1, 11)>,
24+
<NRF_PSEL(SPIM_MISO, 1, 12)>;
25+
};
26+
};
27+
28+
spi21_sleep: spi21_sleep {
29+
group1 {
30+
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
31+
<NRF_PSEL(SPIM_MOSI, 1, 11)>,
32+
<NRF_PSEL(SPIM_MISO, 1, 12)>;
33+
low-power-enable;
34+
};
35+
};
36+
};
37+
38+
&spi21 {
39+
compatible = "nordic,nrf-spim";
40+
status = "okay";
41+
cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
42+
43+
pinctrl-0 = <&spi21_default>;
44+
pinctrl-1 = <&spi21_sleep>;
45+
pinctrl-names = "default", "sleep";
46+
nucleo_nfc@0 {
47+
compatible = "x-nucleo-nfc";
48+
reg = <0>;
49+
spi-max-frequency = <DT_FREQ_M(4)>;
50+
irq-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
51+
};
52+
};
53+
54+
/ {
55+
nfc_power_switch: nfc_power_switch {
56+
status = "okay";
57+
compatible = "nfc-power-control";
58+
gpios = <&gpio2 6 ( GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN )>;
59+
};
60+
};
61+
62+
&gpio0 {
63+
status = "okay";
64+
};
65+
66+
&gpio1 {
67+
status = "okay";
68+
};
69+
70+
&gpio2 {
71+
status = "okay";
72+
};

app/prj.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ CONFIG_RESET_ON_FATAL_ERROR=n
1616
CONFIG_CONSOLE=y
1717
CONFIG_LOG=y
1818
CONFIG_NCS_ALIRO_RFAL_LOG_LEVEL_DBG=y
19+
CONFIG_USE_SEGGER_RTT=n
20+
CONFIG_LOG_BACKEND_RTT=n
21+
CONFIG_LOG_BACKEND_SHOW_COLOR=n
1922

2023
# Print reader key that can be provisioned to the User Device
2124
CONFIG_ALIRO_PRINT_READER_GROUP_ID=y
@@ -28,5 +31,11 @@ CONFIG_SHELL_VT100_COLORS=n
2831
CONFIG_SHELL_HISTORY=n
2932
CONFIG_SHELL_WILDCARD=n
3033

34+
# Increase shell buffer sizes
35+
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=512
36+
CONFIG_SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE=128
37+
3138
# Adjust logs queue size
3239
CONFIG_SHELL_BACKEND_SERIAL_LOG_MESSAGE_QUEUE_SIZE=768
40+
41+
CONFIG_ASSERT=y

app/sample.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sample:
2+
description: Door lock sample application
3+
name: ncs-door-lock-sample
4+
common:
5+
sysbuild: true
6+
build_only: true
7+
platform_allow: &platforms
8+
- nrf54l15dk/nrf54l15/cpuapp
9+
- nrf52840dk/nrf52840
10+
- nrf5340dk/nrf5340/cpuapp
11+
integration_platforms: *platforms
12+
tests:
13+
app.nfc_door_lock: {}

app/src/hw_init.cpp

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

app/src/main.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,7 @@ LOG_MODULE_REGISTER(door_lock_app, CONFIG_NCS_DOOR_LOCK_APP_LOG_LEVEL);
1717

1818
int main()
1919
{
20-
LOG_INF(" \r\n"
21-
" @@@ @@@@ \r\n"
22-
" @@@@@@@@@@@@ @@@ \r\n"
23-
" @@@@@ @@@@@ @@@@ @@ @@@ @@ @@ @@@@ \r\n"
24-
" @@@@ @@@@ @@@@ @@@@@@ @@@ @@ @@@@@ @@@ @@@@ \r\n"
25-
"@@@@ @@ @@@ @@@ @@@ @@@ @@ @@@ @@@ @@@\r\n"
26-
"@@@ @@@@@ @@@ @@@ @@@ @@@ @@ @@ @@@ @@\r\n"
27-
"@@@ @@@@@@@@ @@@ @@@ @@@ @@@ @@ @@ @@@ @@\r\n"
28-
" @@@ @@@@ @@@@ @@@ @@@@ @@@ @@ @@ @@ @@@\r\n"
29-
" @@@ @@@@ @@@@ @@@@@@@@@@@ @@@@@ @@ @@ @@@@@@@@@ \r\n"
30-
" @@@@ @@@@ @@@@ \r\n"
31-
" @@ @@@@ @@ \r\n");
20+
LOG_INF("Starting nRF Door Lock Reference Application for the nRF Connect SDK");
3221

3322
AliroError ec = Aliro::AliroStack::Instance().Init(
3423
{ .mOnAccessAttempt =

0 commit comments

Comments
 (0)