You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/gsg_guide.rst
+76-40Lines changed: 76 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,87 +10,123 @@ Getting started
10
10
Before getting started, make sure you have a proper |NCS| development environment.
11
11
Follow the official `Getting started guide`_.
12
12
13
+
There are two options for setting up the project, depending on your preferred development environment:
14
+
15
+
* Using `nRF Connect for VS Code`_ (recommended)
16
+
* Using the command line
17
+
13
18
Initialization
14
19
**************
15
20
16
21
This section represents alternative approaches for initializing the workspace.
17
22
18
-
Add |SM| into existing |NCS| workspace
19
-
======================================
23
+
.. tabs::
24
+
25
+
.. group-tab:: nRF Connect for VS Code
26
+
27
+
#. To install the |NCS| and its toolchain using nRF Connect for VS Code, follow `extension documentation <nRF Connect for VS Code install_>`_ or `Installing nRF Connect SDK and VS Code exercise <Devacademy VS Code exercise_>`_ on Nordic Developer Academy.
28
+
#. Open the nRF Connect extension in |VSC| by clicking its icon in the :guilabel:`Activity Bar`.
29
+
#. Click :guilabel:`Create New Application`.
30
+
#. Select the **Browse nRF Connect SDK add-on Index** option.
31
+
#. Search for the **Serial Modem** application and create the project.
32
+
33
+
.. group-tab:: Command line
34
+
35
+
.. tabs::
36
+
37
+
.. group-tab:: Add |SM| into existing |NCS| workspace
20
38
21
-
Assume you have an existing |NCS| workspace in the :file:`ncs` folder.
39
+
Assume you have an existing |NCS| workspace in the :file:`ncs` folder.
Depending on the current state of your |NCS| modules, this may take several minutes as it fetches all |NCS| modules according to the requirements of the |SM|.
57
+
Depending on the current state of your |NCS| modules, this may take several minutes as it fetches all |NCS| modules according to the requirements of the |SM|.
40
58
41
-
Initialize workspace and add |SM| from scratch
42
-
==============================================
59
+
.. group-tab:: Initialize workspace and add |SM| from scratch
43
60
44
-
Complete the following steps for initialization:
61
+
Complete the following steps for initialization:
45
62
46
-
#. To initialize the workspace::
63
+
#. To initialize the workspace::
47
64
48
-
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
65
+
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
49
66
50
-
#. Navigate to the workspace folder::
67
+
#. Navigate to the workspace folder::
51
68
52
-
cd ncs
69
+
cd ncs
53
70
54
-
#. Update the |NCS| modules::
71
+
#. Update the |NCS| modules::
55
72
56
-
west update
73
+
west update
57
74
58
-
This may take several minutes as it fetches all |NCS| modules according to the requirements of the |SM|.
75
+
This may take several minutes as it fetches all |NCS| modules according to the requirements of the |SM|.
59
76
60
77
Building and running
61
78
********************
62
79
80
+
Before building and running the application, you need to connect the development kit to your PC using a USB cable and power on the development kit.
63
81
Complete the following steps for building and running:
64
82
65
-
#. From the workspace folder, navigate to the :file:`ncs-serial-modem` folder::
83
+
.. tabs::
84
+
85
+
.. group-tab:: nRF Connect for VS Code
86
+
87
+
#. Complete the steps in the `How to build an application`_ section in the extension documentation to build the application.
88
+
89
+
You can also specify the additional configuration variables (Kconfig, DTC overlays, and extra Kconfig options) while setting up a build configuration during building the application.
90
+
See `Providing CMake options <cmake_options_>`_ for more information on setting the additional configuration variables.
91
+
92
+
#. Open the nRF Connect extension in |VSC| by clicking its icon in the :guilabel:`Activity Bar`.
93
+
#. In the extension's `Actions View`_, click on :guilabel:`Flash`.
94
+
95
+
The application is now built and flashed to the device.
96
+
You can open a serial terminal to use the application.
97
+
The default baud rate is 115200.
98
+
99
+
.. group-tab:: Command line
100
+
101
+
#. From the workspace folder, navigate to the :file:`ncs-serial-modem` folder::
66
102
67
-
cd ncs-serial-modem/app
103
+
cd ncs-serial-modem/app
68
104
69
-
#. To build the application, run the following command::
105
+
#. To build the application, run the following command::
70
106
71
-
west build -p -b nrf9151dk/nrf9151/ns
107
+
west build -p -b nrf9151dk/nrf9151/ns
72
108
73
-
To build the application with Kconfig and DTC overlays and extra Kconfig options, the following command gives an example of how they are passed as build arguments::
109
+
To build the application with Kconfig, DTC overlays, and extra Kconfig options, the following command gives an example of how they are passed as build arguments::
74
110
75
-
west build -p -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE="overlay-ppp.conf;overlay-cmux.conf" -DEXTRA_DTC_OVERLAY_FILE="overlay-external-mcu.overlay" -DCONFIG_SM_LOG_LEVEL_DBG=y
111
+
west build -p -b nrf9151dk/nrf9151/ns -- -DEXTRA_CONF_FILE="overlay-ppp.conf;overlay-cmux.conf" -DEXTRA_DTC_OVERLAY_FILE="overlay-external-mcu.overlay" -DCONFIG_SM_LOG_LEVEL_DBG=y
76
112
77
-
#. To program the application, run the following command::
113
+
#. To program the application, run the following command::
78
114
79
-
west flash
115
+
west flash
80
116
81
-
The application is now built and flashed to the device.
82
-
You can open a serial terminal to use the application.
83
-
The default baud rate is 115200.
117
+
The application is now built and flashed to the device.
118
+
You can open a serial terminal to use the application.
119
+
The default baud rate is 115200.
84
120
85
-
.. note::
121
+
.. note::
86
122
87
-
When building the |SM| application, the manifest path must point to the :file:`ncs-serial-modem` folder.
88
-
Otherwise linking will fail as drivers and libraries from |SM| will not be found.
123
+
When building the |SM| application, the manifest path must point to the :file:`ncs-serial-modem` folder.
124
+
Otherwise linking will fail as drivers and libraries from |SM| will not be found.
89
125
90
-
To check your current manifest path, run the following command anywhere in your workspace::
126
+
To check your current manifest path, run the following command anywhere in your workspace::
91
127
92
-
west config manifest.path
128
+
west config manifest.path
93
129
94
-
To set the manifest path for |SM|, run the following command::
130
+
To set the manifest path for |SM|, run the following command::
.. _`nRF Connect for VS Code`: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/index.html
90
+
.. _`nRF Connect for VS Code install`: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/get_started/quick_setup.html
91
+
.. _`How to build an application` : https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/get_started/build_app_ncs.html#how-to-build-an-application
0 commit comments