1、nano模式:

newlib库存在nano模式,如esp sdk开启模式配置:

make menuconfig -> Component config ---> Newlib -->[ ] Enable 'nano' formatting options for printf/scanf family

2、nano模式作用

经测试,nano模式会减伤编译库的大小,最终大小对比如下表,大概可以节约40K的代码空间

版本分类 版本大小
未开启Nano模式 148K

开启Nano模式

104K

而根据newlib中功能定义,Nano模式有以下影响:

1、malloc功能
NEWLIB has two implementations of malloc family's functions, one in`mallocr.c' and
the other one in `nano-mallocr.c'.  This optionsenables the nano-malloc implementation,
which is for small systems with very limited memory.

2、不支持long double,只支持C89标准

 1) The non-wide-char formatted I/O functions only support the C89standard.  The only exception is the configuration option provideslimited support for long double.  Internally, the nano formatted I/Ofunctions use double so accuracy is only guaranteed to doubleprecision.2) Floating-point support is split out of the formatted I/O code intoweak functions which are not linked by default.  Programs that needfloating-point I/O support must explicitly request linking of one orboth of the floating-point functions: _printf_float or _scanf_float.This can be done at link time using the -u option which can be passedto either gcc or ld.  The -u option forces the link to resolve thosefunction references.  Floating-point format specifiers are recognizedby default, but if the floating-point functions are not explicitlylinked in, this may result in undefined behavior for programs thatneed floating-point I/O support.3) Integer-only versions of the formatted I/O functions (the iprintf/iscanf family) simply alias their regular counter-parts.The affected functions are:
 4) As mentioned, the option does not affect wide-char formatted I/O.The following configuration options are ignored for non-wide-charformatted I/O functions, and can be thought of as disabled.
 5) As a rule, no features from outside of C89 standard will beconsidered in this implementation.

newlib nano 模式相关推荐

  1. 喜马拉雅小雅Nano首发,仅需1元即可预约限量抢购

    文|曾响铃 来源|科技向令说 ​ 今天,喜马拉雅上线首发小雅Nano,喜欢智能音箱的粉丝们又有福利了.小雅Nano是一款能免费听喜马拉雅会员精品的AI音箱产品.想要第一时间尝鲜的话很简单,只要在喜马拉 ...

  2. 1.3 nuclei sdk Makefile分析

    nuclei sdk Makefile分析 Make 命令 1. 根目录Makefile 2. 源码选择application/baremetal/helloworld Makefile如下 3. 分 ...

  3. NXP智能驾驶软件系统

    NXP智能驾驶软件系统 ADAS和高度自动驾驶 汽车解决方案 市场领先的ADAS解决方案 先进的驾驶员辅助系统(ADAS)提供了安全的.日益自动化的驾驶体验,这将重塑出行关系.自动驾驶技术将很快让乘客 ...

  4. STM nucleo 64 on Arduino IDE

    文章目录 开发板 stm32 core库版本选择 开发板配置(最下方) 下载(SWD) 开发板 stm32 core库版本选择   这里注意在安装STM32 Cores里,起初安装最新1.9.0的版本 ...

  5. 大淘宝服务端技术干货沉淀和总结

    网络基础 TCP三次握手 三次握手过程 客户端--发送带有SYN标志的数据包--服务端 一次握手 Client进入syn_sent状态 服务端--发送带有SYN/ACK标志的数据包--客户端 二次握手 ...

  6. python 各种模块学习

    from:https://blog.csdn.net/weiwangchao_/article/details/70570508 转载:.... Python的模块大全,很全,有详细介绍! 另外附Py ...

  7. linux文本编辑nano

    2019独角兽企业重金招聘Python工程师标准>>> Nano命令指南 今天在输命令时,无意中输入了nano,对这个命令不太熟悉,结果不知道如何才能退出,保存,赶快查了一下资料,原 ...

  8. stm32 文件系统dma大小_「正点原子NANO STM32F103开发板资料连载」第二十二章 DMA 实验...

    1)实验平台:[正点原子] NANO STM32F103 开发板 2)摘自<正点原子STM32 F1 开发指南(NANO 板-HAL 库版)>关注官方微信号公众号,获取更多资料:正点原子 ...

  9. hal库开启中断关中断_「正点原子NANO STM32开发板资料连载」第十章 外部中断实验...

    1)实验平台:ALIENTEK NANO STM32F411 V1开发板 2)摘自<正点原子STM32F4 开发指南(HAL 库版>关注官方微信号公众号,获取更多资料:正点原子 第十章 外 ...

最新文章

  1. 遗传算法就是创造力的本质
  2. Android多线程之ArrayBlockingQueue源码解析
  3. 内核数据结构之红黑树
  4. 85. Leetcode 746. 使用最小花费爬楼梯 (动态规划-基础题)
  5. java同名不同包文件_java – 如何从不同的JAR读取同名的几个资源文件?
  6. Java Iterator到Java 8 Stream
  7. C# 8.0 的新特性概览和讲解
  8. Eclipse 常用快捷键(转)
  9. java对象命名用变量_在Java语言中,所有的变量、常量、对象和类都是用【 】来命名的。...
  10. css3的那些高级选择器一
  11. 【10g中db_recovery_file_dest和log_archive_dest参数的关系】
  12. Playmaker节点工具使用(二)—Odin绘制支持
  13. 基于c#的海量图片查重去重
  14. 高位十字星收盘什么意思?高位十字星缩量是什么?
  15. 大数据决策的误区案例之一
  16. Python每日一记42机器学习中特征重要性feature_importances_
  17. JS 报错getElementsByClassName.appendChild报错“Uncaught TypeError: s.appendChild is not a function”
  18. ToolStrip添加任意控件实现
  19. Python 语言中有关复数的几个概念
  20. Flink保证exactly-once机制介绍:checkpoint及TwoPhaseCommitSinkFunction

热门文章

  1. PE安装Win7纯净版教程【附纯净版Win7/64/32位系统安装包】
  2. 央行修法,币圈利空?并非如此
  3. 将第二大脑清单化的9种笔记清单类型
  4. 在excel表中=round是什么意思
  5. PHP学习和前端学习哪个更有前途
  6. python3 爬取汽车之家所有车型数据操作步骤(更新版)
  7. linux 莫名其妙出现什么crawling and gvfs denied 错误
  8. VIVADO仿真数据保存
  9. 用数字计算机公式表白,数字表白公式 表白套路情话
  10. java递归输出杨辉三角,杨辉三角算法 | zhangman523