10.3.11. Entering C code

It is now safe to call C code, for example:

	IMPORT		C_Entry
	BL      	C_Entry

Notes on using the main function

When building a ROM image using the Embedded C Library, call the C entry point something other than main(), for example C_entry or ROM_entry.

When the compiler compiles a function called main(), it generates a reference to the symbol __main to force the linker to include the basic C run-time system from the semihosting ANSI C library. If you are not linking with the C library (when building the ROM), this causes an error.

If you use the main() function only when building an application version for debugging, comment it out with an #ifdef when building a ROM image.

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