4.1.3. Separating the compile and link stages

Follow these steps to separate the compile and link stages:

  1. Quit the debugger if it is running.

  2. Enter armcc -c hello.c to recompile hello.c into an object file. No executable file is produced.

  3. Enter armlink hello.o -o hello3 to link the object file with a library and generate an executable program.

  4. Enter armsd hello3 to load the program into the debugger.

  5. hello3 contains no C source level debugging information because hello.o was compiled without the -g+ option, so you cannot view the source statements with the type command.

    However, you can refer to program locations and set breakpoints on them by using the @ character to reference the low-level symbols. For example, to set a breakpoint on the first location in main(), type: break @main.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D