什么是 .axf 文件? [英] What are .axf files?

查看:61
本文介绍了什么是 .axf 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 arm 架构的新手,我从事嵌入式软件工作,并试图了解我的项目二进制文件的调试文件夹中存在的 .axf 文件.

I am new to arm architecture, I work on embedded software and was trying to learn about the .axf file which is present in my project binary's debug folder.

发现它是链接器在构建过程中生成的arm可执行格式文件,用于调试崩溃.所以很明显它包含一些调试信息,但不清楚它是什么类型的信息?并且 debug 文件夹中还存在一个 .map 文件,那么这两个文件有什么区别?

Discovered that it is an arm executable format file generated by linker while the build process and it is used in debugging the crashes. So it is obvious that it contains some debugging information but its not clear what kind of information that is? And also there exists one .map file in the debug folder, so what could be the difference between these two files?

推荐答案

AXF 文件是一种目标文件格式,由 ARM 的 RealView 编译器(也是 Keil 的 ARM-MDK 的一部分)生成,包含两个目标文件代码和调试信息.在调试器中,虽然目标代码只加载到目标本身,但代码和调试信息都加载到开发主机的内存中.

The AXF file is an object file format generated by ARM's RealView compiler (also part of Keil's ARM-MDK) and contains both object code and debug information. In the debugger, while just the object code is loaded on the target itself, both the code and the debug information are loaded in the development host's memory.

当通过 JTAG、SWD 或其他连接调试(任何类型的 - 不仅仅是崩溃)时,代码需要在主机上可用,以及将代码与原始源代码关联的调试信息.通过调试连接,仅传输最少的数据(例如寄存器值),因此,例如,调试器将获取程序计数器值,并能够使用 AXF 中的调试数据显示主机上可用的汇编程序和源代码.

When debugging (of any kind - not just crashes) via JTAG, SWD or other connection the code needs to be available on the host along with the debug information that associates that code with the original source code. Over the debug connection, only minimal data such as register values are transferred, so for example the debugger will take the program counter value and be able to display the assembler and source code which is available on the host using the debug data in the AXF.

MAP 文件包含一些相同的信息,但它旨在供人类阅读和消费而不是机器使用,并且不包含源代码行到目标代码em> 源码级调试器需要的关联数据.

The MAP file contains some of the same information, but it is intended for human readability and consumption rather than machine use, and does not contain the source code line to object code association data needed by source level debugger.

大多数情况下您可以忽略它 - 编译器生成它,调试器加载它.您的工具链可能还会生成一个 .hex 文件,该文件是您用于生产编程的文件,仅包含机器代码、常量数据和初始化程序.

Mostly you can ignore it - the compiler generates it, the debugger loads it. Your toolchain probably also generates a .hex file which is what you'd use for production programming and contains just the machine code and constant data and initialisers.

这篇关于什么是 .axf 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