KEIL每次都要编译全部文件并且每个文件编译三次

2023-05-16

SYD8801是一款低功耗高性能蓝牙低功耗SOC,集成了高性能2.4GHz射频收发机、32位ARM Cortex-M0处理器、128kB Flash存储器、以及丰富的数字接口。SYD8801片上集成了Balun无需阻抗匹配网络、高效率DCDC降压转换器,适合用于可穿戴、物联网设备等。具体可咨询:http://www.sydtek.com/

KEIL每次都要编译全部文件并且每个文件编译三次

这是因为勾选了“use cross-module optimization//跨模块优化说明:使能链接器反馈文件,从而能够更深层次的代码优化)”

 

•  Cross- Module  
Optimization  takes information from a prior build and uses it to place UNUSED functions into their 

own ELF section in the corresponding object file. This option is also known as Linker Feedback, and requires you to build your application twice to take adv antage of it for reduced code size.   
Cross-Module Optimization has been shown to reduce code size, by removing unused functions from your application. It can also improve the performance   of your application, by allowing modules to share inline code. 

以上内容摘录于:http://blog.csdn.net/yangtalent1206/article/details/8493120

也就是说避免了不用的函数也编译如代码中,减少最后的代码空间

 

下面上传本博客使用到的代码:

http://download.csdn.net/detail/chengdong1314/9801093

使用的芯片是SYD8801,该芯片详情请看:http://blog.csdn.net/chengdong1314/article/details/57253402

 

附录A:勾选了use cross-module optimization的编译打印输出:

*** Using Compiler 'V5.06 (build 20)', folder: 'd:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'Ble_Vendor_Service'
Clean started - Project: 'Ble_Vendor_Service'
   deleting intermediate output files for target 'Ble_Vendor_Service'
compiling main.c...
Main\main.c(139): warning:  #550-D: variable "i" was set but never used
        uint8_t i;
Main\main.c(103): warning:  #177-D: function "PowerDown" was declared but never referenced
  static void PowerDown()
Main\main.c: 2 warnings, 0 errors
compiling key.c...
compiling led.c...
compiling oled_12864.c...
compiling ota.c...
compiling syd8801_debug.c...
compiling syd8801_delay.c...
compiling syd8801_gpio.c...
compiling syd8801_timer.c...
compiling syd8801_uart.c...
compiling syd8801_ioi2c.c...
assembling startup_ARMCM0.s...
compiling system_ARMCM0.c...
linking...
Program Size: Code=17794 RO-data=2682 RW-data=184 ZI-data=5536  
".\Output\Ble_Vendor_Service.axf" - 0 Error(s), 2 Warning(s).

*** Performing Cross-Module-Optimization:
compiling main.c...
Main\main.c(139): warning:  #550-D: variable "i" was set but never used
        uint8_t i;
Main\main.c(103): warning:  #177-D: function "PowerDown" was declared but never referenced
  static void PowerDown()
Main\main.c: 2 warnings, 0 errors
compiling key.c...
compiling led.c...
compiling oled_12864.c...
compiling ota.c...
compiling syd8801_debug.c...
compiling syd8801_delay.c...
compiling syd8801_gpio.c...
compiling syd8801_timer.c...
compiling syd8801_uart.c...
compiling syd8801_ioi2c.c...
compiling system_ARMCM0.c...
linking...
Program Size: Code=16602 RO-data=2682 RW-data=176 ZI-data=5536  
compiling main.c...
Main\main.c(139): warning:  #550-D: variable "i" was set but never used
        uint8_t i;
Main\main.c(103): warning:  #177-D: function "PowerDown" was declared but never referenced
  static void PowerDown()
