Skip to content

Commit f0d127d

Browse files
committed
lib: Bump Aliro stack to revision cf593e1
- 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> Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
1 parent 2841ea8 commit f0d127d

40 files changed

Lines changed: 629 additions & 426 deletions

Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,5 @@
66

77
rsource "drivers/Kconfig"
88

9-
choice NVS_LOG_LEVEL_CHOICE
10-
default NVS_LOG_LEVEL_ERR
11-
endchoice
12-
13-
choice SETTINGS_LOG_LEVEL_CHOICE
14-
default SETTINGS_LOG_LEVEL_ERR
15-
endchoice
16-
179
config ALIRO_PRINT_READER_GROUP_ID
1810
bool "Print reader group ID that should be provisioned into the User Device"

app/CMakeLists.txt

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,21 @@ target_sources(app PRIVATE
1717
${app_sources}
1818
)
1919

20-
set(ALIRO_LIB ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro/bin)
21-
set(PUBLIC_API ${ZEPHYR_NCS_DOOR_LOCK_APP_MODULE_DIR}/lib/aliro)
20+
set(ALIRO_LIB_DIR ${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_BIN_PATH ${ALIRO_LIB_DIR}/bin/cortex-m4)
24+
elseif(CONFIG_SOC_SERIES_NRF54LX OR CONFIG_SOC_SERIES_NRF53X)
25+
set(ALIRO_LIB_BIN_PATH ${ALIRO_LIB_DIR}/bin/cortex-m33)
26+
endif()
2427

25-
zephyr_include_directories(${PUBLIC_API}/include)
26-
zephyr_include_directories(${PUBLIC_API}/interfaces)
27-
zephyr_include_directories(${PUBLIC_API}/interfaces/crypto/backend_crypto_psa)
28+
add_library(aliro_stack STATIC IMPORTED GLOBAL)
29+
30+
set_target_properties(aliro_stack PROPERTIES IMPORTED_LOCATION ${ALIRO_LIB_BIN_PATH}/libaliro.a)
31+
32+
target_link_libraries(app PRIVATE aliro_stack)
33+
target_link_libraries(aliro_stack INTERFACE zephyr_interface)
34+
35+
zephyr_include_directories(${ALIRO_LIB_DIR}/include)
36+
zephyr_include_directories(${ALIRO_LIB_DIR}/interfaces)
37+
zephyr_include_directories(${ALIRO_LIB_DIR}/interfaces/crypto/backend_crypto_psa)

app/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
rsource "src/nfc_transport_impl/Kconfig"
8-
rsource "../lib/aliro/Kconfig.aliro.defconfig"
8+
rsource "../lib/aliro/Kconfig.defconfig"
99

1010
menu "Zephyr"
1111
source "Kconfig.zephyr"
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+
};
File renamed without changes.

app/prj.conf

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,30 @@ CONFIG_CPP=y
1111
CONFIG_STD_CPP17=y
1212
CONFIG_REQUIRES_FULL_LIBCPP=y
1313
CONFIG_RESET_ON_FATAL_ERROR=n
14+
CONFIG_ASSERT=y
1415

1516
# Logging
1617
CONFIG_CONSOLE=y
1718
CONFIG_LOG=y
1819
CONFIG_NCS_ALIRO_RFAL_LOG_LEVEL_DBG=y
19-
20-
# Print reader key that can be provisioned to the User Device
21-
CONFIG_ALIRO_PRINT_READER_GROUP_ID=y
22-
23-
# RFAL worker stack size (TODO: optimize)
24-
CONFIG_RFAL_WORKER_THREAD_STACK_SIZE=8192
20+
CONFIG_USE_SEGGER_RTT=n
21+
CONFIG_LOG_BACKEND_RTT=n
22+
CONFIG_LOG_BACKEND_SHOW_COLOR=n
2523

2624
# Disable unused shell features
2725
CONFIG_SHELL_VT100_COLORS=n
2826
CONFIG_SHELL_HISTORY=n
2927
CONFIG_SHELL_WILDCARD=n
3028

29+
# Increase shell buffer sizes
30+
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=512
31+
CONFIG_SHELL_BACKEND_SERIAL_TX_RING_BUFFER_SIZE=128
32+
3133
# Adjust logs queue size
3234
CONFIG_SHELL_BACKEND_SERIAL_LOG_MESSAGE_QUEUE_SIZE=768
35+
36+
# Print reader key that can be provisioned to the User Device
37+
CONFIG_ALIRO_PRINT_READER_GROUP_ID=y
38+
39+
# RFAL worker stack size (TODO: optimize)
40+
CONFIG_RFAL_WORKER_THREAD_STACK_SIZE=8192

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)