This blog is to quick introduce the Segger Embedded Studio and how to use it on nRF5 SDK.

A powerful and easy to use toolbox for developers – FREE for Nordic customers

Segger Embedded Studio is an easy-to-use integrated development environment with
project management tools, editor and debugger supporting ARM Cortex devices. Full debug
support including Real Time Terminal (RTT) output is also available.

Segger and Nordic have worked together for years and the Embedded Studio is used
internally by Nordic engineers. As such, if you use Segger Embedded Studio you can expect
additional training and support material.

Free for Nordic customers
Segger’s Embedded Studio IDE is now available for free to all Nordic Semiconductor
customers. Support for Segger Embedded Studio has been added to the latest release of the
nRF5 SDK, enabling developers to get going with code examples out of the box.

The agreement entitles Nordic customers to use Embedded Studio with any ARM Cortex-M
based device in our nRF series of wireless SoCs without any additional charges.

https://www.segger.com/products/development-tools/embedded-studio/

Online VidoTutorial of the Segger Embedded Studio

This video tutorial will show you how to get started with SEGGER Embedded Studio and how to open your first example in the nRF5 SDK. It will also show you how to add your free license in SEGGER Embedded Studio.

Youtube

There are up to 7 Online Video slips.

SEGGER Embedded studio – Getting started
SEGGER Embedded Studio – Build configurations
SEGGER Embedded Studio – Build settings
SEGGER Embedded Studio – CMSIS Configuration Wizard
SEGGER Embedded Studio – Requesting license in browser
SEGGER Embedded Studio – Importing files and drivers
SEGGER Embedded Studio – Basics of debugging

YouKu

Here are the same videos on the YouKu as alternative web page.

Installation on the CMSIS Wizard for SDK_CONFIG.h

The SDK configuration header file (sdk_config.h) helps to manage the static configuration of an application that is built on top of nRF5 SDK. The configuration options included in this file can be quickly edited in a GUI wizard that is generated from the CMSIS Configuration Wizard Annotations. This annotations standard is supported natively by ARM Keil uVision (versions 4 and 5) or can be parsed using an open source Java tool – CMSIS Configuration Wizard.

Every module in SDK contains at least one configuration option that enables this module. If the module is disabled, then even if source code is added to the project, it is not compiled because the module implementation is conditionally included. With only a quick evaluation of the sdk_config.h file, you can check which modules are used in the application:

example_module.c
|#include "sdk_config.h"
|#if EXAMPLE_MODULE_ENABLED
|...
|#endif //EXAMPLE_MODULE_ENABLED

An sdk_config.h file that contains all available configuration options for all modules in this SDK can be found in sdk/nrf5/config. This file is not actually used by any of the SDK projects, but it can serve as a template when developing a new application.

You need to install the Java first.

The open source Java tool CMSIS Configuration Wizard can be integrated with Segger Embedded Studio. The Java tool is bundled with the release and all examples have a reference to this tool (See “Project Macros” in project options).

The External Tools Configuration must be updated to enable integration with CMSIS Config Wizard.

  1. Go to File -> Open Studio Folder… -> External Tools Configuration.
  2. The tools.xml file will be opened in the editor.
  3. Insert the following text before the </tools> tag:
<item name="Tool.CMSIS_Config_Wizard" wait="no">
    <menu>&amp;CMSIS Configuration Wizard</menu>
    <text>CMSIS Configuration Wizard</text>
    <tip>Open a configuration file in CMSIS Configuration Wizard</tip>
    <key>Ctrl+Y</key>
    <match>*config*.h</match>
    <message>CMSIS Config</message>
    <commands>
      java -jar &quot;$(CMSIS_CONFIG_TOOL)&quot; &quot;$(InputPath)&quot;
    </commands>
</item>

Just like

Open sdk_config.h with cmsis

How to port the KEIL project to Segger Embedded Studio

I use the Segger Embedded Studio 4.20 version and port from the Nordic SDK 15.3\examples\ble_peripheral\ble_app_uart as the example.

Step 1:

Open the Segger Embedded Studio

Step 2: Select the KEIL 5 project (Import Keil MDK Project ARM complier 6)…

Step 3:

Select the correct compiler

If you select the internal Toolchain, it means to use the compiler (bundle with) Segger Embedded Studio.

If you select the external toolchain, it would use the KEIL compiler (you need to install the License KEIL version on your Laptop).

Step 4:

You would get the project as below. You need to modify the red blanket files in order to work with SES.

Meanwhile, you would see the new .emProject file to be generated.

Step 5:

Directly modify the xml (.emProject) for SES Project.

Step 6:

Add the path on configuration from reference and copy to the .emProject file.

More Details can be found at

https://infocenter.nordicsemi.com/pdf/getting_started_ses.pdf