Main\main.c: 2 warnings, 0 errors
compiling key.c...
compiling led.c...
compiling oled_12864.c...
compiling ota.c...
compiling syd8801_debug.c...
compiling syd8801_delay.c...
compiling syd8801_gpio.c...
compiling syd8801_timer.c...
compiling syd8801_uart.c...
compiling syd8801_ioi2c.c...
compiling system_ARMCM0.c...
linking...
Program Size: Code=16602 RO-data=2682 RW-data=176 ZI-data=5536  
FromELF: creating hex file...
After Build - User command #1: "Output\HEX2BIN.EXE" "Output\Ble_Vendor_Service.hex"
hex2bin v1.0.6, Copyright (C) 1998 Jacques Pelletier
checksum extensions Copyright (C) 2004 Rockwell Automation
improved P.G. 2007
Lowest address  = 00006000
Highest address = 0000AC03
Pad Byte        = FF
8-bit Checksum = E9
".\Output\Ble_Vendor_Service.axf" - 0 Error(s), 2 Warning(s).
*** Completed Cross-Module-Optimization after 3 iteration(s).
Build Time Elapsed:  00:00:10

 

附录B:不勾选use cross-module optimization的编译打印输出:

*** Using Compiler 'V5.06 (build 20)', folder: 'd:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'Ble_Vendor_Service'
compiling key.c...
compiling led.c...
compiling main.c...
Main\main.c(139): warning:  #550-D: variable "i" was set but never used
      uint8_t i;
Main\main.c(103): warning:  #177-D: function "PowerDown" was declared but never referenced
  static void PowerDown()
Main\main.c: 2 warnings, 0 errors
compiling ota.c...
compiling oled_12864.c...
compiling syd8801_debug.c...
compiling syd8801_delay.c...
compiling syd8801_timer.c...
compiling syd8801_gpio.c...
assembling startup_ARMCM0.s...
compiling syd8801_ioi2c.c...
compiling syd8801_uart.c...
compiling system_ARMCM0.c...
linking...
Program Size: Code=17794 RO-data=2682 RW-data=184 ZI-data=5536  
FromELF: creating hex file...
After Build - User command #1: "Output\HEX2BIN.EXE" "Output\Ble_Vendor_Service.hex"
hex2bin v1.0.6, Copyright (C) 1998 Jacques Pelletier
checksum extensions Copyright (C) 2004 Rockwell Automation
improved P.G. 2007
Lowest address  = 00006000
Highest address = 0000B0B3
Pad Byte        = FF
8-bit Checksum = D3
".\Output\Ble_Vendor_Service.axf" - 0 Error(s), 2 Warning(s).
Build Time Elapsed:  00:00:02

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

KEIL每次都要编译全部文件并且每个文件编译三次 的相关文章

  • Keil 查看文件路径的方法

    目录 方法一 xff1a 方法二 xff1a 方法一 xff1a 在工程种选择任意一个文件 xff0c 然后点击右键 xff0c 选择 34 Option for File 34 就可以看到这个文件的路径了 方法二 xff1a 在文件框种右
  • Keil使用命令行附加预定义宏编译

    1 前言 很多时候 xff0c 一份Keil工程代码可能需要满足多个不同的应用场景 可以通过逻辑判断 xff0c 将多个不同的点集成在一份代码之中 xff0c 但是嵌入式往往特别关注RAM空间 xff0c 集成过多的逻辑判断 xff0c R
  • 使用makefile替换Keil进行编译

    KEIL PATH 61 C Keil ARM ARMCC 61 KEIL PATH BIN40 armcc ARMASM 61 KEIL PATH BIN40 armasm ARMAR 61 KEIL PATH BIN40 armar A
  • keil 5的软件仿真遇到的问题:error 65: access violation at 0x40021000 : no 'read' permission的解决办法

    我们有时候在用keil 5的软件仿真时会碰到这个问题 xff1a error 65 access violation at 0x40021000 no 39 read 39 permission 很纳闷 xff0c 硬件调试都对 xff0c
  • Keil调试局部变量显示"not in scope"的问题解决

    今天在调试程序的时候 xff0c 发现函数返回值赋值给变量时 xff0c 变量值总是显示 34 not in scope 34 xff0c 无法看到变量被赋的值 出现这种情况的原因是这个局部变量没被分配到内存 xff0c 或者变量被编译器优
  • keil的错误: Error: Encountered an improper argument 的解决方法

    将附件中的文件下载然后放到keil一下的安装目录中即可C Keil v5 UV4 xff0c 选择替换即可 文件链接 xff1a http download csdn net download ma57457 10118005 官方说的是支
  • keil MDK5,ARM-CC--->的使用

    文章目录 屏蔽某个waring 屏蔽某个waring 我们通过 options for target gt C C 43 43 gt Misc Controls中添加 diag suppress span class token opera
  • error: #40: expected an identifier

    错误指向stm32f10x h typedef enum FALSE 0 TRUE FALSE bool 原因是在其他文件中重复 define了FALSE 的值 将其注释掉即可
  • keil错误 ERROR:PREPROCESSOR: MACROS TOO NESTED

    1 错误显示 2 找到错误文件夹 3 错误为 h文件写成 c文件 4 更改为 include dmafe h 即可
  • --- Error: User Command terminated, Exit-Code = 1解决办法

    使用keil MDK编译项目时 compiling编译通过 但是文件最后出现错误 Error User Command terminated Exit Code 1 经查阅资料 MDK需要fromelf exe文件生成 bin 那么在重新安
  • keil5烧录或下载程序出现停止工作的问题

    本人在使用keil5烧录或下载程序出现停止工作的问题 开始认为是keil版本的原因 后来使用了keil4发现问题依然存在 发现因为本人使用了盗版JLINK被驱动检测出来了 由于安装的驱动版本为V6 14 新版的驱动检测到盗版JLINK 一旦
  • keil编译错误:ERROR L250: CODE SIZE LIMIT IN RESTRICTED VERSION EXCEEDED

    出现这个错误 很多网上都说是没注册成功导致的 注册成功的话会在keil的菜单栏 help gt about 里看到如下的显示 我的keil里about显示注册成功了 但还是出现错误提示 ERROR L250 CODE SIZE LIMIT
  • keil5 编辑栏一直是灰色

    无语了 气炸了 愤怒啊 查了一下 有很多 arm 和 c51 并存 不管他了 之前装了用完51 又装了arm 现在反而什么都用不了 打开license 发现过期了 重新破解 即可 注意音乐 大半夜吓死人 你以为这样就可以了 你就太天真了 网
  • 嵌入式平台memcpy实验总结

    1 概述 最近项目中性能比较吃紧 经过跟踪发现 memcpy操作的性能存在一定问题 于是 做了一些尝试去验证一些想法 记录一下 环境 MDK530 Cortex M0芯片 主频80MHz左右 2 优化手段 在优化之前 我们要先确定基本的性能
  • 使用fromelf把axf文件转换成elf格式

    FROMELF用法 命令格式 fromelf options input file fromelf h即可打印出帮助信息 Product MDK Plus 5 29 Component ARM Compiler 5 06 update 6
  • L6050U compile erro

    L6050U The code size of this image exceeds the maximum allowed for this version of the linker 原因 是 用的 是 EVb版本 需要 正版 才没有
  • Undefined symbol assert_param

    Undefined symbol assert param Objects led axf Error L6218E Undefined symbol assert param referred from misc o Keil MDK 5
  • 关于Keil不识别系统头文件core_cm3.h的问题

    之前遇到一次这个问题 解决了 之后又遇到一次就忘了之前是怎么解决的了 所以记录一下 所有不识别系统头文件的问题都可以用这种方式解决 找到你工程目录下的头文件 我以core cm3 h为例 这个头文件在STM32 LIBRARY CMSIS
  • Keil警告和错误语句与消除方法笔记

    遇到的keil相关错误 警告内容在这里进行更新 Warning 1 D last line of file ends without a newline 文件最后一行不是新行 解决 保证文件最后一行什么符号也没有 167 D argumen
  • Keil注释中的中文字体乱码解决方法

    1 刚刚安装好keil发现选中keil的注释部分会乱码 而且修改注释也会出现莫名的乱文 2 在edit configuration中 Editor Encoding改为Chinese GB2312即可 需要将乱码删掉 重新输入就不会出现乱码

随机推荐