Skip to content

Commit 081ac40

Browse files
carlescufigmarull
authored andcommitted
[nrf noup] treewide: Adapt to NCS
Adapt original Zephyr repo to NCS, including the manifest and the doc. 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 de6af00 commit 081ac40

File tree

12 files changed

+87
-138
lines changed

12 files changed

+87
-138
lines changed
+41
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

-49
This file was deleted.

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gmarull @carlescufi

README.md

+26-27
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]
@@ -29,12 +29,12 @@ applications. Some of the features demonstrated in this example are:
2929
- Custom [west extension][west_ext]
3030
- Doxygen and Sphinx documentation boilerplate
3131

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

3939
[app_dev]: https://docs.zephyrproject.org/latest/develop/application/index.html
4040
[workspace_app]: https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-app
@@ -43,25 +43,25 @@ points to the development branch of Zephyr, also `main`.
4343
[board_porting]: https://docs.zephyrproject.org/latest/guides/porting/board_porting.html
4444
[bindings]: https://docs.zephyrproject.org/latest/guides/dts/bindings.html
4545
[drivers]: https://docs.zephyrproject.org/latest/reference/drivers/index.html
46-
[zephyr]: https://github.com/zephyrproject-rtos/zephyr
46+
[sdk-nrf]: https://github.com/nrfconnect/sdk-nrf
4747
[west_ext]: https://docs.zephyrproject.org/latest/develop/west/extensions.html
4848

49-
## Getting Started
49+
## Getting started
5050

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

5555
### Initialization
5656

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

6161
```shell
62-
# initialize my-workspace for the example-application (main branch)
63-
west init -m https://github.com/zephyrproject-rtos/example-application --mr main my-workspace
64-
# update Zephyr modules
62+
# initialize my-workspace for the ncs-example-application (main branch)
63+
west init -m https://github.com/nrfconnect/ncs-example-application --mr main my-workspace
64+
# update nRF Connect SDK modules
6565
cd my-workspace
6666
west update
6767
```
@@ -77,9 +77,8 @@ west build -b $BOARD app
7777

7878
where `$BOARD` is the target board.
7979

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

8483
A sample debug configuration is also provided. To apply it, run the following
8584
command:

app/boards/nucleo_f302r8.overlay

-27
This file was deleted.

app/sample.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
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
1212
tests:
1313
app.default: {}
1414
app.debug:

doc/Doxyfile

+2-2
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

+2-2
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

+4-9
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', 'breathe']
17+
extensions = ['breathe']
1818

1919
templates_path = ['_templates']
2020
exclude_patterns = ['_build_sphinx', 'Thumbs.db', '.DS_Store']
@@ -24,17 +24,12 @@
2424

2525
html_theme = 'alabaster'
2626

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)}
31-
3227
## -- Options for Breathe ----------------------------------------------------
3328
# https://breathe.readthedocs.io/en/latest/index.html
3429
#
3530
# WARNING: please, check breathe maintainership status before using this
3631
# extension in production!
3732

38-
breathe_projects = {'example-application': '_build_doxygen/xml'}
39-
breathe_default_project = 'example-application'
33+
breathe_projects = {'ncs-example-application': '_build_doxygen/xml'}
34+
breathe_default_project = 'ncs-example-application'
4035
breathe_default_members = ('members', )

doc/index.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
Welcome to Example Application's documentation!
2-
===============================================
1+
Welcome to NCS Example Application's documentation!
2+
===================================================
33

4-
This is a simple Sphinx documentation setup for ``example-application``.
4+
This is a simple Sphinx documentation setup for ``ncs-example-application``.
55

66
.. toctree::
77
:maxdepth: 2
88
:caption: Contents
99

1010
drivers/index
1111
lib/index
12-
zephyr
1312

1413
Indices and tables
1514
==================

doc/zephyr.rst

-5
This file was deleted.

west.yml

+6-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ manifest:
66
west-commands: scripts/west-commands.yml
77

88
remotes:
9-
- name: zephyrproject-rtos
10-
url-base: https://github.com/zephyrproject-rtos
9+
- name: ncs
10+
url-base: https://github.com/nrfconnect
1111

1212
projects:
13-
- name: zephyr
14-
remote: zephyrproject-rtos
13+
- name: nrf
14+
remote: ncs
15+
repo-path: sdk-nrf
1516
revision: main
16-
import:
17-
# By using name-allowlist we can clone only the modules that are
18-
# strictly needed by the application.
19-
name-allowlist:
20-
- cmsis # required by the ARM port
21-
- hal_nordic # required by the custom_plank board (Nordic based)
22-
- hal_stm32 # required by the nucleo_f302r8 board (STM32 based)
17+
import: true

0 commit comments

Comments
 (0)