3.4. Changing C Library

Flash algorithms can be built against either the standard C library or the microlib C library. The standard C library is selected by default, but you might want to use the microlib C library instead because it is smaller.

You can select a specific C library by adding one of --library_type=standardlib or --library_type=microlib to the Extra options box in the ARM RealView Linker section in the properties for your project. Although you can also specify the library type in the ARM RealView Compiler or ARM RealView Assembler sections of the project properties, the Eclipse Flash Programmer plug-in only uses the settings from the linker when importing flash algorithms.

If you choose to use the microlib C library, in addition to changing the library type used by the linker, you must also add code to your test project to initialize a stack and heap. You should add stack and heap initialization code to the testMain.c file so that it is only used when running the test harness. When your finished flash algorithm is imported and used from within Eclipse, a source file containing stack and heap initialization code is automatically created and linked into your algorithm by the Eclipse Flash Programmer plug-in if your algorithm uses the microlib C library.

For further information on both the standard and microlib C libraries and how to initialize the microlib C library, see the RealView Compilation Tools Libraries and Floating Point Support Guide. For further information on changing project properties, see the RealView Development Suite Eclipse Plug-ins User Guide.

Copyright © 2007. All rights reserved.DAI0190A
Non-Confidential