Arm 了解ctags文件格式

Arm 了解ctags文件格式,arm,ctags,cortex-m,exuberant-ctags,Arm,Ctags,Cortex M,Exuberant Ctags,我使用“Exhuberant CTAG”对我的c项目中的所有标签进行索引。c项目是Cortex-M7微控制器的嵌入式软件。结果是一个标签文件。我正试图阅读此文件并理解写下的内容。 根据我为CTAG和Exhuberant CTAG找到的文档,我可以掌握大多数行的含义。例如: ADC3 .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h 1525;" d A0 .\Drivers\CMSIS\Include\arm_ma

我使用“Exhuberant CTAG”对我的c项目中的所有标签进行索引。c项目是Cortex-M7微控制器的嵌入式软件。结果是一个标签文件。我正试图阅读此文件并理解写下的内容。
根据我为CTAG和Exhuberant CTAG找到的文档,我可以掌握大多数行的含义。例如:

ADC3    .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   1525;"  d
A0  .\Drivers\CMSIS\Include\arm_math.h  /^    q15_t A0;           \/**< The derived gain, A0 = Kp + Ki + Kd . *\/$/;"   m   struct:__anon68
这一行的意思是:

  • 已找到名为ADC3的标记
  • 该标记位于文件
    \Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h
  • 标记位于该文件的
    1525行
  • 标签类型为
    d
    ——这是一个“宏定义”
到目前为止,一切顺利。但是在标签文件中有很多行我无法理解。例如:

ADC3    .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   1525;"  d
A0  .\Drivers\CMSIS\Include\arm_math.h  /^    q15_t A0;           \/**< The derived gain, A0 = Kp + Ki + Kd . *\/$/;"   m   struct:__anon68
还有这个:

ABFSR   .\Drivers\CMSIS\Include\core_cm7.h  /^  __IOM uint32_t ABFSR;                  \/*!< Offset: 0x2A8 (R\/W)  Auxiliary Bus Fault Status Register *\/$/;"  m   struct:__anon187
ABR .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^  __IO uint32_t ABR;      \/*!< QUADSPI Alternate Bytes register,                   Address offset: 0x1C *\/$/;"  m   struct:__anon39
ADC_Common_TypeDef  .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^} ADC_Common_TypeDef;$/;" t   typeref:struct:__anon3
ADC_IRQn    .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^  ADC_IRQn                    = 18,     \/*!< ADC1, ADC2 and ADC3 global Interrupts                             *\/$/;"   e   enum:__anon1
C   .\Drivers\CMSIS\Include\core_cm7.h  /^    uint32_t C:1;                        \/*!< bit:     29  Carry condition code flag *\/$/;" m   struct:__anon182::__anon183
ADC\u IRQn。\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h/^ADC\u IRQn=18,\/*!
还有这个:

ABFSR   .\Drivers\CMSIS\Include\core_cm7.h  /^  __IOM uint32_t ABFSR;                  \/*!< Offset: 0x2A8 (R\/W)  Auxiliary Bus Fault Status Register *\/$/;"  m   struct:__anon187
ABR .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^  __IO uint32_t ABR;      \/*!< QUADSPI Alternate Bytes register,                   Address offset: 0x1C *\/$/;"  m   struct:__anon39
ADC_Common_TypeDef  .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^} ADC_Common_TypeDef;$/;" t   typeref:struct:__anon3
ADC_IRQn    .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^  ADC_IRQn                    = 18,     \/*!< ADC1, ADC2 and ADC3 global Interrupts                             *\/$/;"   e   enum:__anon1
C   .\Drivers\CMSIS\Include\core_cm7.h  /^    uint32_t C:1;                        \/*!< bit:     29  Carry condition code flag *\/$/;" m   struct:__anon182::__anon183
C.\Drivers\CMSIS\Include\core\u cm7.h/^uint32\u t C:1;\/*!
我可以去

你能帮我理解他们吗?也许能找出一两个例子,同时给出一些关于如何解释这些句子的一般规则?那真的很有帮助


编辑:有关最新的.exe文件“universal ctags”,请参考以下问题:

一般来说,手动查看ctags文件不会很有成效(尽管我知道您可能只是想了解发生了什么)。话虽如此,以下是我对您发布的各种条目的解释

我怀疑您将看到的大部分内容都属于这些广泛的类别之一,但是当有疑问时,直接查看代码将真正帮助您了解发生了什么

结构成员 数据结构 该结构确定各种配置和控制寄存器在内存中的位置,在这种情况下为
NVIC
(嵌套向量中断控制器)块,该块管理系统的异常处理

就CTAG而言,这与上面的
A0
相同。(非常重要的)区别在于结构是如何实例化的——对于硬件块,结构声明映射到特定的内存地址,这些地址必须经过特殊处理

您的许多ctags行将引用这些类型的声明,包括:

ABFSR   .\Drivers\CMSIS\Include\core_cm7.h  /^  __IOM uint32_t ABFSR;                  \/*!< Offset: 0x2A8 (R\/W)  Auxiliary Bus Fault Status Register *\/$/;"  m   struct:__anon187

ABR .\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h   /^  __IO uint32_t ABR;      \/*!< QUADSPI Alternate Bytes register,                   Address offset: 0x1C *\/$/;"  m   struct:__anon39
值得特别对待,因为这是一个位域声明。它更复杂,因为它是联合内部的结构成员(
m struct:\uu anon182::\uu anon183
),但实际上它是同一类型的东西。根据你所看到的,这些匿名嵌套可能会变得相当深入——跟踪这些东西是CTAG和类似工具真正开始证明其价值的地方

类型定义 这就是CTags跟踪所有匿名结构的方式。它说“
ADC\u Common\u TypeDef
struct:\u anon3
是一样的东西。”

常量(枚举)
ADC\u IRQn。\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f767xx.h/^ADC\u IRQn=18,\/*!

这是一个常量(ADC中断的中断向量号)。它被声明为匿名枚举的一部分(
e enum:\uu anon1
)。

我会尝试直接询问生成这些标记的程序的开发人员和/或使用这些标记的程序的开发人员。