Skip to content

Commit 65d5f25

Browse files
gmarullcarlescufi
authored andcommitted
scripts/west_commands/create_board: extend support to nRF54L05/10
Also fix some issues found on nRF54L15 due to changes/improvements in the upstream reference boards. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 7d64dcb commit 65d5f25

File tree

7 files changed

+47
-42
lines changed

7 files changed

+47
-42
lines changed

scripts/west_commands/create_board/config.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ products:
6363
flash: 246
6464
- series: nrf54l
6565
socs:
66+
- name: nrf54l05
67+
variants:
68+
- name: qfaa
69+
cores:
70+
- name: cpuapp
71+
arch: arm
72+
ram: 96
73+
flash: 500
74+
- name: nrf54l10
75+
variants:
76+
- name: qfaa
77+
cores:
78+
- name: cpuapp
79+
arch: arm
80+
ram: 192
81+
flash: 1012
6682
- name: nrf54l15
6783
variants:
6884
- name: qfaa
@@ -71,6 +87,11 @@ products:
7187
arch: arm
7288
ram: 188
7389
flash: 1428
90+
- name: cpuflpr
91+
arch: riscv
92+
ram: 96
93+
flash: 96
94+
xip: true
7495
- series: nrf91
7596
socs:
7697
- name: nrf9131

scripts/west_commands/create_board/schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"nRF52840-QFAA",
4040
"nRF52840-QIAA",
4141
"nRF5340-QKAA",
42+
"nRF54L05-QFAA",
43+
"nRF54L10-QFAA",
4244
"nRF54L15-QFAA",
4345
"nRF9131-LACA",
4446
"nRF9151-LACA",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
config HW_STACK_PROTECTION
2+
default ARCH_HAS_STACK_PROTECTION
3+
14
if BOARD_{{ board | upper }}_{{ soc | upper }}_CPUAPP
25

36
config ROM_START_OFFSET
7+
default 0 if PARTITION_MANAGER_ENABLED
48
default 0x800 if BOOTLOADER_MCUBOOT
59

610
endif # BOARD_{{ board | upper }}_{{ soc | upper }}_CPUAPP

scripts/west_commands/create_board/templates/nrf54l/board.cmake.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if (CONFIG_SOC_{{ soc | upper }}_CPUAPP)
2-
board_runner_args(jlink "--device={{ soc | replace("nrf", "nRF") }}_M33" "--speed=4000")
2+
board_runner_args(jlink "--device={{ soc | replace("nrf", "nRF") | replace("l", "L") }}_M33" "--speed=4000")
33
elseif (CONFIG_SOC_{{ soc | upper }}_CPUFLPR)
4-
board_runner_args(jlink "--device={{ soc | replace("nrf", "nRF") }}_RV32" "--speed=4000")
4+
board_runner_args(jlink "--device={{ soc | replace("nrf", "nRF") | replace("l", "L") }}_RV32" "--speed=4000")
55
endif()
66

77
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)

scripts/west_commands/create_board/templates/nrf54l/board.dts.jinja2

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,29 @@
1111
zephyr,code-partition = &slot0_partition;
1212
zephyr,sram = &cpuapp_sram;
1313
zephyr,flash = &cpuapp_rram;
14+
zephyr,flash-controller = &rram_controller;
1415
};
1516
};
1617

17-
&cpuapp_sram {
18-
status = "okay";
19-
};
20-
2118
&grtc {
2219
owned-channels = <0 1 2 3 4 5 6 7 8 9 10 11>;
2320
/* Channels 7-11 reserved for Zero Latency IRQs, 3-4 for FLPR */
2421
child-owned-channels = <3 4 7 8 9 10 11>;
2522
status = "okay";
2623
};
2724

28-
&cpuapp_rram {
29-
partitions {
30-
compatible = "fixed-partitions";
31-
#address-cells = <1>;
32-
#size-cells = <1>;
33-
34-
boot_partition: partition@0 {
35-
label = "mcuboot";
36-
reg = <0x0 DT_SIZE_K(64)>;
37-
};
38-
39-
slot0_partition: partition@10000 {
40-
label = "image-0";
41-
reg = <0x10000 DT_SIZE_K(664)>;
42-
};
43-
44-
slot1_partition: partition@b6000 {
45-
label = "image-1";
46-
reg = <0xb6000 DT_SIZE_K(664)>;
47-
};
48-
49-
storage_partition: partition@15c000 {
50-
label = "storage";
51-
reg = <0x15c000 DT_SIZE_K(36)>;
52-
};
53-
};
25+
&cpuapp_sram {
26+
status = "okay";
27+
{% if soc == "nrf54l05" %}
28+
reg = <0x20000000 DT_SIZE_K(96)>;
29+
ranges = <0x0 0x20000000 DT_SIZE_K(96)>;
30+
{% elif soc == "nrf54l10" %}
31+
reg = <0x20000000 DT_SIZE_K(192)>;
32+
ranges = <0x0 0x20000000 DT_SIZE_K(192)>;
33+
{% endif %}
5434
};
35+
36+
#include <nordic/{{ soc }}_partition.dtsi>
5537
{% else %}
5638
{% if not target['xip'] %}
5739
/dts-v1/;

scripts/west_commands/create_board/templates/nrf54l/board_defconfig.jinja2

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
{% if target['core'] == 'cpuapp' %}
22
CONFIG_ARM_MPU=y
3-
CONFIG_HW_STACK_PROTECTION=y
4-
5-
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
6-
7-
CONFIG_CACHE_MANAGEMENT=y
8-
CONFIG_EXTERNAL_CACHE=y
9-
10-
CONFIG_NRF_GRTC_START_SYSCOUNTER=y
113
{% else %}
124
{% if not target['xip'] %}
135
CONFIG_USE_DT_CODE_PARTITION=y

scripts/west_commands/create_board/west-ncs-create-board-test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ declare -a SOCS=(
2020
"nRF52840-QFAA"
2121
"nRF52840-QIAA"
2222
"nRF5340-QKAA"
23+
"nRF54L05-QFAA"
24+
"nRF54L10-QFAA"
2325
"nRF54L15-QFAA"
2426
"nRF9131-LACA"
2527
"nRF9151-LACA"
@@ -58,8 +60,10 @@ for soc in "${SOCS[@]}"; do
5860
west build -p -b $board/$soc_name/cpunet $HELLO_WORLD
5961
elif [[ $soc == nRF54L* ]]; then
6062
west build -p -b $board/$soc_name/cpuapp $HELLO_WORLD
61-
# west build -p -b $board/$soc_name/cpuflpr $HELLO_WORLD
62-
# west build -p -b $board/$soc_name/cpuflpr/xip $HELLO_WORLD
63+
if [[ $soc == nRF54L15* ]]; then
64+
west build -p -b $board/$soc_name/cpuflpr $HELLO_WORLD
65+
west build -p -b $board/$soc_name/cpuflpr/xip $HELLO_WORLD
66+
fi
6367
elif [[ $soc == nRF91* ]]; then
6468
west build -p -b $board/$soc_name $HELLO_WORLD
6569
west build -p -b $board/$soc_name/ns $HELLO_WORLD

0 commit comments

Comments
 (0)