|
STEP 6 - LANGUAGE TOOLS
Language tools are programs such as cross-assemblers and cross-compilers. Most people are familiar with language tools that run on a PC such as Visual Basic or C compilers. When using language tools for embedded systems, a “cross-assembler” or “cross-compiler” is used. These tools differ from typical compilers in that they run on a PC but produce code to run on another microprocessor, hence they “cross-compile” code for a microcontroller that uses an entirely different set of instructions from the PC. The language tools also produce a debug file that MPLAB® IDE uses to correlate the machine instructions and memory locations with the source code. This bit of integration allows the MPLAB editor to set breakpoints, allows watch windows to view variable contents, and lets you single step through the source code, watching the application execute.
Embedded system language tools also differ somewhat for compilers that run and execute on a PC in that they must be very space conscious. The smaller the code produced, the better, because that allows the smallest possible memory for the target, thereby reducing cost. This means that techniques to optimize and enhance the code using machine specific knowledge are desirable. The size of programs for PCs typically extends into the megabytes for moderately complex programs. The size of simple embedded systems programs may be as small as a thousand bytes or less. A medium-sized embedded system might need 32K or 64K of code for relatively complex functions. Some embedded systems use megabytes of storage for large tables, user text messages or data logging.

A Compiler Translates Source Code into Machine Language
Microchip Language Tools
|
Name
|
Description
|
Included free with MPLAB
|
MPASM
|
Macro Assembler
|
Yes
|
MPLINK
|
Object code Linkers to link C and Assembly modules
|
Yes
|
MPLIB
|
Librarian to store re-usable files
|
Yes
|
MPLAB C Compilers
|
ANSI compliant, optimized compilers
|
free demos available separately
|
|