Instiq
Chapter 5 · Embedded software development·v1.0.0·Updated 7/10/2026·~15 min

What's changed: Initial version

5.1Cross-development environment

Key points

Covers the roles of the cross compiler, linker, and locator, which generate executable code on a host such as a PC for a target (embedded board); how to choose among ICE, JTAG, SWD, and emulators for debugging directly on the target hardware; and the judgment needed for real-hardware debugging in practice.

In embedded development, running a compiler directly on the target microcontroller board is not practical. Developers run the development environment on a host such as a PC, generate executable code for the target, place it according to the target's memory layout, and finally must directly observe whether the code behaves as written on the target hardware itself. This section builds an understanding of how the toolchain divides these roles, and the judgment needed to choose the right tool for real-hardware debugging.

5.1.1Cross compiler, linker, and locator

  • A cross compiler runs on the development host (a PC, typically x86) but generates machine code for the target (an embedded board, e.g., ARM Cortex-M). It is needed because the host and target CPU architectures differ.
  • A linker combines multiple compiled object files and libraries into a single executable file. A locator places the linked code and data at specific addresses on the target's actual memory map (Flash start address, RAM start address, etc.). In embedded development, the standard practice is to check the map file the locator produces to verify that code size and data placement fit within the target's memory capacity.

Continue reading — free sign-up

You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.