如需转载请注明出处:https://blog.csdn.net/qq_29350001/article/details/80831070

问题描述:

使用 keil MDK 5.24
代码里有包含头文件 absacc.h
也使用了相关功能 const uint8_t ver[32] __at (0x08002400) =“12345678V01.01”;

编译出现错误:cannot open source input file “absacc.h”: No such file or directory

解决方法:

找了个 keil MDK 4.74 (安装地址:C:\Keil\ARM\ARMCC\include)的 absacc.h 拷贝到 keil MDK 5.24(安装地址:C:\Keil_v5\ARM\ARMCC\include)里,问题解决。

下载:百度网盘 – absacc.h

原因:

keil MDK 5.24 版本里缺少 absacc.h

使用

参看: attribute((at(address))) variable attribute

attribute((at(address))) variable attribute
This variable attribute enables you to specify the absolute address of a variable.

Syntax

attribute((at(address)))
Where:
address
is the desired address of the variable.

Usage

The variable is placed in its own section, and the section containing the variable is given an appropriate type by the compiler:
Read-only variables are placed in a section of type RO.
Initialized read-write variables are placed in a section of type RW.
Variables explicitly initialized to zero are placed in:
A section of type ZI in RVCT 4.0 and later.
A section of type RW (not ZI) in RVCT 3.1 and earlier. Such variables are not candidates for the ZI-to-RW optimization of the compiler.
Uninitialized variables are placed in a section of type ZI.

Note

GNU compilers do not support this variable attribute.

Restrictions

The linker is not always able to place sections produced by the at variable attribute.
The compiler faults use of the at attribute when it is used on declarations with incomplete types.

Errors

The linker gives an error message if it is not possible to place a section at a specified address.

Example

const int x1 attribute((at(0x10000))) = 10; /* RO /
int x2 attribute((at(0x12000))) = 10; /
RW /
int x3 attribute((at(0x14000))) = 0; /
RVCT 3.1 and earlier: RW.
* RVCT 4.0 and later: ZI. /
int x4 attribute((at(0x16000))); /
ZI */

如需转载请注明出处:https://blog.csdn.net/qq_29350001/article/details/80831070

STM32开发 -- cannot open source input file absacc.h 解决方法相关推荐

  1. error: #5: cannot open source input file core_cm3.h: No such file or directory

    用Keil  vision5编译时出现以下错误: D:\MDK\install\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Device\Include\stm32f10x.h ...

  2. 02_Keil5报错 error: #5: cannot open source input file “XXX.h”: No such file or directory解决方法

    Keil5  error: #5: cannot open source input file "led.h": No such file or directory 是找不到包含文 ...

  3. error: #5: cannot open source input file “stm32f10x_lib.h“:

    目录 一.问题概述 二.问题解决 三.stm32f10x_lib.h和stm32f10x.h 一.问题概述 一个旧程序使用了keil 4.10版本,需要统一到keil 5.17上.结果发现使用5.17 ...

  4. ThinkPHP 的URL重写时遇到No input file specified的解决方法

    因为在Fastcgi模式下,php不支持rewrite的目标网址的PATH_INFO的解析 ThinkPHP运行在URL_MODEL=2时,会出现 No input file specified.的情 ...

  5. Magento报错“No Input File Specified”的解决方法

    我的解决方法: 1. 修改根目录的php.ini为php5.ini 2. php5.ini中max_input_time改成300,同时在最后添加上 cgi.fix_pathinfo = 1 3. m ...

  6. No input file specified的解决方法

    方法/步骤 提示:"No input file specified."原因在于使用的PHP5.6是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误. ...

  7. 提示No input file specified的解决方法

    (一)IIS Noinput file specified 方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS 方法二: 请修改php.ini 找到 ; cgi. ...

  8. 网站搬家了出现No input file specified的解决方法

    今天把 老品牌网址导航 WordPress的站搬到新的服务器空间,结果访问出现"No input file specified."于是网上找解决方法,经过多次测试,终于得到解决,经 ...

  9. 移植RTT使用cubeMx配置后出现 cannot open source input file stm32f1xx_hal_exti.h: No such file or directory

    问题原因: 因为官方的f1HAL库存在没有"stm32f1xx_hal_exti.h"文件, 解决办法: 从cubuMx生成的工程内部复制一个"stm32f1xx_hal ...

最新文章

  1. OpenCV求逆(伪逆)矩阵函数
  2. 求一个容器的最值的索引_殊途同归——从一道经典的多元最值问题说开
  3. Sersync实现触发式文件同步
  4. Linux vim光标快速移动指定行数G
  5. kali Linux 火狐浏览器改中文
  6. 二、数据库设计与操作
  7. mysql event 变量_mysql 中event的用法
  8. autojs toast 可以改变字体颜色吗_喃喃札记 | 你真的需要一部pad做笔记吗?
  9. iPhone SplitViewController
  10. linux计划任务一小时,linux,计划任务,每小时执行一次(共7篇).docx
  11. 空间数据库学习笔记(四):空间引用标识符(SRID)
  12. IOS11.03越狱
  13. codeforces1670F Jee, You See?(DP/位运算/前缀和/组合数)
  14. 基于51单片机土壤湿度检测及自动浇花系统(带时间显示)
  15. 无符号整数与有符号整数相加问题
  16. 人成长中必须知道的20个故事
  17. 电脑拨号无法连接远程计算机,Win8宽带连接错误720不能建立远程计算机连接如何解决...
  18. 电子政务信息交换平台与数据中心的构建
  19. 基本算法之枚举:202.称体重
  20. 反激变压器气隙宽度计算公式推导

热门文章

  1. 【ACM】最长公共子序列 - 动态规划
  2. 查看服务器硬件配置信息(cpu/内存)
  3. java 获取当前时间月加1 ,年加1
  4. Java学习----你的选择是什么-条件结构
  5. ActionScript 3 作用域内部细节介绍
  6. TCP协议实现文件传输
  7. /etc/fstab自动挂载文件详解
  8. 吴恩达 coursera ML 第四课总结+作业答案
  9. Python:Selenium错误小结
  10. 给初学者们讲解人工神经网络(ANN)