Segger Embedded Studio: Try This New Embedded Compiler Environment!

Segger Embedded Studio: Try This New Embedded Compiler Environment!

SEGGER Embedded Studio (SES) is reportedly being used by an increasing number of developers, especially since it is free for you while others charge. Recently, I started using this SES platform while developing some positioning communication projects on the DW1000, but since I hadn’t worked on these for a long time, I had forgotten some simple things. Therefore, I took the time to summarize and learn.

What is SES?

Embedded Studio is a new embedded compiler environment (IDE) developed by SEGGER, which can be used to manage, build, test, and deploy embedded applications. The Nordic SDK will only update project files to the SES development environment, and Keil and IAR are no longer supported.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Main Features:

  • Professional IDE solution for embedded C/C++ programming

  • Cross-platform: runs on Windows, macOS, and Linux

  • Includes Clang/LLVM and GCC C/C++ compilers

  • Highly optimized runtime library for best performance and minimal code size

  • Feature-rich debugger with seamless J-Link integration

  • Powerful project manager and source code editor

  • Package-based project generator for all common microcontrollers

  • Multi-threaded builds to minimize build time

  • Free for any non-commercial use, such as educational and evaluation purposes, with no restrictions

Download Link

https://www.segger.com/downloads/embedded-studio

Segger Embedded Studio: Try This New Embedded Compiler Environment!

What Are Some Usage Tips?

SES has many usage tips, and this article summarizes some useful tricks, but the most satisfying aspect is one word: fast.

Custom Keyboard Shortcuts

Click on the menu item through <span>Tools –> Options –> Keyboard</span> to customize keyboard shortcuts. Here are a few functions I modified:

  • DebugDownloadActive(F8): Download the current project.

In Keil, the download function uses the F8 shortcut, which is close to the Build function (F7), so I set it to the same shortcut.

Segger Embedded Studio: Try This New Embedded Compiler Environment!
  • EditGoToDeclaration(F11): Jump to function declaration.

The shortcut for jumping to function definitions is Alt+G and F12, the latter being a hidden shortcut, so I set it to be close to F11.

Segger Embedded Studio: Try This New Embedded Compiler Environment!
  • Jump to Function Definition

In Tools –> Options –> Text Editor, set Ctrl + Left Click Action to Go To Definition to achieve a similar function to “Ctrl+Click” in Source Insight for jumping to function definitions.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Remove Code/Data Columns in the Project

The project file browser displays the Code/Data size of each file, and these two columns cannot be resized, only moved horizontally. However, taking up too much space can reduce the code browsing area, which can be a bit uncomfortable, as shown in the image below.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

In the upper right corner of the toolbar, there is a settings menu where you can hide these two columns, as shown in the image below:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Simplify Project Options

Having too many entries in the project can make it difficult to find certain files, wasting time. If we only display the entries we need to change or reference, the method is to open the project file browser menu and make the following settings:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Then a <span>Project Options</span> directory will automatically be added to the project file browser, which contains the options we have modified. If we manually modify an entry in <span>Project Options</span>, the modified entry will be automatically added here. These entries cannot be deleted arbitrarily; deleting an entry means restoring its value to the default. The final effect is as follows:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Some Inconveniences of the Compiler

Recently, I accidentally removed the output window of the compiler, and dragging it back didn’t work. I later asked a knowledgeable friend and discovered the issue.Segger Embedded Studio: Try This New Embedded Compiler Environment!

The mouse must be placed within the red box in the image below.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Align by Equal Sign

When writing code, you often encounter the following situation:

fpoll_head.type = POLL;
fpoll_head.sendID = myID;
fpoll_head.recID = myID + 1;
fpoll_head.len = PAYLOAD_LEN_MAX;

I hope these assignment operations are aligned by the equal sign to achieve the following effect:

fpoll_head.type   = POLL;
fpoll_head.sendID = myID;
fpoll_head.recID  = myID + 1;
fpoll_head.len    = PAYLOAD_LEN_MAX;
Segger Embedded Studio: Try This New Embedded Compiler Environment!

Select these lines and call the menu item:<span>Edit –> Column Tidy</span> to automatically align by the equal sign.

Hide Inactive Code

In projects, the #if 0 macro is often used to disable code. You can set the transparency of inactive code to achieve a better visual experience. For example, setting it to 5% will yield the following effect:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Edit Project Files

The SES project files <span>(*.emProject)</span> are actually XML files that can be edited directly in certain scenarios. Click Project –> Open Solution in Editor to open the emProject file.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Custom Macro Tags

SES supports standard <span>TODO</span> and <span>FIXME</span> macro tags, and also supports custom macro tags, which is especially useful when debugging code.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

As shown in the image, starting a code comment with <span>FIXME</span> will highlight it.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Serial Terminal

SES has a built-in simple serial print window, so you don’t need to open a third-party serial tool during debugging.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Set the serial baud rate, serial number, etc., in Properties, and the final output on the serial port is shown in the image below:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Precompiled Code

Some macro codes in the code are nested and concatenated, making it difficult to intuitively know the prototype functions and parameters behind the macros. SES can output precompiled files in the current source file, as shown in the image below:

Segger Embedded Studio: Try This New Embedded Compiler Environment!

You can open a file named xxx_PP.c, which is the source file after preprocessing, and is very useful when tracing code.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Large Toolbar Icons

As monitor resolutions increase, small icons can be hard to see. SES allows you to set the toolbar icons to large icons for better visibility. In Tools –> Options –> Environment –> Show Large Icon In Toolbars, set it to Yes.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Floating Point

SES also supports floating-point printing, with specific settings as shown below.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Packages

SES comes with many packages that need to be downloaded. You can install them directly in <span>tools-->Package Manager</span>, which is quite comprehensive.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Conclusion

Embedded Studio is a powerful C/C++ IDE (Integrated Development Environment) for microcontrollers. Different platforms in embedded development have different development environments, and there are many commonly used tools. Whenever we encounter something new, it can be a bit daunting, but most of the functional patterns we know are beneficial for our development, helping us avoid pitfalls in the software environment.

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Segger Embedded Studio: Try This New Embedded Compiler Environment!

1. Foolproof Tutorial: How to Use the “All-in-One” Development Tool STM32CubeIDE

2. Microcontroller Engineer Wants to Transition to Embedded Linux After 6 Years, Not Sure How to Start?

3. Summary of 80 MCU Manufacturers from China and Abroad

4. Comparing STM32 and GD32 Firmware Libraries, You Will Discover the Secrets!

5. What Does Your Microcontroller Bare-Metal Program Framework Look Like?

6. Endorsement from Guru Jim Keller! RISC-V Enters the AI and Automotive Chip Fields!

Segger Embedded Studio: Try This New Embedded Compiler Environment!

Disclaimer: This article is a network reprint, and the copyright belongs to the original author. If there are any copyright issues, please contact us, and we will confirm the copyright based on the materials you provide and pay for the manuscript or delete the content.

Leave a Comment