Skip to content

Commit 62dca66

Browse files
annwojrlubos
authored andcommitted
doc: flpr and building for nrf54l15
Adds building article Adds FLPR intro Signed-off-by: Anna Wojdylo <[email protected]>
1 parent a3a1f46 commit 62dca66

File tree

4 files changed

+184
-0
lines changed

4 files changed

+184
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
.. _building_nrf54l:
2+
3+
Building and programming with nRF54L15 DK
4+
#########################################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
This guide provides instructions on how to build and program the nRF54L15 development kit.
11+
Whether you are working with single or multi-image builds, the following sections will guide you through the necessary steps.
12+
13+
Depending on the sample, you must program only the application core or both the Fast Lightweight Peripheral Processor (FLPR) and the application core.
14+
Additionally, the process will differ based on whether you are working with a single-image or multi-image build.
15+
16+
.. note::
17+
The following instructions do not include multi-image single-core builds scenario.
18+
19+
Building for the application core only
20+
**************************************
21+
22+
Building for the application core only follows the default building process for the |NCS|.
23+
For instructions, see how the :ref:`building` page.
24+
25+
.. _building_nrf54l_app_flpr_core:
26+
27+
Building for the application and FLPR core
28+
******************************************
29+
30+
Building for both the application and the FLPR cores is different from the default |NCS| procedure.
31+
Using the FLPR core also requires additional configuration to enable it.
32+
This section outlines how to build and program for both the application and FLPR core, covering separate builds and sysbuild configurations.
33+
The FLPR core supports two variants:
34+
35+
* ``nrf54l15dk/nrf54l15/cpuflpr``, where FLPR runs from SRAM, which is the recommended method.
36+
To build FLPR image with this variant, the application core image must include the ``nordic-flpr`` :ref:`snippet <app_build_snippets>`.
37+
38+
* ``nrf54l15dk/nrf54l15/cpuflpr/xip``, where FLPR runs from RRAM.
39+
To build FLPR image with this variant, the application core image must include the ``nordic-flpr-xip`` snippet.
40+
41+
Standard build
42+
--------------
43+
44+
This subsection focuses on how to build an application using :ref:`sysbuild <configuration_system_overview_sysbuild>`.
45+
46+
.. note::
47+
Currently, the documentation does not cover specific instructions for building an application image that uses sysbuild to incorporate the FLPR core as a sub-image.
48+
The only documented scenario is for building FLPR as the main image and the application as a sub-image.
49+
50+
Complete the following steps:
51+
52+
.. tabs::
53+
54+
.. group-tab:: Using minimal sample for VPR bootstrapping
55+
56+
This option automatically programs the FLPR core with :ref:`dedicated bootstrapping firmware <vpr_flpr_nrf54l15_initiating>`.
57+
58+
To build and flash both images, run the following command that performs a :ref:`pristine build <zephyr:west-building>`:
59+
60+
.. code-block:: console
61+
62+
west build -p -b nrf54l15dk/nrf54l15/cpuflpr
63+
west flash
64+
65+
.. group-tab:: Using application that supports multi-image builds
66+
67+
If your application involves creating custom images for both the application core and the FLPR core, make sure to disable the VPR bootstrapping sample.
68+
You can do this by disabling the ``SB_CONFIG_VPR_LAUNCHER`` option when building for the FLPR target.
69+
For more details, see :ref:`how to configure Kconfig <configuring_kconfig>`.
70+
71+
To build and flash both images, run the following command that performs a :ref:`pristine build <zephyr:west-building>`:
72+
73+
.. code-block:: console
74+
75+
west build -p -b nrf54l15dk/nrf54l15/cpuflpr -- -DSB_CONFIG_VPR_LAUNCHER=n
76+
west flash
77+
78+
Separate images
79+
---------------
80+
81+
You can build and program application sample and the FLPR sample as separate images using the |nRFVSC| or command line.
82+
To use nRF Util, see `Programming application firmware on the nRF54L15 SoC`_.
83+
Depending on the selected method, complete the following steps:
84+
85+
.. tabs::
86+
87+
.. group-tab:: nRF Connect for VS Code
88+
89+
.. note::
90+
91+
The |nRFVSC| currently offers experimental support for the nRF54L15's FLPR core.
92+
Certain features, particularly debugging, may not function as expected.
93+
94+
.. include:: /includes/vsc_build_and_run.txt
95+
96+
3. Build the application image by setting the following options:
97+
98+
* Board target to ``nrf54l15dk/nrf54l15/cpuapp``.
99+
* Choose either ``nordic-flpr`` or ``nordic-flpr-xip`` snippet depending on the FLPR image target.
100+
* System build to :guilabel:`No sysbuild`.
101+
102+
For more information, see :ref:`cmake_options`.
103+
104+
#. Build the FLPR image by setting the following options:
105+
106+
* Board target to ``nrf54l15dk/nrf54l15/cpuflpr`` (recommended) or ``nrf54l15dk/nrf54l15/cpuflpr/xip``.
107+
* System build to :guilabel:`No sysbuild`.
108+
109+
For more information, see :ref:`cmake_options`.
110+
111+
.. group-tab:: Command line
112+
113+
1. |open_terminal_window_with_environment|
114+
#. Build the application core image, and based on your build target include the appropriate snippet:
115+
116+
.. code-block:: console
117+
118+
west build -p -b nrf54l15dk/nrf54l15/cpuapp -S nordic-flpr --no-sysbuild
119+
120+
#. Program the application core image by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
121+
122+
.. code-block:: console
123+
124+
west flash
125+
126+
#. Build the FLPR core image:
127+
128+
.. code-block:: console
129+
130+
west build -p -b nrf54l15dk/nrf54l15/cpuflpr --no-sysbuild
131+
132+
You can also customize the command for additional options, by adding :ref:`build parameters <optional_build_parameters>`.
133+
134+
#. Once you have successfully built the FLPR core image, program it by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
135+
136+
.. code-block:: console
137+
138+
west flash

