VSCode 的 launch.json 中使用的 .elf 文件是什么

What is the .elf file used in the launch.json of VSCode

我正在尝试使用 VSCode、ST Link v2、OpenOCD 和 Cortex-Debug 对 stm32 ARM 微控制器进行编码。我是 运行 Ubuntu 16.04.4 LTS。我在 vscode 中的 launch.json 文件中遇到问题。这是文件中的内容:

 {
    "version": "2.0.0",
    "configurations": [
        {
            "type": "cortex-debug",
            "request": "launch",
            "servertype": "openocd",
            "cwd": "${workspaceRoot}",
            "executable": "./firmware.elf",
            "name": "Debug (OpenOCD)",
            "device": "stlink",
            "configFiles": [
                "interface/stlink-v2.cfg"
            ]
        }
    ]
}

我对 firmware.elf 文件指的是什么感到困惑。我知道 .elf 文件是什么,但我不知道我是否应该创建此文件,或者我是否必须在线下载特定的 .elf 文件。

ELF 文件是一个存档,包含您的二进制文件、有关编译器、处理器、符号 table、arch 等的信息。您的编译器应该在编译您的代码后输出它。它包含您想要在微控制器上 运行 的实际二进制文件。

所以是的,你应该提供它。