| 我昨天也遇到同样的问题, 搜索后得到这样的帖子:
 https://my.st.com/public/STe2eco ... mp;currentviews=782
 
 解释如下:
 There are two different sets of runtime libraries provided:
 ● The IAR DLIB Library, which supports ISO/ANSI C and C++. This library also
 supports floating-point numbers in IEEE 754 format and it can be configured to
 include different levels of support for locale, file descriptors, multibytes, et cetera.
 ● The IAR CLIB Library is a light-weight library, which is not fully compliant with
 ISO/ANSI C. Neither does it fully support floating-point numbers in IEEE 754
 format or does it support Embedded C++. (This library is used by default).
 
 Migration from CLIB to DLIB
 There are some considerations to have in mind if you want to migrate from the CLIB
 library, the legacy C library, to the modern DLIB C/C++ library:
 ● The CLIB exp10() function defined in iccext.h is not available in DLIB.
 ● The DLIB library uses the low-level I/O routines __write and __read instead of
 putchar and getchar.
 ● If the heap size in your old compiler version using CLIB was defined in a file
 named heap.c, you must now set the heap size either in the extended linker
 command file (*.xcl) or in the Embedded Workbench to use the DLIB library.
 
 Source: http://supp.iar.com/FilesPublic/ ... ferenceAddendum.pdf
 
 The compiler comes with the IAR DLIB Library, a complete library, compliant with
 Standard C and C++. This library also supports floating-point numbers in IEEE 754
 format and it can be configured to include different levels of support for locale, file
 descriptors, multibyte characters, et cetera.
 
 Source: http://supp.iar.com/FilesPublic/ ... opmentGuide.ENU.pdf
 
 我重写函数__read()后,可以解决lz的问题。
 |