__attribute__ ---Compile

Section for attribute

attribute_?嵌入式C代码属性怎么定义
https://www.elecfans.com/d/2269222.html

section 属性的主要作用是:在程序编译时,将一个函数或者变量放到指定的段,即指定的section 中。

一个可执行文件注意由代码段,数据段、BSS 段构成。代码段主要用来存放编译生成的可执行指令代码、数据段和BSS段用来存放全局变量和未初始化的全局变量。

除了这三个段,可执行文件还包含一些其他的段。我们可以用 readelf 去查看一个可执行文件各个section信息。
在这里插入图片描述
void attribute((interrupt, no_auto_psv)) _DMA1Interrupt(void)

在这里插入图片描述
// Align the buffer to 128 words or 256 bytes. This is needed for peripheral indirect mode
int BufferA[MAX_CHNUM+1][SAMP_BUFF_SIZE] attribute((space(dma),aligned(256)));
在这里插入图片描述

相关推荐

  1. go_compiler

    2024-02-16 09:38:03       4 阅读
  2. vue 透传 Attributes

    2024-02-16 09:38:03       17 阅读
  3. vue-template-compiler 的原理

    2024-02-16 09:38:03       28 阅读
  4. vue 透传 Attributes(二)

    2024-02-16 09:38:03       12 阅读
  5. C语言中,__attribute__关键字

    2024-02-16 09:38:03       10 阅读
  6. 从Makefile生成compile_commands.json

    2024-02-16 09:38:03       37 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-02-16 09:38:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-02-16 09:38:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-02-16 09:38:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-02-16 09:38:03       20 阅读

热门阅读

  1. 程序员为什么不喜欢关电脑?

    2024-02-16 09:38:03       31 阅读
  2. c# linq 查询

    2024-02-16 09:38:03       25 阅读
  3. Spark中多分区写文件前可以不排序么

    2024-02-16 09:38:03       34 阅读
  4. Vue插槽

    Vue插槽

    2024-02-16 09:38:03      23 阅读
  5. JVM学习

    JVM学习

    2024-02-16 09:38:03      27 阅读
  6. 学习总结16

    2024-02-16 09:38:03       27 阅读
  7. AutoSAR(基础入门篇)9.5-实验:配置通信

    2024-02-16 09:38:03       26 阅读
  8. PMP考试之20240216

    2024-02-16 09:38:03       28 阅读
  9. RISC-V和ARM

    2024-02-16 09:38:03       35 阅读