你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

关于memset( )函数

[复制链接]
骆驼-350031 提问时间:2015-3-26 11:43 /
阅读主题, 点击返回1楼
收藏 评论23 发布时间:2015-3-26 11:43
23个回答
骆驼-350031 回答时间:2015-3-26 14:26:04
当然应用了
Eagleson 回答时间:2015-3-26 14:27:55
我自己也有用啊,没问题
Eagleson 回答时间:2015-3-26 14:28:57
软件勾选 使用 micro LIB了没
moyanming2013 回答时间:2015-3-26 14:31:03
Eagleson 发表于 2015-3-26 14:28
软件勾选 使用 micro LIB了没

microLib是最大限度的优化代码空间,但貌似处理不好有问题吧
zfz0122 回答时间:2015-3-27 00:10:36
不懂帮顶 3.gif
wu1169668869 回答时间:2015-3-27 00:19:06

同不懂帮顶 。
nocoyou 回答时间:2015-3-27 06:49:12
标准库不该有问题呀
Eagleson 回答时间:2015-3-28 10:40:57
moyanming2013 发表于 2015-3-26 14:31
microLib是最大限度的优化代码空间,但貌似处理不好有问题吧

microlib 是缺省 C 库的备选库。 它用于必须在极少量内存环境下运行的深层嵌入式应用程序。 这些应用程序不在操作系统中运行。microlib 不会尝试成为符合标准的 ISO C 库。
microlib 进行了高度优化以使代码变得很小。 它的功能比缺省 C 库少,并且根本不具备某些 ISO C 特性。某些库函数的运行速度也比较慢,例如,memcpy()。  
优化选项不是那个
木木鱼 回答时间:2015-3-29 08:55:54
不懂帮顶!
moyanming2013 回答时间:2015-3-29 17:33:00
本帖最后由 moyanming2013 于 2015-3-29 17:35 编辑
Eagleson 发表于 2015-3-28 10:40
microlib 是缺省 C 库的备选库。 它用于必须在极少量内存环境下运行的深层嵌入式应用程序。 这些应用程序 ...

我指勾不勾选microlib跟memset是否有问题基本无关。我倒认为,勾选了microlib反而会增加出问题的几率。如果代码空间够用,最好别勾选microlib。下面是使用microlib需要注意的一些问题(包括但不限于这些):
Microlib is not compliant with the ISO C library standard. Some ISO features are not supported and others have less functionality.
Microlib is not compliant with the IEEE 754 standard for binary floating-point arithmetic.
Microlib is highly optimized for small code size.
Locales are not configurable. The default C locale is the only one available.
main() must not be declared to take arguments and must not 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 against code that is not thread safe.
Microlib does not support wide characters or multibyte strings.
Microlib does not support selectable one or two region memory models as the standard library (stdlib) does. Microlib provides only the two region memory model with separate stack and heap regions.
Microlib does not support the bit-aligned memory functions _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 can be 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 streams are unbuffered.
feof() and ferror() always return 0 because the error and EOF indicators are not supported.

个人认为,为了保证代码的兼容性、可扩展性、可维护性,只在代码空间实在太大且不违背上述局限性时再考虑使用microlib优化空间的问题。

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版