Embedded Studio - Project Importer
Embedded Studio (3.10 and above) supports the use of external tool chains. This includes compilers from IAR and Keil.
The feature allows building with the external compiler while at the same time allowing developers to take advantage of the superior Embedded Studio IDE features of managing projects and advanced debugging capabilities.
With this feature any project imported to Embedded Studio will simply build on the original tool chain without changes. Developers can seamlessly and completely migrate to Embedded Studio while still retaining the ability to re-build projects with the former tools during the transition time.
This short video shows the steps needed to import an external IAR project into Embedded Studio IDE.
Why should I switch to Embedded Studio?
Embedded Studio is an industry leading streamlined and powerful IDE. It is specifically designed for professional embedded development: an all-in-one solution providing stability and a continuous workflow.
What is the different to other IDEs?
- Embedded Studio is created by embedded developers for embedded developers! Software teams at SEGGER use Embedded Studio for all production grade SEGGER software. They supplement the Embedded Studio development, share their experience, and provide feedback and requirements for a 'perfect' embedded development IDE.
- Embedded Studio's intuitive user interface is easy to use, works on any PC, MAC or Linux platform and supports all ARM microcontroller devices, including new V8M variants.
- Embedded Studio's licensing: The purchase of an Embedded Studio license (associated with your J-Link) entitles the user to install and use all Embedded Studio versions which will have been released within the Support and Update period for an unlimited usage period. To use a version of Embedded Studio after the Support and Update period no license renewal is required.
- Embedded Studio's download footprint is small with a straight forward, super fast, no fuss, installation. With Embedded Studio there are never feature restrictions or code size limitations, it is a full featured IDE out-of-the-box.
- With Embedded Studio the complete tooling source code is available so there is no dependency on the supplier. In addition the Embedded Studio IDE can be used without limitation even when used in "evaluation mode" - non commercial license model.
Is Embedded Studio a professional IDE?
Absolutely. Embedded Studio is created as a professional all-in-one solution to be used from system concept to production. Embedded Studio supports Thread awareness, trace and much more.
What about the compiler?
Embedded Studio comes with the two free toolchains, GCC and LLVM, which are perfectly suitable to create professional, high-quality code. The code quality produced by GCC or LLVM/Clang is on a par with commercial compilers.
Import existing projects to Embedded Studio
A more detailed description on how to port from IAR to Embedded Studio can be found in our wiki: Wiki
Quick Start Guide
Existing IAR Embedded Workbench and Keil uVision projects can easily be imported with Embedded Studio.
- Go to File -> Import IAR EWARM / Keil MDK Project... and select the project file to import.
The Project Importer allows to choose the build configurations to create. Additionally the external tool chain path can be set.
- External Toolchain imports the project and configures it to be built with the original toolchain.
- Internal Toolchain imports the project and sets the configuration for the Embedded Studio tool chain.
- Internal and External Toolchains creates a set of build configurations to build with the original tool chain and one set to build with the Embedded Studio tool chain.
- To migrate to Embedded Studio it is recommended to create build configurations for internal and external tool chains.
The Project Importer creates the new Embedded Studio project from the imported project and shows a status message.
- To build the project with the external tool chain choose a build configuration suffixed External, i.e. Debug External
Embedded Studio builds the project using the external tool chain (e.g. the IAR compiler). The output will be the same as compiled with the former IDE.
- To build the project with the Embedded Studio tool chain choose a build configuration suffixed Internal, i.e. Debug Internal
Embedded Studio builds the project using its tool chain (GCC). If the project does not build out-of-the-box refer to the next section Migration Guide to check what might need to be changed.
While imported projects will re-build with the external toolchain out-of-the-box, for GCC (and LLVM) based project build configurations, some manual changes may be required. In some cases the sources are created to be GCC compatible, then you can seamlessly switch between original tool chain and GCC. When the original project is created from a software pack or SDK, it might already come with GCC compatible source files which can replace the former tool chain compatible files.
The following section lists the most common changes which are required to migrate a project to Embedded Studio. If you are missing any instructions or have trouble importing your project to Embedded Studio, contact us at firstname.lastname@example.org.
Most common source changes
The Embedded Studio project importer does not import linker scripts (e.g. IAR icf files). It sets up the basic memory map for the selected target device, which will put code into the internal flash and data into the internal SRAM.
For more advanced or different configurations, the memory map file and the section placement file have to be set up accordingly.
Third Party Software and Libraries
Third party software, especially libraries, might be configured for one tool chain and do not compile with other tool chains.
Check if there is a port of the software for Embedded Studio / GCC or configure and rebuild the software for Embedded Studio / GCC.
Although libraries built for another tool chain may link with Embedded Studio, always take care and check that interfacing with the library works as expected.
Assembly Files and Inline Assembly
The syntax of assembler code and control commands in assembler files can be different across tool chains.
Although the resulting assembled instructions are identical, the assembler code to be written can be different across tool chains, for example numerical constants need to be declared differently for IAR and GCC.
Control commands which help writing assembler code is different, too. The syntax for symbols, labels, function definitions, and alike needs to be adjusted to work with the GNU assembler.
Tool chains use different built-in definitions to identify the compiler which is used and to allow conditional compilation based on the configuration of core, device, endianess, and other settings.
It is mandatory to choose the correct definitions and recommended to make sure the code throws a warning or error when required definitions are not defined.
IAR defines __ICCARM__ and __IAR_SYSTEMS_ICC__ which can be used for identification, Embedded Studio defines __SES_ARM and __GNUC__.
For the target device IAR defines __ARM7M__ and __CORE__=__ARM7M__ when compiling for Cortex-M4, Embedded Studio uses __ARM_ARCH_7M__ instead.
Tool Chain Intrinsics
Compiler-specific functions like __disable_interrupt() might not be available in Embedded Studio. Write corresponding replacement functions or avoid using them at all.