doc/nrf/app_dev/device_guides/nrf54l/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ Ensure to check the revision of your nRF54L15 device to see if it is supported:
6161
zms
6262
cryptography
6363
testing_dfu
64+
vpr_flpr
65+
building_nrf54l
6466
snippets
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. _vpr_flpr_nrf54l:
2+
3+
Working with the FLPR core
4+
##########################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
The nRF54L15 SoC has a dedicated VPR CPU (RISC-V architecture), named *fast lightweight peripheral processor* (FLPR).
11+
The following peripherals are available for use with the FLPR core, and can be accessed through the appropriate Zephyr Device Driver API:
12+
13+
* GPIO
14+
* GPIOTE
15+
* GRTC
16+
* TWIM
17+
* UARTE
18+
* VPR
19+
20+
.. _vpr_flpr_nrf54l15_initiating:
21+
22+
Using FLPR with Zephyr multithreaded mode
23+
*****************************************
24+
25+
FLPR can function as a generic core, operating under the full Zephyr kernel.
26+
In this configuration, building the FLPR target is similar to the application core.
27+
However, the application core build must incorporate an overlay that enables the FLPR core.
28+
29+
Bootstrapping the FLPR core
30+
===========================
31+
32+
The |NCS| provides a FLPR snippet that adds an overlay required for bootstrapping the FLPR core.
33+
Snippet's primary function is to enable the code that transfers the FLPR code to the designated region (if necessary) and to initiate the FLPR core.
34+
35+
When building for the ``nrf54l15dk/nrf54l15/cpuflpr`` target, a minimal sample is automatically loaded onto the application core.
36+
See more information on :ref:`building_nrf54l_app_flpr_core`.
37+
38+
Memory allocation
39+
*****************
40+
41+
If a FLPR CPU is running, it can lead to increased latency when accessing ``RAM_01``.
42+
Because of this, when FLPR is used in a project, you should utilize ``RAM_01`` to store only the FLPR code, FLPR data, and the application CPU's non-time-sensitive information.
43+
Conversely, you should use ``RAM_00`` to store data with strict access time requirements such as DMA buffers, and the application CPU data used in low-latency ISRs.

doc/nrf/links.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
.. _`nrfutil-trace`: https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-trace/CHANGELOG.html
826826
.. _`nRF Sniffer for Bluetooth LE`: https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-ble-sniffer/guides/overview.html
827827
.. _`Device command overview`: https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-device/guides/programming.html
828+
.. _`Programming application firmware on the nRF54L15 SoC`: https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-device/guides/programming_nrf54L15.html
828829

829830
.. _`anomaly 19`: https://docs.nordicsemi.com/bundle/errata_nRF5340_EngA/page/ERR/nRF5340/EngineeringA/latest/anomaly_340_19.html
830831

0 commit comments

Comments
 (0)