Overview

In general terms, an embedded systems developer programs small but powerful microprocessors to perform specific tasks. These software programs for controlling the hardware are often referred to as firmware. One such use for firmware might be controlling small stepping motors in an automobile seat.

The developer instructs what the hardware should do with one or more programming languages, which have evolved over time. The three principal languages in use to program embedded microprocessors are C and its variants, various forms of C++, and assembly languages that are specially tailored to families of microcontrollers. C and C++ have been fairly standardized through years of use, whereas assembly languages vary widely and are usually designed by semiconductor manufacturers for specific families or even subfamilies, which are often called derivatives, of their embedded microprocessors.

Assembly language instructions are considered as being at a lower level (closer to the hardware) than the essentially standardized C statements. Programming in C may require some additional assembly instructions to be generated over and beyond what an experienced developer could do in straight assembly language to accomplish the same result. As a result, assembly language programs are usually faster to execute than C instructions, but require much more programming effort. In addition, each chip series usually has its own specialized assembly language which is only applicable for that family (or subfamily) of CPU derivatives.

Higher-level languages, such as C use assemblers to translate the syntax used by the programmer to the machine-language of the microprocessor, whereas assembly language uses assemblers. It is also possible to mix assembly and C source code in a single project. See the Mixed C and Assembler Applications chapter.

This manual covers the Assembler dedicated to the Freescale S12Z series of microcontrollers. The S12Z Assembler can be used as a transparent, integral part of CodeWarrior Development Studio for Microcontrollers V10.x. This is the recommended way to get your project up and running in minimal time. Alternatively, the Assembler can also be configured and used as a standalone macro assembler as a member of Build Tool Utilities, such as a (Smart) Linker, Assembler, ROM Burner, Simulator, or Debugger.

The typical configuration of an Assembler is its association with a Project Directory and an External Editor. The CodeWarrior software uses the project directory for storing the files it creates and coordinates the various tools integrated into the CodeWarrior suite. The Assembler is but one of these tools that the IDE coordinates for your projects. The tools used most frequently within the CodeWarrior IDE are its Editor, Compiler, Assembler, Linker, the Simulator/Debugger, and Processor Expert. Most of these Build Tools are located in the <MCU>\s12lisa_support subfolder of the CodeWarrior installation directory. The others are directly integrated into CodeWarrior Development Studio for Microcontrollers V10.x.

The textual statements and instructions of the assembly-language syntax are written by editors. The CodeWarrior IDE has its own editor, although any external text editor can be used for writing assembly code programs. If you have a favorite editor, chances are that it can be configured so as to provide both error and positive feedback from either the CodeWarrior IDE or the standalone Assembler.