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
+65-33Lines changed: 65 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,77 +10,109 @@ 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::
20
24
21
-
Assume you have an existing |NCS| workspace in the :file:`ncs` folder.
25
+
.. group-tab:: nRF Connect for VS Code
22
26
23
-
#. Navigate to the workspace folder::
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.
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|.
55
+
west update
40
56
41
-
Initialize workspace and add |SM| from scratch
42
-
==============================================
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|.
43
58
44
-
Complete the following steps for initialization:
59
+
.. group-tab:: Initialize workspace and add |SM| from scratch
45
60
46
-
#. To initialize the workspace::
61
+
Complete the following steps for initialization:
47
62
48
-
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
63
+
#. To initialize the workspace::
49
64
50
-
#. Navigate to the workspace folder::
65
+
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
51
66
52
-
cd ncs
67
+
#. Navigate to the workspace folder::
53
68
54
-
#. Update the |NCS| modules::
69
+
cd ncs
55
70
56
-
west update
71
+
#. Update the |NCS| modules::
57
72
58
-
This may take several minutes as it fetches all |NCS| modules according to the requirements of the |SM|.
73
+
west update
74
+
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
+
#. Open the nRF Connect extension in |VSC| by clicking its icon in the :guilabel:`Activity Bar`.
89
+
#. In the extension's `Actions View`_, click on :guilabel:`Flash`.
90
+
91
+
The application is now built and flashed to the device.
92
+
You can open a serial terminal to use the application.
93
+
The default baud rate is 115200.
94
+
95
+
.. group-tab:: Command line
96
+
97
+
#. From the workspace folder, navigate to the :file:`ncs-serial-modem` folder::
66
98
67
-
cd ncs-serial-modem/app
99
+
cd ncs-serial-modem/app
68
100
69
-
#. To build the application, run the following command::
101
+
#. To build the application, run the following command::
70
102
71
-
west build -p -b nrf9151dk/nrf9151/ns
103
+
west build -p -b nrf9151dk/nrf9151/ns
72
104
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::
105
+
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::
74
106
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
107
+
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
108
77
-
#. To program the application, run the following command::
109
+
#. To program the application, run the following command::
78
110
79
-
west flash
111
+
west flash
80
112
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.
113
+
The application is now built and flashed to the device.
114
+
You can open a serial terminal to use the application.
.. _`nRF Connect for VS Code`: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/index.html
89
+
.. _`nRF Connect for VS Code install`: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/get_started/quick_setup.html
90
+
.. _`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