Host: computer where tools are run
Target: processor you are shipping
Native tools – run on the host
- E.g. Windows NT compiler produces binary Pentium instructions (great for Pentium, worthless for Motorola 68000)
Cross-Compilers
- Runs on your host, but produces binary instructions for your target from your C/C++ programs. Cross-Assemblers
- Runs on your host, but produces binary instructions for your target from your assembly programs.
Tool Chains
- Named because output of one tool becomes the input for the next tool
- Tools compatible with a particular target are called a “Tool Chain” and are available from different vendors.
Why all these Tools?
- Why Won’t Any Compiler Work?
- Theoretically, it should.
- Problems occur with declarations (older styles, using functions without declaring them, undefined behavior in the standards, etc.)
- Why Won’t Host Code Work on Target?
- Different size ints Different structure packing Ability to access odd/even addresses Different peripherals and hardware