Micro Lib 与 Standard Lib区别, 此处主要从ARM网站直接摘抄, 没有一一翻译, 很简单不难看懂:
Microlib is not compliant with the ISO C librarystandard. Some ISO features are not supported and others have lessfunctionality.
Microlib is not compliant with the IEEE 754 standard forbinary floating-point arithmetic.
Microlib is highly optimized for small code size.
Locales are not configurable. The default C locale isthe only one available.
main() must not be declared to take arguments and mustnot return.
Microlib provides limited support for C99 functions.
Microlib does not support C++.
Microlib does not support operating system functions.
Microlib does not support position-independent code.
Microlib does not provide mutex locks to guard againstcode that is not thread safe.
Microlib does not support wide characters or multibytestrings.
Microlib does not support selectable one or two regionmemory models as the standard library (stdlib) does. Microlib provides only thetwo region memory model with separate stack and heap regions.
Microlib does not support the bit-aligned memoryfunctions _membitcpy[b|h|w][b|l]() and membitmove[b|h|w][b|l]().
Microlib can be used with either --fpmode=std or--fpmode=fast.
The level of ANSI C stdio support that is provided canbe controlled with #pragma import(__use_full_stdio).
#pragma import(__use_smaller_memcpy) selects a smaller,but slower, version of memcpy().
setvbuf() and setbuf() always fail because all streamsare unbuffered.
feof() and ferror() always return 0 because the errorand EOF indicators are not supported.
主要宗旨是减少功能,为代码尺寸优化而考虑, 此外与C++的兼容性也不完全,使用C++的程序员最好不使用microlib,以免出现难以debug的冲突.
根据笔者的测试Dhrystone中,standardlib版本的性能大大超出microlib版本的性能,而对于Coremark,两个版本的性能类似.说明Coremark测试对于CPU/编译器的评估更加独立,不依赖运行时条件.
做完Runtime的初始化之后,即跳入用户的main函数,开始用户代码的运行过程.
|