Linux Studio – Application Development on the Host
Linux Studio is an Integrated Development Environment with the power & features of the Embedded Studio IDE – designed especially for native host development.
Linux Studio makes the features of SEGGER’s award-winning IDE available to all Linux application developers. With its Visual Studio-style user interface, powerful project management, and integrated source-level debugger it makes native host application development on Linux smooth and easy.
Any developer who has used Embedded Studio for firmware development will find Linux Studio to be the perfect fit. Through a single common interface and environment for all projects, Embedded Studio and Linux Studio boost productivity.
Likewise, Linux Studio increases efficiency for all developers by making all tools and resources for even the largest projects available within one application.
- Sleek user interface with Visual Studio-style appearance
- Powerful project management
- Full-fledged integrated source-level debugger
- Common user interface for embedded development and native host development
Linux Studio’s powerful project manager enables straightforward organization of all project resources. File structures can be automatically pulled from the file system, or source files can be freely grouped in virtual folders for a better overview.
Multi-project solutions can keep all parts of an application, such as an executable, additional libraries, and resources, together. With project dependencies, all related parts can be built if and when a source changes.
Pre- and post-build steps, as well as additional project types for staging, round off the project management. Linux Studio accompanies successful projects from the first file to the final delivery.
Linux Studio’s source code editor comes with well-known features such as syntax highlighting and easy navigation throughout all project sources. Other features, such as code completion, suggestions, and templates, also help increase the efficiency of development.
The build system of Linux Studio makes the native toolchain of the host system easy to use. Include paths, preprocessor definitions, and additional command line options can easily be set and selected in configuration dialogs. Build options can be overridden or extended for each individual file or group of files.
With the flexibility of Linux Studio’s build configurations, a project can not only be built in a debug and a release configuration, it enables defining configurations for any build target, such as different flavors of one application, with just a few clicks.
Linux Studio is a full-featured IDE that includes an integrated source-level debugger. Projects can be debugged in the same environment in which they are developed. While debugging, the source code editor enables setting breakpoints on the application’s source code lines, stepping through the source code, and quickly inspecting symbol values. Further dedicated debugging windows provide all necessary information and insights into the system.
In a debug session, Linux Studio enables full control of the target application. When debugging is started, the application runs to the entry point after startup, usually main(). From there it can simply be continued, or stepped through line by line. The source code editor always highlights where the application is currently halted. Source code breakpoints enable halting when a given line is executed. Manual controls allow interruption of execution at any point.
For regular terminal applications it is not necessary to open an external window and switch back and forth while debugging. Linux Studio includes the Debug Terminal window, which displays output to stdout and errout directly in the IDE.
Threads and Call Stack
The Threads window displays the list of all threads or tasks created by the target application. It provides information about the current state of each thread and where it is currently executing. By selecting a thread, its call stack and state can be further analyzed.
The Call Stack window displays the current path of execution, i.e. the callers of a function, usually up to the entry point. It can also provide information about the function parameters and its values.
Linux Studio features different windows to inspect and modify the state of variables and expressions. The Globals window displays all global variables, while the Locals window displays all local variables of the context. The Auto window displays all variables which are relevant to the currently active source line or block. Variables and expressions can also be manually selected for inspection in the Watches window. In addition to the symbol windows, mouse-over tooltips and the quick watch provide a quick look at symbols from within the source code editor.
Registers and Memory Windows
Getting information about the current hardware state is especially valuable in embedded development but might sometimes also be useful in host application development. Linux Studio provides the Register windows which displays the values of CPU registers, as well as the Memory windows which enables inspecting the content of the application’s memory image.
Getting the actual instructions which are executed is a more advanced low-level feature, too. Linux Studio includes a Disassembly window, which is synchronized with the source code and highlights the current instruction the application is halted at. Like in the editor, the run control features are also available on disassembly level.
Linux Studio includes all utilities of the IDE itself and uses the native gcc toolchain of the system. Once installed, Linux Studio is ready-to-run and a new project can be created to get development started.
Installation and Setup
The graphical installer guides through the installation.
Download and extract the setup to a folder on disk.
$ cd ~/Downloads $ wget https://www.segger.com/downloads/linux-studio/setup_linuxstudio_x64.tar.gz $ tar -xzvf setup_linuxstudio_x64.tar.gz
Go to the extracted folder and execute the setup
$ cd segger_linux_studio_<xxx>_x64 $ sudo ./install_segger_studio
Install the gcc toolchain and validate it is successfully installed
$ sudo apt install build-essential $ gcc --version
First Project – Hello World
On the first run of Linux Studio, it creates the famous “Hello World” project, ready to run, to provide a quick start. The Project Explorer window on the left is the central part to set up and mange projects. The root node is a solution, in which one or multiple projects can be organized. Underneath each project, its source files and additional items are organized in folders. Linux Studio features the use of dynamic folders, which automatically include all files within a given directory on the file system, and the use of virtual folders, to which any files can be added regardless of their organization on disk.
For the “Hello World”, Linux Studio created a solution “Hello” with the main application project “Hello”. It includes a virtual folder “Source Files” and the single application source file: main.c.
The Project can be built with Build → Build Hello or by pressing [F7].
Linux Studio calls the compiler and linker on the project sources and produces the output application file.
Once the build is complete, the application can be executed or run in the debugger. To start a new debug session, select Debug → Go or [F5].
Linux Studio starts the application in the debugger and lets it run to the application entry point, main(), which gets highlighted as the active line in the source editor.
Breakpoints can be set in the source code on any line, that has produced code, indicated by the blue arrows on the left. A click on them or [F9] toggles breakpoints.
Application execution can be continued with Debug → Go [F5], or stepped through with Debug → Step Over [F10]. When stepping over the printf(), the Terminal displays the “Hello World” output.
Once getting started with the Hello World project is done, a new solution with a new project can be generated via File → New Project…
Select to create the project in a new solution. Choose “A Linux executable” as the project template, enter the project’s name and location, and finish the project wizard.
Linux Studio is available as a SEGGER Software Tool under SEGGER’s Friendly License for non-commercial use and under SEGGER’s Commercial-use License. The commercial-use license offers different licensing options for single seats, portable dongles, or multi-user and company-wide licenses, to fit the needs of any development team.
Licenses for Linux Studio are perpetual, no annual subscription is required. The commercial-use license includes 12 months of updates and technical support, which can be extended any time.
- Linux x86/x64, kernel 3.4 and above
- Tested on Ubuntu 16.04 LTS to 20.04 LTS.
- 2 GHz CPU or better
- min. 4 GB RAM
- min. 2 GB Disk space