2.1.1. Code examples

There are a number of code examples in this chapter. Many of them are supplied in the install_directory\RVDS\Examples\...\asm directory.

Follow these steps to build and link an assembly language file:

  1. Type armasm --debug filename.s at the command prompt to assemble the file and generate debug tables.

  2. Type armlink filename.o -o filename to link the object file and generate an ELF executable image.

To execute and debug the image, load it into a compatible debugger, for example RealView Debugger, with an appropriate debug target such as the RealView Instruction Set Simulator (RealView ISS).

To see how the assembler converts the source code, enter:

fromelf -c filename.o

See Linker User Guide for details on armlink and Utilities Guide for details on fromelf.

See the Application Binary Interface (ABI) documentation on http://infocenter.arm.com for details on ELF and DWARF.

Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J