Use an external Toolchain with Embedded Studio

From SEGGER Wiki
Revision as of 16:12, 6 November 2019 by Nino (talk | contribs)
Jump to: navigation, search

Embedded Studio offers the option to build project with an external GNU toolchain of your choice. The following guide will show an example implementation of such a setup with the ARM GCC toolchain.

Example implementation with external GCC toolchain

  • First install the external toolchain of your liking, in this example the currently latest ARM GCC 7-2017-q4-major will be used.
  • Create a new externally build project using the Embedded Studio project wizard and selecting A C/C++ executable for ... processor(internal and external GNU tools).
New external build project
  • Select your target device, next set the toolchain path and finish the project setup by letting all settings on default.
  • Make sure the memory section placement segments are located in the correct memory areas. This can be found int he Common project settings under Linker-> Section Placement Segments
  • Now select build configuration "Debug External" and build the project to build with the external toolchain.
  • If the build succeeds you can download it into your target application and debug it.

Optional steps for more complex builds

When adding more complex projects to Embedded Studio as an external build usually additional steps are required to make full use of the external compiler. The following are the most common:

  • Preprocessor definitions: Under Preprocessor->Preprocessor Definitions in the external build configs missing preprocessor definitions can be set.
  • User include directories: Under Preprocessor->User Include Directories in the external build configs missing include directories can be added.
  • All other commands that can't be set directly through the Embedded Studio GUI need to be set manually to the external build command line which can be found under External Build in one of the external build project configurations.