日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2025/3/15 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 STM32开发 -- cannot open source input file absacc.h 解决方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

如需轉載請注明出處: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 解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。