Skip to content

Commit 2a94235

Browse files
committed
doc: Add VSC instructions to the GSG guide
Add VSC instructions to the GSG guide. Signed-off-by: divya pillai <divya.pillai@nordicsemi.no>
1 parent 258d067 commit 2a94235

2 files changed

Lines changed: 79 additions & 40 deletions

File tree

doc/gsg_guide.rst

Lines changed: 72 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,87 +10,119 @@ Getting started
1010
Before getting started, make sure you have a proper |NCS| development environment.
1111
Follow the official `Getting started guide`_.
1212

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+
1318
Initialization
1419
**************
1520

1621
This section represents alternative approaches for initializing the workspace.
1722

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::
2036

21-
Assume you have an existing |NCS| workspace in the :file:`ncs` folder.
37+
.. group-tab:: Add |SM| into existing |NCS| workspace
2238

23-
#. Navigate to the workspace folder::
39+
Assume you have an existing |NCS| workspace in the :file:`ncs` folder.
2440

25-
cd ncs
41+
#. Navigate to the workspace folder::
2642

27-
#. Clone |SM| repository::
43+
cd ncs
2844

29-
git clone https://github.com/nrfconnect/ncs-serial-modem.git
45+
#. Clone |SM| repository::
3046

31-
#. Set manifest path to the |SM|::
47+
git clone https://github.com/nrfconnect/ncs-serial-modem.git
3248

33-
west config manifest.path ncs-serial-modem
49+
#. Set manifest path to the |SM|::
3450

35-
#. Update the |NCS| modules::
51+
west config manifest.path ncs-serial-modem
3652

37-
west update
53+
#. Update the |NCS| modules::
3854

39-
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
4056

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|.
4358

44-
Complete the following steps for initialization:
59+
.. group-tab:: Initialize workspace and add |SM| from scratch
4560

46-
#. To initialize the workspace::
61+
Complete the following steps for initialization:
4762

48-
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
63+
#. To initialize the workspace::
4964

50-
#. Navigate to the workspace folder::
65+
west init -m https://github.com/nrfconnect/ncs-serial-modem --mr main ncs
5166

52-
cd ncs
67+
#. Navigate to the workspace folder::
5368

54-
#. Update the |NCS| modules::
69+
cd ncs
5570

56-
west update
71+
#. Update the |NCS| modules::
5772

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|.
5976

6077
Building and running
6178
********************
6279

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.
6381
Complete the following steps for building and running:
6482

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::
6698

67-
cd ncs-serial-modem/app
99+
cd ncs-serial-modem/app
68100

69-
#. To build the application, run the following command::
101+
#. To build the application, run the following command::
70102

71-
west build -p -b nrf9151dk/nrf9151/ns
103+
west build -p -b nrf9151dk/nrf9151/ns
72104

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::
74106

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
76108

77-
#. To program the application, run the following command::
109+
#. To program the application, run the following command::
78110

79-
west flash
111+
west flash
80112

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.
115+
The default baud rate is 115200.
84116

85-
.. note::
117+
.. note::
86118

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.
119+
When building the |SM| application, the manifest path must point to the :file:`ncs-serial-modem` folder.
120+
Otherwise linking will fail as drivers and libraries from |SM| will not be found.
89121

90-
To check your current manifest path, run the following command anywhere in your workspace::
122+
To check your current manifest path, run the following command anywhere in your workspace::
91123

92-
west config manifest.path
124+
west config manifest.path
93125

94-
To set the manifest path for |SM|, run the following command::
126+
To set the manifest path for |SM|, run the following command::
95127

96-
west config manifest.path ncs-serial-modem
128+
west config manifest.path ncs-serial-modem

doc/links.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@
8585
.. _`+CGDCONT`: https://docs.nordicsemi.com/bundle/ref_at_commands_nrf91x1/page/REF/at_commands/packet_domain/cgdcont.html
8686
.. _`+CGAUTH`: https://docs.nordicsemi.com/bundle/ref_at_commands_nrf91x1/page/REF/at_commands/packet_domain/cgauth.html
8787

88+
.. _`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
91+
.. _`Actions View`: https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/reference/ui_sidebar_actions.html
92+
8893
.. ### docs.zephyrproject.org/
8994

9095
.. _`Zephyr Networking`: https://docs.zephyrproject.org/latest/connectivity/networking/index.html
@@ -102,6 +107,8 @@
102107

103108
.. ### others
104109

110+
.. _`Devacademy VS Code exercise`: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-1-nrf-connect-sdk-introduction/topic/exercise-1-1/
111+
105112
.. _`Private addresses`: https://en.wikipedia.org/wiki/IP_address#Private_addresses
106113

107114
.. _`3GPP TS 27.010`: https://www.etsi.org/deliver/etsi_ts/127000_127099/127010/18.00.00_60/ts_127010v180000p.pdf

0 commit comments

Comments
 (0)