Skip to content

Debug fails: Failed to load symbols from executable file: Error: Could not find "objdump" program #61

@lunamera

Description

@lunamera

Configuration

Operating system:
Linux x86

PlatformIO Version (platformio --version):
pio --version
PlatformIO Core, version 6.1.11

I've read the release note: "Resolved a possible issue that may cause generated projects for PlatformIO IDE for VSCode to fail to launch a debug session because of a missing “objdump” binary when GDB is not part of the toolchain package"

STM8 target.

Description of problem

STM8 debugging fails: "Failed to load symbols from executable file: Error: Could not find "objdump" program"

Steps to Reproduce

  1. setup STM8 sample project:
[env:genericf207]
platform = ststm8
board = genericf207
framework = spl
debug_tool = stlink
upload_protocol = stlinkv2

Any minimal sample program is sufficient for reproduction:

int main ()
{
  while(1);
}

  1. upload the code, make sure debugger connection is OK
  2. start debugging

Actual Results

Error message shows up: "Failed to load symbols from executable file: Error: Could not find "objdump" program

Expected Results

Debugging should work

Additional info

Content of launch.json:

// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
//
// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug",
            "executable": "/home/lunamera/Documents/PlatformIO/Projects/stm8debugtest/.pio/build/genericf207/firmware.elf",
            "projectEnvName": "genericf207",
            "toolchainBinDir": "/home/lunamera/.platformio/packages/toolchain-sdcc/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "svdPath": "/home/lunamera/.platformio/platforms/ststm8/misc/svd/STM8S207CB.svd",
            "preLaunchTask": {
                "type": "PlatformIO",
                "task": "Pre-Debug"
            }
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (skip Pre-Debug)",
            "executable": "/home/lunamera/Documents/PlatformIO/Projects/stm8debugtest/.pio/build/genericf207/firmware.elf",
            "projectEnvName": "genericf207",
            "toolchainBinDir": "/home/lunamera/.platformio/packages/toolchain-sdcc/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "svdPath": "/home/lunamera/.platformio/platforms/ststm8/misc/svd/STM8S207CB.svd"
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (without uploading)",
            "executable": "/home/lunamera/Documents/PlatformIO/Projects/stm8debugtest/.pio/build/genericf207/firmware.elf",
            "projectEnvName": "genericf207",
            "toolchainBinDir": "/home/lunamera/.platformio/packages/toolchain-sdcc/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "svdPath": "/home/lunamera/.platformio/platforms/ststm8/misc/svd/STM8S207CB.svd",
            "loadMode": "manual"
        }
    ]
}


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions