Skip to content

Commit 49d719a

Browse files
carlescufianangl
authored andcommitted
[nrf noup] treewide: Adapt to NCS
Adapt original Zephyr repo to NCS, including the manifest and the doc. Use the nrf54l15dk/nrf54l15/cpuapp target instead of nucleo_f302r8 as the integration platform. Signed-off-by: Carles Cufi <[email protected]> Signed-off-by: Markus Tacker <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]> Signed-off-by: Jamie McCrae <[email protected]> Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 42350f1 commit 49d719a

File tree

13 files changed

+109
-141
lines changed

13 files changed

+109
-141
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and test app in NCS docker container
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
build-and-test-in-docker:
9+
runs-on: ubuntu-22.04
10+
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v2.7.99
11+
defaults:
12+
run:
13+
# Bash shell is needed to set toolchain related environment variables in docker container
14+
# It is a workaround for GitHub Actions limitation https://github.com/actions/runner/issues/1964
15+
shell: bash
16+
steps:
17+
- name: Checkout repository with example application
18+
uses: actions/checkout@v4
19+
with:
20+
path: example-application
21+
22+
- name: Prepare west project
23+
run: |
24+
west init -l example-application
25+
west update -o=--depth=1 -n
26+
27+
- name: Build firmware
28+
working-directory: example-application
29+
run: |
30+
west twister -T app -v --inline-logs --integration
31+
32+
- name: Store hex files
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: built-applications
36+
path: example-application/twister-out/**/zephyr/zephyr.hex
37+
38+
- name: Twister Tests
39+
working-directory: example-application
40+
run: |
41+
west twister -T tests -v --inline-logs --integration

.github/workflows/build.yml

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

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gmarull @carlescufi

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# Zephyr Example Application
1+
# nRF Connect SDK example application
22

3-
<a href="https://github.com/zephyrproject-rtos/example-application/actions/workflows/build.yml?query=branch%3Amain">
4-
<img src="https://github.com/zephyrproject-rtos/example-application/actions/workflows/build.yml/badge.svg?event=push">
3+
<a href="https://github.com/nrfconnect/ncs-example-application/actions/workflows/build-using-docker.yml?query=branch%3Amain">
4+
<img src="https://github.com/nrfconnect/ncs-example-application/actions/workflows/build-using-docker.yml/badge.svg?event=push">
55
</a>
6-
<a href="https://github.com/zephyrproject-rtos/example-application/actions/workflows/docs.yml?query=branch%3Amain">
7-
<img src="https://github.com/zephyrproject-rtos/example-application/actions/workflows/docs.yml/badge.svg?event=push">
6+
<a href="https://github.com/nrfconnect/ncs-example-application/actions/workflows/docs.yml?query=branch%3Amain">
7+
<img src="https://github.com/nrfconnect/ncs-example-application/actions/workflows/docs.yml/badge.svg?event=push">
88
</a>
9-
<a href="https://zephyrproject-rtos.github.io/example-application">
9+
<a href="https://nrfconnect.github.io/ncs-example-application">
1010
<img alt="Documentation" src="https://img.shields.io/badge/documentation-3D578C?logo=sphinx&logoColor=white">
1111
</a>
12-
<a href="https://zephyrproject-rtos.github.io/example-application/doxygen">
12+
<a href="https://nrfconnect.github.io/ncs-example-application/doxygen">
1313
<img alt="API Documentation" src="https://img.shields.io/badge/API-documentation-3D578C?logo=c&logoColor=white">
1414
</a>
1515

16-
This repository contains a Zephyr example application. The main purpose of this
17-
repository is to serve as a reference on how to structure Zephyr-based
18-
applications. Some of the features demonstrated in this example are:
16+
This repository contains an nRF Connect SDK example application. The main
17+
purpose of this repository is to serve as a reference on how to structure nRF Connect
18+
SDK based applications. Some of the features demonstrated in this example are:
1919

2020
- Basic [Zephyr application][app_dev] skeleton
2121
- [Zephyr workspace applications][workspace_app]
@@ -30,12 +30,12 @@ applications. Some of the features demonstrated in this example are:
3030
- Custom [Zephyr runner][runner_ext]
3131
- Doxygen and Sphinx documentation boilerplate
3232

33-
This repository is versioned together with the [Zephyr main tree][zephyr]. This
34-
means that every time that Zephyr is tagged, this repository is tagged as well
33+
This repository is versioned together with the [nRF Connect SDK main tree][sdk-nrf]. This
34+
means that every time that nRF Connect SDK is tagged, this repository is tagged as well
3535
with the same version number, and the [manifest](west.yml) entry for `zephyr`
36-
will point to the corresponding Zephyr tag. For example, the `example-application`
37-
v2.6.0 will point to Zephyr v2.6.0. Note that the `main` branch always
38-
points to the development branch of Zephyr, also `main`.
36+
will point to the corresponding nRF Connect SDK tag. For example, the `ncs-example-application`
37+
v2.5.0 will point to nRF Connect SDK v2.5.0. Note that the `main` branch always
38+
points to the development branch of nRF Connect SDK, also `main`.
3939

4040
[app_dev]: https://docs.zephyrproject.org/latest/develop/application/index.html
4141
[workspace_app]: https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-app
@@ -44,26 +44,26 @@ points to the development branch of Zephyr, also `main`.
4444
[board_porting]: https://docs.zephyrproject.org/latest/guides/porting/board_porting.html
4545
[bindings]: https://docs.zephyrproject.org/latest/guides/dts/bindings.html
4646
[drivers]: https://docs.zephyrproject.org/latest/reference/drivers/index.html
47-
[zephyr]: https://github.com/zephyrproject-rtos/zephyr
47+
[sdk-nrf]: https://github.com/nrfconnect/sdk-nrf
4848
[west_ext]: https://docs.zephyrproject.org/latest/develop/west/extensions.html
4949
[runner_ext]: https://docs.zephyrproject.org/latest/develop/modules.html#external-runners
5050

51-
## Getting Started
51+
## Getting started
5252

53-
Before getting started, make sure you have a proper Zephyr development
54-
environment. Follow the official
55-
[Zephyr Getting Started Guide](https://docs.zephyrproject.org/latest/getting_started/index.html).
53+
Before getting started, make sure you have a proper nRF Connect SDK development environment.
54+
Follow the official
55+
[Installation guide](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation/install_ncs.html).
5656

5757
### Initialization
5858

5959
The first step is to initialize the workspace folder (``my-workspace``) where
60-
the ``example-application`` and all Zephyr modules will be cloned. Run the following
60+
the ``ncs-example-application`` and all nRF Connect SDK modules will be cloned. Run the following
6161
command:
6262

6363
```shell
64-
# initialize my-workspace for the example-application (main branch)
65-
west init -m https://github.com/zephyrproject-rtos/example-application --mr main my-workspace
66-
# update Zephyr modules
64+
# initialize my-workspace for the ncs-example-application (main branch)
65+
west init -m https://github.com/nrfconnect/ncs-example-application --mr main my-workspace
66+
# update nRF Connect SDK modules
6767
cd my-workspace
6868
west update
6969
```
@@ -79,9 +79,8 @@ west build -b $BOARD app
7979

8080
where `$BOARD` is the target board.
8181

82-
You can use the `custom_plank` board found in this
83-
repository. Note that Zephyr sample boards may be used if an
84-
appropriate overlay is provided (see `app/boards`).
82+
You can use the `custom_plank` board found in this repository. Note that you can use
83+
Zephyr and nRF Connect SDK sample boards if an appropriate overlay is provided (see `app/boards`).
8584

8685
A sample debug configuration is also provided. To apply it, run the following
8786
command:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/* This devicetree overlay file will be automatically picked by the Zephyr
7+
* build system when building the sample for the nRF54l15 DK (cpuapp) board.
8+
* It shows how the ncs-example-application can be built on sample boards
9+
* already provided by Zephyr or NCS.
10+
*/
11+
12+
/ {
13+
example_sensor: example-sensor {
14+
compatible = "zephyr,example-sensor";
15+
input-gpios = <&gpio1 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
16+
};
17+
18+
blink_led: blink-led {
19+
compatible = "blink-gpio-led";
20+
led-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
21+
blink-period-ms = <1000>;
22+
};
23+
};

app/boards/nucleo_f302r8.overlay

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

app/sample.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
# so that you can easily test all of them locally or in CI.
44
sample:
55
description: Example application
6-
name: example-application
6+
name: example-application
77
common:
8+
sysbuild: true
89
build_only: true
910
integration_platforms:
1011
- custom_plank
11-
- nucleo_f302r8
12+
- nrf54l15dk/nrf54l15/cpuapp
1213
tests:
1314
app.default: {}
1415
app.debug:

doc/Doxyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
4242
# title of most generated pages and in a few other places.
4343
# The default value is: My Project.
4444

45-
PROJECT_NAME = "Example Application"
45+
PROJECT_NAME = "NCS Example Application"
4646

4747
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
4848
# could be handy for archiving the generated documentation or if some version
@@ -54,7 +54,7 @@ PROJECT_NUMBER = 1.0.0
5454
# for a project that appears at the top of each page and should give viewer a
5555
# quick idea about the purpose of the project. Keep the description short.
5656

57-
PROJECT_BRIEF = A Zephyr-based example application
57+
PROJECT_BRIEF = An NCS-based example application
5858

5959
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
6060
# in the documentation. The maximum height of the logo should not exceed 55

doc/_doxygen/main.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Introduction
22

3-
This is the Doxygen documentation for [example-application].
3+
This is the Doxygen documentation for [ncs-example-application].
44

5-
[example-application]: https://github.com/zephyrproject-rtos/example-application
5+
[ncs-example-application]: https://github.com/nrfconnect/ncs-example-application

doc/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9-
project = 'Example Application'
9+
project = 'NCS Example Application'
1010
copyright = '2024, The Zephyr Community'
1111
author = 'The Zephyr Community'
1212
release = '1.0.0'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1616

17-
extensions = ['sphinx.ext.intersphinx']
17+
extensions = []
1818

1919
templates_path = ['_templates']
2020
exclude_patterns = ['_build_sphinx', 'Thumbs.db', '.DS_Store']
@@ -23,8 +23,3 @@
2323
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
2424

2525
html_theme = 'alabaster'
26-
27-
# -- Options for Intersphinx -------------------------------------------------
28-
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
29-
30-
intersphinx_mapping = {'zephyr': ('https://docs.zephyrproject.org/latest/', None)}

0 commit comments

Comments
 (0)