If you are using a version of the SDK that supports SEGGER Embedded Studio (SES),
thus nRF5 SDK v14.1.0 or later, you should open one of the supplied SES projects and skip this step. If you are using an older version of the
SDK, for example, nRF5 SDK v12.3.0 for nRF51 Series devices, you must create your own
SES projects based on the supplied Keil
projects.
Before you begin, install the CMSIS-CORE Support Package. To do so, open
SES, go to , and select and install
CMSIS-CORE Support
Package.
Figure 1. SES Package Manager
Complete the following steps to import a Keil project into
SES:
-
Select .
In
SES versions before 3.40, this option was
located under .
-
Navigate to the folder that contains the nRF5 SDK and select the example that
you want to import.
Use the *.uvprojx file that is located in the
arm5_no_packs folder.
-
In the Import Build Configuration window that appears,
select Internal Toolchain.
-
If the project that you imported contains a Target
for flashing the SoftDevice, delete this Target in
SES:
-
Select .
-
Under Public Configurations, select the
Target (for example,
flash_s130_nrf51_2.0.1_softdevice).
-
Click the - symbol to remove the Target.
The build configuration should now look similar to this:
-
Add the nRF5 MDK files that are required for startup and system setup.
In Keil µVision, these files are provided by the nRF_DeviceFamilyPack. Since
this pack is not available for
SES, you must add them manually to the
SES
project.
-
Download ses_nrf51_startup.s and ses_nrf52_startup.s and save them in a new folder
SDK_dir/components/toolchain/embedded_studio.
-
In the Project Explorer, navigate to Internal
Files and remove the
Cortex_M_Startup.s file.
-
Right-click Internal Files and select
Add Existing File.
-
Browse to the
SDK_dir/components/toolchain/
folder and select the .c file that corresponds to
your device (for example, system_nrf52.c).
-
Right-click Internal Files and select
Add Existing File again. This time, select
the startup file that you downloaded, for example,
SDK_dir/components/toolchain/embedded_studio/ses_nrf51_startup.s.
The Project Explorer should now look similar to this:
-
Include the device header files in the project:
-
Right-click your project and select Edit
Options.
-
Select Preprocessor.
-
Add the following path to the User Include Directories field:
../../../../../../components/device
The user include directories should now look similar to this:
-
If your project uses modules that require section variables (for example, the
Peer Manager, Flash Data Storage, or Flash Storage), define where in the flash
information from these modules should be stored.
-
Download the flash_placement.xml and place it in
your project directory.
Files are provided for the following versions of the nRF5 SDK:
-
If you are using SES v3.50 or later,
right-click your project, select Edit Options,
select Linker, and change the
Linker option to
GNU.
Note: This option does not exist in
SES
versions before 3.50.
-
Right-click on your project in the Project Explorer and select
Import Section Placement.
-
Confirm that you want to use the section placement for the current
build configuration.