gpt4 book ai didi

c - 什么是相当于gcc中的Keil _at_

转载 作者:行者123 更新时间:2023-12-04 10:46:57 36 4
gpt4 key购买 nike

gcc 是否有任何与 _at_ 完全相同的关键字?在 Keil ?

struct Location
{
uint_32 x;
uint_32 y;
uint_32 z;
char protocol[10];
};

struct link idata list _at_ 0x40; /* list at idata 0x40 */

注意:我根本不想定义指针。我想要一个完全相同的变量。

注: idata这里可以忽略。

最佳答案

不,它没有。本Keil支持page关于该主题还表明没有直接等同于 CARM 的 __at__和 armcc 的 __attribute__(at)在 gcc 中:

GNU GCC Compiler
Use only pointer definitions to access absolute memory locations. For example:

/* General Purpose Input/Output (GPIO) */
#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
.
.
.
IOPIN0 = 0x4;

作为替代方案,您还可以使用 ld 定义您自己的部分。脚本。

关于c - 什么是相当于gcc中的Keil _at_,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59658417/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com